nodebb-plugin-internalnotes 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish-npm.yml +33 -0
- package/LICENSE +21 -0
- package/NODEBB_STANDARDS_AUDIT.md +153 -0
- package/README.md +104 -0
- package/eslint.config.mjs +55 -0
- package/languages/en-GB/internalnotes.json +33 -0
- package/lib/controllers.js +9 -0
- package/library.js +434 -0
- package/package.json +32 -0
- package/plugin.json +53 -0
- package/public/lib/acp-main.js +5 -0
- package/public/lib/admin.js +11 -0
- package/public/lib/main.js +631 -0
- package/scss/internalnotes.scss +181 -0
- package/templates/admin/plugins/internalnotes.tpl +44 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
.internal-notes-panel {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
right: 0;
|
|
5
|
+
width: 400px;
|
|
6
|
+
max-width: 100vw;
|
|
7
|
+
height: 100vh;
|
|
8
|
+
background: var(--bs-body-bg, #fff);
|
|
9
|
+
border-left: 2px solid var(--bs-warning, #ffc107);
|
|
10
|
+
box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
|
|
11
|
+
z-index: 1050;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
transition: transform 0.25s ease;
|
|
15
|
+
|
|
16
|
+
&.hidden {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.internal-notes-header {
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
align-items: center;
|
|
25
|
+
padding: 12px 16px;
|
|
26
|
+
border-bottom: 1px solid var(--bs-border-color, #dee2e6);
|
|
27
|
+
background: var(--bs-warning-bg-subtle, #fff3cd);
|
|
28
|
+
|
|
29
|
+
h5 {
|
|
30
|
+
margin: 0;
|
|
31
|
+
font-size: 1rem;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
|
|
34
|
+
i {
|
|
35
|
+
margin-right: 6px;
|
|
36
|
+
color: var(--bs-warning, #ffc107);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.internal-notes-assignee {
|
|
42
|
+
padding: 8px 16px;
|
|
43
|
+
border-bottom: 1px solid var(--bs-border-color, #dee2e6);
|
|
44
|
+
background: var(--bs-light, #f8f9fa);
|
|
45
|
+
font-size: 0.875rem;
|
|
46
|
+
|
|
47
|
+
.assignee-info {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 6px;
|
|
51
|
+
flex-wrap: wrap;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.avatar-xs {
|
|
55
|
+
width: 22px;
|
|
56
|
+
height: 22px;
|
|
57
|
+
border-radius: 50%;
|
|
58
|
+
object-fit: cover;
|
|
59
|
+
vertical-align: middle;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.internal-notes-list {
|
|
64
|
+
flex: 1;
|
|
65
|
+
overflow-y: auto;
|
|
66
|
+
padding: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.internal-note {
|
|
70
|
+
padding: 10px 16px;
|
|
71
|
+
border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
|
|
72
|
+
|
|
73
|
+
&:hover {
|
|
74
|
+
background: var(--bs-tertiary-bg, #f8f9fa);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.internal-note-meta {
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
gap: 6px;
|
|
82
|
+
margin-bottom: 4px;
|
|
83
|
+
font-size: 0.8rem;
|
|
84
|
+
|
|
85
|
+
.avatar-xs {
|
|
86
|
+
width: 20px;
|
|
87
|
+
height: 20px;
|
|
88
|
+
border-radius: 50%;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.delete-note {
|
|
92
|
+
margin-left: auto;
|
|
93
|
+
padding: 0 4px;
|
|
94
|
+
line-height: 1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.internal-note-content {
|
|
99
|
+
font-size: 0.9rem;
|
|
100
|
+
line-height: 1.5;
|
|
101
|
+
white-space: pre-wrap;
|
|
102
|
+
word-wrap: break-word;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.internal-notes-form {
|
|
106
|
+
padding: 12px 16px;
|
|
107
|
+
border-top: 1px solid var(--bs-border-color, #dee2e6);
|
|
108
|
+
background: var(--bs-body-bg, #fff);
|
|
109
|
+
|
|
110
|
+
.internal-notes-input {
|
|
111
|
+
resize: vertical;
|
|
112
|
+
min-height: 60px;
|
|
113
|
+
font-size: 0.9rem;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.internal-notes-badge,
|
|
118
|
+
.assignee-badge {
|
|
119
|
+
font-size: 0.75rem;
|
|
120
|
+
vertical-align: middle;
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
display: inline-flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
gap: 4px;
|
|
125
|
+
|
|
126
|
+
.assignee-badge-avatar {
|
|
127
|
+
width: 16px;
|
|
128
|
+
height: 16px;
|
|
129
|
+
border-radius: 50%;
|
|
130
|
+
object-fit: cover;
|
|
131
|
+
vertical-align: middle;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.assignee-badge-fallback {
|
|
135
|
+
vertical-align: middle;
|
|
136
|
+
background: none !important;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.assignee-badge-icon {
|
|
140
|
+
display: inline-flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
justify-content: center;
|
|
143
|
+
width: 18px;
|
|
144
|
+
height: 18px;
|
|
145
|
+
border-radius: 50%;
|
|
146
|
+
font-size: 0.7rem;
|
|
147
|
+
line-height: 1;
|
|
148
|
+
// background only when set inline (e.g. group labelColor)
|
|
149
|
+
background-color: transparent;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Assign modal suggestion dropdowns
|
|
154
|
+
.assign-suggestions {
|
|
155
|
+
position: absolute;
|
|
156
|
+
z-index: 1060;
|
|
157
|
+
max-height: 200px;
|
|
158
|
+
overflow-y: auto;
|
|
159
|
+
width: calc(100% - 2 * var(--bs-gutter-x, 0.75rem));
|
|
160
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
|
|
161
|
+
|
|
162
|
+
.suggestion-item {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
font-size: 0.9rem;
|
|
166
|
+
padding: 6px 12px;
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
|
|
169
|
+
.avatar-xs {
|
|
170
|
+
width: 22px;
|
|
171
|
+
height: 22px;
|
|
172
|
+
border-radius: 50%;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@media (max-width: 576px) {
|
|
178
|
+
.internal-notes-panel {
|
|
179
|
+
width: 100vw;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<form role="form" class="internalnotes-settings">
|
|
2
|
+
<div class="row">
|
|
3
|
+
<div class="col-sm-2 col-xs-12 settings-header">
|
|
4
|
+
<h4>Internal Notes & Assignments</h4>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="col-sm-10 col-xs-12">
|
|
7
|
+
<div class="alert alert-info">
|
|
8
|
+
<p>
|
|
9
|
+
This plugin allows administrators to add private internal notes to any topic and assign them to a user or group.
|
|
10
|
+
Notes and assignments are only visible to users with the required privilege level —
|
|
11
|
+
they are completely invisible to everyone else.
|
|
12
|
+
Optionally, global moderators and category moderators can be allowed as well.
|
|
13
|
+
</p>
|
|
14
|
+
<p class="mb-0">
|
|
15
|
+
Topics can be assigned to individual users or entire groups. The assigned user or group
|
|
16
|
+
members will receive a notification.
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="mb-3">
|
|
20
|
+
<div class="form-check">
|
|
21
|
+
<input type="checkbox" class="form-check-input" id="allowGlobalMods" name="allowGlobalMods" />
|
|
22
|
+
<label class="form-check-label" for="allowGlobalMods">
|
|
23
|
+
Allow global moderators to view and manage internal notes
|
|
24
|
+
</label>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="mb-3">
|
|
28
|
+
<div class="form-check">
|
|
29
|
+
<input type="checkbox" class="form-check-input" id="allowCategoryMods" name="allowCategoryMods" />
|
|
30
|
+
<label class="form-check-label" for="allowCategoryMods">
|
|
31
|
+
Allow category moderators to view and manage internal notes (in their categories)
|
|
32
|
+
</label>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<hr/>
|
|
38
|
+
<div class="row">
|
|
39
|
+
<div class="col-sm-2 col-xs-12"></div>
|
|
40
|
+
<div class="col-sm-10 col-xs-12">
|
|
41
|
+
<button id="save" class="btn btn-primary btn-sm fw-semibold ff-secondary w-100 text-center text-nowrap">Save changes</button>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</form>
|