nodebb-plugin-mentions 4.1.1 → 4.2.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/controllers.js +4 -1
- package/package.json +2 -2
- package/templates/admin/plugins/mentions.tpl +61 -53
package/controllers.js
CHANGED
|
@@ -6,5 +6,8 @@ const Controllers = module.exports;
|
|
|
6
6
|
|
|
7
7
|
Controllers.renderAdminPage = async function (req, res) {
|
|
8
8
|
const groupData = await groups.getGroupsFromSet('groups:visible:createtime', 0, -1);
|
|
9
|
-
res.render('admin/plugins/mentions', {
|
|
9
|
+
res.render('admin/plugins/mentions', {
|
|
10
|
+
groups: groupData,
|
|
11
|
+
title: '[[notifications:mentions]]',
|
|
12
|
+
});
|
|
10
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodebb-plugin-mentions",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "NodeBB Plugin that allows users to mention other users by prepending an '@' sign to their username",
|
|
5
5
|
"main": "library.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"mocha": "10.2.0",
|
|
35
|
-
"eslint": "8.
|
|
35
|
+
"eslint": "8.42.0",
|
|
36
36
|
"eslint-config-nodebb": "0.2.1",
|
|
37
37
|
"eslint-plugin-import": "2.27.5"
|
|
38
38
|
}
|
|
@@ -1,59 +1,67 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
<div class="acp-page-container">
|
|
2
|
+
<!-- IMPORT admin/partials/settings/header.tpl -->
|
|
3
|
+
|
|
4
|
+
<div class="row m-0">
|
|
5
|
+
<div id="spy-container" class="col-12 col-md-8 px-0 mb-4" tabindex="0">
|
|
6
|
+
<form role="form" class="mentions-settings">
|
|
7
|
+
<div class="mb-4">
|
|
8
|
+
<h5 class="fw-bold tracking-tight settings-header">General</h5>
|
|
9
|
+
|
|
10
|
+
<div class="mb-3 form-check">
|
|
11
|
+
<input type="checkbox" class="form-check-input" id="autofillGroups" name="autofillGroups" />
|
|
12
|
+
<label for="autofillGroups" class="form-check-label">
|
|
13
|
+
<span>Allow mentioning User Groups</span>
|
|
14
|
+
</label>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="mb-3 form-check">
|
|
17
|
+
<input type="checkbox" class="form-check-input" id="overrideIgnores" name="overrideIgnores" />
|
|
18
|
+
<label for="overrideIgnores" class="form-check-label">
|
|
19
|
+
<span>Notify recipients of mentions even if topic is explictly ignored</span>
|
|
20
|
+
</label>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="mb-3">
|
|
23
|
+
<label class="form-label" for="disableGroupMentions">Select groups you wish to disable mentions</label>
|
|
24
|
+
<select class="form-select" id="disableGroupMentions" name="disableGroupMentions" multiple>
|
|
25
|
+
<!-- BEGIN groups -->
|
|
26
|
+
<option value="{groups.displayName}">{groups.displayName}</option>
|
|
27
|
+
<!-- END groups -->
|
|
28
|
+
</select>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="mb-3">
|
|
31
|
+
<label class="form-label" for="display">Mentions will display ...</label>
|
|
32
|
+
<select class="form-select" id="display" name="display">
|
|
33
|
+
<option value="">... as written</option>
|
|
34
|
+
<option value="fullname">... as user's full name (if set)</option>
|
|
35
|
+
<option value="username">... as user's username</option>
|
|
36
|
+
</select>
|
|
37
|
+
</div>
|
|
35
38
|
|
|
36
|
-
<div class="row">
|
|
37
|
-
<div class="col-sm-2 col-12 settings-header">Restrictions</div>
|
|
38
|
-
<div class="col-sm-10 col-12">
|
|
39
|
-
<div class="mb-3">
|
|
40
|
-
<div class="mb-3 form-check">
|
|
41
|
-
<input type="checkbox" class="form-check-input" id="disableFollowedTopics" name="disableFollowedTopics" />
|
|
42
|
-
<label for="disableFollowedTopics" class="form-check-label">
|
|
43
|
-
<span>Disable mentions for followed topics</span>
|
|
44
|
-
</label>
|
|
45
39
|
</div>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
|
|
40
|
+
|
|
41
|
+
<div class="mb-4">
|
|
42
|
+
<h5 class="fw-bold tracking-tight settings-header">Restrictions</h5>
|
|
43
|
+
|
|
44
|
+
<div class="mb-3">
|
|
45
|
+
<div class="mb-3 form-check">
|
|
46
|
+
<input type="checkbox" class="form-check-input" id="disableFollowedTopics" name="disableFollowedTopics" />
|
|
47
|
+
<label for="disableFollowedTopics" class="form-check-label">
|
|
48
|
+
<span>Disable mentions for followed topics</span>
|
|
49
|
+
</label>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="mb-3">
|
|
53
|
+
<div class="mb-3 form-check">
|
|
54
|
+
<input type="checkbox" class="form-check-input" id="privilegedDirectReplies" name="privilegedDirectReplies" />
|
|
55
|
+
<label for="privilegedDirectReplies" class="form-check-label">
|
|
56
|
+
<span>Restrict mentions to privileged users (mods, global mods, administrators), unless it is a direct reply to a post</span>
|
|
57
|
+
</label>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
53
60
|
</div>
|
|
54
|
-
</
|
|
61
|
+
</form>
|
|
55
62
|
</div>
|
|
63
|
+
|
|
64
|
+
<!-- IMPORT admin/partials/settings/toc.tpl -->
|
|
56
65
|
</div>
|
|
57
|
-
</
|
|
66
|
+
</div>
|
|
58
67
|
|
|
59
|
-
<!-- IMPORT admin/partials/save_button.tpl -->
|