nodebb-plugin-mentions 3.0.10 → 3.0.12

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/library.js CHANGED
@@ -44,11 +44,10 @@ Mentions._defaults = {
44
44
  SocketPlugins.mentions = {};
45
45
 
46
46
  Mentions.init = async (data) => {
47
- const hostMiddleware = require.main.require('./src/middleware');
48
47
  const routeHelpers = require.main.require('./src/routes/helpers');
49
48
  const controllers = require('./controllers');
50
49
 
51
- routeHelpers.setupAdminPageRoute(data.router, '/admin/plugins/mentions', hostMiddleware, [], controllers.renderAdminPage);
50
+ routeHelpers.setupAdminPageRoute(data.router, '/admin/plugins/mentions', [], controllers.renderAdminPage);
52
51
 
53
52
  // Retrieve settings
54
53
  Object.assign(Mentions._settings, Mentions._defaults, await Meta.settings.get('mentions'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-mentions",
3
- "version": "3.0.10",
3
+ "version": "3.0.12",
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": {
@@ -22,7 +22,7 @@
22
22
  "url": "https://github.com/julianlam/nodebb-plugin-mentions/issues"
23
23
  },
24
24
  "nbbpm": {
25
- "compatibility": "^1.19.6"
25
+ "compatibility": "^2.0.1"
26
26
  },
27
27
  "dependencies": {
28
28
  "html-entities": "^2.3.2",
@@ -31,8 +31,8 @@
31
31
  "xregexp": "^5.1.0"
32
32
  },
33
33
  "devDependencies": {
34
- "mocha": "9.2.2",
35
- "eslint": "8.14.0",
34
+ "mocha": "10.0.0",
35
+ "eslint": "8.15.0",
36
36
  "eslint-config-nodebb": "0.1.1",
37
37
  "eslint-plugin-import": "2.26.0"
38
38
  }
@@ -1,65 +1,65 @@
1
- <form role="form" class="mentions-settings">
2
- <div class="row">
3
- <div class="col-sm-2 col-xs-12 settings-header">General</div>
4
- <div class="col-sm-10 col-xs-12">
5
- <div class="form-group">
6
- <div class="checkbox">
7
- <label for="autofillGroups" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
8
- <input type="checkbox" class="mdl-switch__input" id="autofillGroups" name="autofillGroups" />
9
- <span class="mdl-switch__label">Allow mentioning User Groups</span>
10
- </label>
11
- </div>
12
- </div>
13
- <div class="form-group">
14
- <div class="checkbox">
15
- <label for="overrideIgnores" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
16
- <input type="checkbox" class="mdl-switch__input" id="overrideIgnores" name="overrideIgnores" />
17
- <span class="mdl-switch__label">Notify recipients of mentions even if topic is explictly ignored</span>
18
- </label>
19
- </div>
20
- </div>
21
- <div class="form-group">
22
- <label for="disableGroupMentions">Select groups you wish to disable mentions</label>
23
- <select class="form-control" id="disableGroupMentions" name="disableGroupMentions" multiple>
24
- <!-- BEGIN groups -->
25
- <option value="{groups.displayName}">{groups.displayName}</option>
26
- <!-- END groups -->
27
- </select>
28
- </div>
29
- <div class="form-group">
30
- <label for="display">Mentions will display ...</label>
31
- <select class="form-control" id="display" name="display">
32
- <option value="">... as written</option>
33
- <option value="fullname">... as user&apos;s full name (if set)</option>
34
- <option value="username">... as user&apos;s username</option>
35
- </select>
36
- </div>
37
- </div>
38
- </div>
39
-
40
- <div class="row">
41
- <div class="col-sm-2 col-xs-12 settings-header">Restrictions</div>
42
- <div class="col-sm-10 col-xs-12">
43
- <div class="form-group">
44
- <div class="checkbox">
45
- <label for="disableFollowedTopics" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
46
- <input type="checkbox" class="mdl-switch__input" id="disableFollowedTopics" name="disableFollowedTopics" />
47
- <span class="mdl-switch__label">Disable mentions for followed topics</span>
48
- </label>
49
- </div>
50
- </div>
51
- <div class="form-group">
52
- <div class="checkbox">
53
- <label for="privilegedDirectReplies" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
54
- <input type="checkbox" class="mdl-switch__input" id="privilegedDirectReplies" name="privilegedDirectReplies" />
55
- <span class="mdl-switch__label">Restrict mentions to privileged users (mods, global mods, administrators), unless it is a direct reply to a post</span>
56
- </label>
57
- </div>
58
- </div>
59
- </div>
60
- </div>
61
- </form>
62
-
63
- <button id="save" class="floating-button mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
64
- <i class="material-icons">save</i>
1
+ <form role="form" class="mentions-settings">
2
+ <div class="row">
3
+ <div class="col-sm-2 col-xs-12 settings-header">General</div>
4
+ <div class="col-sm-10 col-xs-12">
5
+ <div class="form-group">
6
+ <div class="checkbox">
7
+ <label for="autofillGroups" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
8
+ <input type="checkbox" class="mdl-switch__input" id="autofillGroups" name="autofillGroups" />
9
+ <span class="mdl-switch__label">Allow mentioning User Groups</span>
10
+ </label>
11
+ </div>
12
+ </div>
13
+ <div class="form-group">
14
+ <div class="checkbox">
15
+ <label for="overrideIgnores" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
16
+ <input type="checkbox" class="mdl-switch__input" id="overrideIgnores" name="overrideIgnores" />
17
+ <span class="mdl-switch__label">Notify recipients of mentions even if topic is explictly ignored</span>
18
+ </label>
19
+ </div>
20
+ </div>
21
+ <div class="form-group">
22
+ <label for="disableGroupMentions">Select groups you wish to disable mentions</label>
23
+ <select class="form-control" id="disableGroupMentions" name="disableGroupMentions" multiple>
24
+ <!-- BEGIN groups -->
25
+ <option value="{groups.displayName}">{groups.displayName}</option>
26
+ <!-- END groups -->
27
+ </select>
28
+ </div>
29
+ <div class="form-group">
30
+ <label for="display">Mentions will display ...</label>
31
+ <select class="form-control" id="display" name="display">
32
+ <option value="">... as written</option>
33
+ <option value="fullname">... as user&apos;s full name (if set)</option>
34
+ <option value="username">... as user&apos;s username</option>
35
+ </select>
36
+ </div>
37
+ </div>
38
+ </div>
39
+
40
+ <div class="row">
41
+ <div class="col-sm-2 col-xs-12 settings-header">Restrictions</div>
42
+ <div class="col-sm-10 col-xs-12">
43
+ <div class="form-group">
44
+ <div class="checkbox">
45
+ <label for="disableFollowedTopics" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
46
+ <input type="checkbox" class="mdl-switch__input" id="disableFollowedTopics" name="disableFollowedTopics" />
47
+ <span class="mdl-switch__label">Disable mentions for followed topics</span>
48
+ </label>
49
+ </div>
50
+ </div>
51
+ <div class="form-group">
52
+ <div class="checkbox">
53
+ <label for="privilegedDirectReplies" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
54
+ <input type="checkbox" class="mdl-switch__input" id="privilegedDirectReplies" name="privilegedDirectReplies" />
55
+ <span class="mdl-switch__label">Restrict mentions to privileged users (mods, global mods, administrators), unless it is a direct reply to a post</span>
56
+ </label>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ </form>
62
+
63
+ <button id="save" class="floating-button mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
64
+ <i class="material-icons">save</i>
65
65
  </button>