@nodebb/nodebb-plugin-reactions 2.2.10 → 3.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/README.md +5 -0
- package/library.js +5 -5
- package/package.json +2 -2
- package/templates/admin/plugins/reactions/partials/sorted-list/emoji-form.tpl +4 -4
- package/templates/admin/plugins/reactions/partials/sorted-list/emoji-item.tpl +6 -6
- package/templates/partials/chats/reaction.tpl +1 -1
- package/templates/partials/topic/reaction.tpl +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,11 @@ Install via one-click activation in the Admin Control Panel or run the following
|
|
|
8
8
|
|
|
9
9
|
npm i @nodebb/nodebb-plugin-reactions
|
|
10
10
|
|
|
11
|
+
# Emojis in Topic Titles and Notifications
|
|
12
|
+
|
|
13
|
+
In the admin settings of nodebb-plugin-emoji, turn on "Parse emojis in topic titles" to see emojis as images in topic titles and notifications.
|
|
14
|
+

|
|
15
|
+
|
|
11
16
|
# Screenshots
|
|
12
17
|
|
|
13
18
|
## Reactions:
|
package/library.js
CHANGED
|
@@ -375,18 +375,18 @@ SocketPlugins.reactions = {
|
|
|
375
375
|
}
|
|
376
376
|
|
|
377
377
|
if (postData.uid && postData.uid !== socket.uid) {
|
|
378
|
-
const [
|
|
379
|
-
user.
|
|
380
|
-
topics.
|
|
378
|
+
const [displayname, topicTitle, parsedPostData] = await Promise.all([
|
|
379
|
+
user.getNotificationDisplayname(socket.uid),
|
|
380
|
+
topics.getNotificationTitle(data.tid),
|
|
381
381
|
posts.parsePost(postData),
|
|
382
382
|
]);
|
|
383
383
|
const notifObj = await notifications.create({
|
|
384
384
|
type: 'reaction',
|
|
385
385
|
bodyShort: translator.compile(
|
|
386
386
|
'reactions:notification.user-has-reacted-with-to-your-post-in-topic',
|
|
387
|
-
|
|
387
|
+
displayname,
|
|
388
388
|
`:${data.reaction}:`,
|
|
389
|
-
|
|
389
|
+
topicTitle
|
|
390
390
|
),
|
|
391
391
|
bodyLong: parsedPostData.content,
|
|
392
392
|
nid: `uid:${socket.uid}:pid:${data.pid}:reaction:${data.reaction}`,
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<form>
|
|
2
|
-
<div class="
|
|
3
|
-
<label for="reaction">[[reactions:settings.reaction-reputations.reaction]]</label>
|
|
2
|
+
<div class="mb-3">
|
|
3
|
+
<label class="form-label" for="reaction">[[reactions:settings.reaction-reputations.reaction]]</label>
|
|
4
4
|
<input type="text" id="reaction" name="reaction" class="form-control" placeholder="[[reactions:settings.reaction-reputations.reaction]]" />
|
|
5
5
|
</div>
|
|
6
|
-
<div class="
|
|
7
|
-
<label for="reputation">[[reactions:settings.reaction-reputations.reputation]]</label>
|
|
6
|
+
<div class="mb-3">
|
|
7
|
+
<label class="form-label" for="reputation">[[reactions:settings.reaction-reputations.reputation]]</label>
|
|
8
8
|
<input type="number" id="reputation" name="reputation" class="form-control" placeholder="[[reactions:settings.reaction-reputations.reputation]]" />
|
|
9
9
|
</div>
|
|
10
10
|
</form>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<li data-type="item" class="list-group-item">
|
|
2
|
-
<div class="row">
|
|
3
|
-
<div class="col-
|
|
2
|
+
<div class="row align-items-center">
|
|
3
|
+
<div class="col-9">
|
|
4
4
|
<span data-reaction="{reaction}"></span><strong> {reaction}</strong><br />
|
|
5
|
-
<small>[[reactions:settings.reaction-reputations.
|
|
5
|
+
<small>[[reactions:settings.reaction-reputations.reputation]]: {reputation}</small>
|
|
6
6
|
</div>
|
|
7
|
-
<div class="col-
|
|
8
|
-
<button type="button" data-type="edit" class="btn btn-info">[[reactions:settings.reaction-reputations.edit]]</button>
|
|
9
|
-
<button type="button" data-type="remove" class="btn btn-danger">[[reactions:settings.reaction-reputations.remove]]</button>
|
|
7
|
+
<div class="col-3 d-flex gap-2">
|
|
8
|
+
<button type="button" data-type="edit" class="btn btn-sm btn-info">[[reactions:settings.reaction-reputations.edit]]</button>
|
|
9
|
+
<button type="button" data-type="remove" class="btn btn-sm btn-danger">[[reactions:settings.reaction-reputations.remove]]</button>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
</li>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<span class="reaction mb-2 {{{ if ./reacted }}}reacted{{{ end }}}" component="message/reaction" data-mid="{./mid}" data-reaction="{./reaction}">
|
|
2
|
-
{./reactionImage}
|
|
2
|
+
{{./reactionImage}}
|
|
3
3
|
<small class="reaction-emoji-count" data-count="{./reactionCount}"></small>
|
|
4
4
|
</span>
|