nodebb-plugin-composer-default 10.2.22 → 10.2.24
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 +3 -3
- package/package.json +1 -1
- package/static/lib/composer/categoryList.js +1 -1
- package/static/lib/composer/formatting.js +12 -3
- package/static/lib/composer.js +6 -6
- package/static/templates/composer.tpl +2 -2
- package/static/templates/partials/composer-formatting.tpl +2 -2
- package/static/templates/partials/composer-tags.tpl +2 -2
- package/static/templates/partials/composer-title-container.tpl +3 -3
package/library.js
CHANGED
|
@@ -85,7 +85,7 @@ plugin.getFormattingOptions = async function () {
|
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
name: 'zen',
|
|
88
|
-
title: '[[modules:composer.
|
|
88
|
+
title: '[[modules:composer.zen-mode]]',
|
|
89
89
|
className: 'fa fa-arrows-alt',
|
|
90
90
|
visibility: defaultVisibility,
|
|
91
91
|
},
|
|
@@ -94,7 +94,7 @@ plugin.getFormattingOptions = async function () {
|
|
|
94
94
|
if (parseInt(meta.config.allowTopicsThumbnail, 10) === 1) {
|
|
95
95
|
payload.options.push({
|
|
96
96
|
name: 'thumbs',
|
|
97
|
-
title: '[[topic:composer.
|
|
97
|
+
title: '[[topic:composer.thumb-title]]',
|
|
98
98
|
className: 'fa fa-address-card-o',
|
|
99
99
|
badge: true,
|
|
100
100
|
visibility: {
|
|
@@ -239,7 +239,7 @@ async function generateBody(req, postData) {
|
|
|
239
239
|
// Quoted reply
|
|
240
240
|
if (req.query.toPid && parseInt(req.query.quoted, 10) === 1 && postData) {
|
|
241
241
|
const username = await user.getUserField(postData.uid, 'username');
|
|
242
|
-
const translated = await translator.translate(`[[modules:composer.
|
|
242
|
+
const translated = await translator.translate(`[[modules:composer.user-said, ${username}]]`);
|
|
243
243
|
return `${translated}\n` +
|
|
244
244
|
`> ${postData ? `${postData.content.replace(/\n/g, '\n> ')}\n\n` : ''}`;
|
|
245
245
|
} else if (req.query.body || req.query.content) {
|
package/package.json
CHANGED
|
@@ -40,7 +40,7 @@ define('composer/categoryList', [
|
|
|
40
40
|
|
|
41
41
|
// this is the mobile category selector
|
|
42
42
|
postContainer.find('.category-name')
|
|
43
|
-
.translateText(selector.selectedCategory ? selector.selectedCategory.name : '[[modules:composer.
|
|
43
|
+
.translateText(selector.selectedCategory ? selector.selectedCategory.name : '[[modules:composer.select-category]]')
|
|
44
44
|
.on('click', function () {
|
|
45
45
|
categorySelector.modal({
|
|
46
46
|
privilege: 'topics:create',
|
|
@@ -90,11 +90,20 @@ define('composer/formatting', [
|
|
|
90
90
|
}
|
|
91
91
|
fileForm.before(markup);
|
|
92
92
|
});
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
|
|
94
|
+
const els = formattingBarEl.find('.formatting-group>li');
|
|
95
|
+
els.tooltip({
|
|
95
96
|
container: '#content',
|
|
96
97
|
animation: false,
|
|
97
|
-
trigger: '
|
|
98
|
+
trigger: 'manual',
|
|
99
|
+
}).on('mouseenter', function (ev) {
|
|
100
|
+
const target = $(ev.target);
|
|
101
|
+
const isDropdown = target.hasClass('dropdown-menu') || !!target.parents('.dropdown-menu').length;
|
|
102
|
+
if (!isDropdown) {
|
|
103
|
+
$(this).tooltip('show');
|
|
104
|
+
}
|
|
105
|
+
}).on('click mouseleave', function () {
|
|
106
|
+
$(this).tooltip('hide');
|
|
98
107
|
});
|
|
99
108
|
};
|
|
100
109
|
|
package/static/lib/composer.js
CHANGED
|
@@ -144,9 +144,9 @@ define('composer', [
|
|
|
144
144
|
return composer.load(existingUUID);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
var actionText = '[[topic:composer.
|
|
147
|
+
var actionText = '[[topic:composer.new-topic]]';
|
|
148
148
|
if (post.action === 'posts.reply') {
|
|
149
|
-
actionText = '[[topic:composer.
|
|
149
|
+
actionText = '[[topic:composer.replying-to]]';
|
|
150
150
|
} else if (post.action === 'posts.edit') {
|
|
151
151
|
actionText = '[[topic:composer.editing-in]]';
|
|
152
152
|
}
|
|
@@ -234,14 +234,14 @@ define('composer', [
|
|
|
234
234
|
tid: data.tid,
|
|
235
235
|
toPid: data.toPid,
|
|
236
236
|
title: data.title,
|
|
237
|
-
body: '[[modules:composer.
|
|
237
|
+
body: '[[modules:composer.user-said-in, ' + data.username + ', ' + link + ']]\n' + data.body,
|
|
238
238
|
});
|
|
239
239
|
} else {
|
|
240
240
|
composer.newReply({
|
|
241
241
|
tid: data.tid,
|
|
242
242
|
toPid: data.toPid,
|
|
243
243
|
title: data.title,
|
|
244
|
-
body: '[[modules:composer.
|
|
244
|
+
body: '[[modules:composer.user-said, ' + data.username + ']]\n' + data.body,
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
return;
|
|
@@ -254,9 +254,9 @@ define('composer', [
|
|
|
254
254
|
var bodyEl = postContainer.find('textarea');
|
|
255
255
|
var prevText = bodyEl.val();
|
|
256
256
|
if (data.title && (data.selectedPid || data.toPid)) {
|
|
257
|
-
translator.translate('[[modules:composer.
|
|
257
|
+
translator.translate('[[modules:composer.user-said-in, ' + data.username + ', ' + link + ']]\n', config.defaultLang, onTranslated);
|
|
258
258
|
} else {
|
|
259
|
-
translator.translate('[[modules:composer.
|
|
259
|
+
translator.translate('[[modules:composer.user-said, ' + data.username + ']]\n', config.defaultLang, onTranslated);
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
function onTranslated(translated) {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
{{{ end }}}
|
|
14
14
|
{{{ if !isTopicOrMain }}}
|
|
15
|
-
<h4 class="title text-bg-primary">{{{ if isEditing }}}[[topic:composer.editing-in, "{topicTitle}"]]{{{ else }}}[[topic:composer.
|
|
15
|
+
<h4 class="title text-bg-primary">{{{ if isEditing }}}[[topic:composer.editing-in, "{topicTitle}"]]{{{ else }}}[[topic:composer.replying-to, "{topicTitle}"]]{{{ end }}}</h4>
|
|
16
16
|
{{{ end }}}
|
|
17
17
|
<div class="display-scheduler p-2 {{{ if !canSchedule }}} hidden{{{ end }}}">
|
|
18
18
|
<i class="fa fa-clock-o"></i>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<!-- IMPORT partials/composer-tags.tpl -->
|
|
33
33
|
{{{ end }}}
|
|
34
34
|
|
|
35
|
-
<div class="imagedrop"><div>[[topic:composer.
|
|
35
|
+
<div class="imagedrop"><div>[[topic:composer.drag-and-drop-images]]</div></div>
|
|
36
36
|
|
|
37
37
|
<div class="resizer position-absolute w-100 bottom-100 pe-3 border-bottom">
|
|
38
38
|
<div class="trigger text-center">
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
<div class="draft-icon m-2 hidden-xs hidden-sm"></div>
|
|
55
55
|
<button class="btn btn-sm btn-link py-2 text-body fw-semibold text-nowrap" data-action="preview">
|
|
56
56
|
<i class="fa fa-eye"></i>
|
|
57
|
-
<span class="d-none d-md-inline show-text">[[modules:composer.
|
|
58
|
-
<span class="d-none d-md-inline hide-text">[[modules:composer.
|
|
57
|
+
<span class="d-none d-md-inline show-text">[[modules:composer.show-preview]]</span>
|
|
58
|
+
<span class="d-none d-md-inline hide-text">[[modules:composer.hide-preview]]</span>
|
|
59
59
|
</button>
|
|
60
60
|
{{{ if composer:showHelpTab }}}
|
|
61
61
|
<button class="btn btn-sm btn-link py-2 text-body fw-semibold text-nowrap" data-action="help">
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="btn-group dropup me-2 {{{ if !tagWhitelist.length }}}hidden{{{ end }}}" component="composer/tag/dropdown">
|
|
4
4
|
<button class="btn btn-sm btn-link text-body dropdown-toggle" data-bs-toggle="dropdown" type="button">
|
|
5
5
|
<span class="visible-sm-inline visible-md-inline visible-lg-inline"><i class="fa fa-tags"></i></span>
|
|
6
|
-
[[tags:
|
|
6
|
+
[[tags:select-tags]]
|
|
7
7
|
</button>
|
|
8
8
|
|
|
9
9
|
<ul class="dropdown-menu">
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
<!-- END tagWhitelist -->
|
|
13
13
|
</ul>
|
|
14
14
|
</div>
|
|
15
|
-
<input class="tags" type="text" class="" placeholder="[[tags:
|
|
15
|
+
<input class="tags" type="text" class="" placeholder="[[tags:enter-tags-here, {minimumTagLength}, {maximumTagLength}]]" tabindex="5" />
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
{{{ if showHandleInput }}}
|
|
9
9
|
<div data-component="composer/handle">
|
|
10
|
-
<input class="handle form-control h-100 border-0 shadow-none" type="text" tabindex="1" placeholder="[[topic:composer.
|
|
10
|
+
<input class="handle form-control h-100 border-0 shadow-none" type="text" tabindex="1" placeholder="[[topic:composer.handle-placeholder]]" value="{handle}" />
|
|
11
11
|
</div>
|
|
12
12
|
{{{ end }}}
|
|
13
13
|
<div data-component="composer/title" class="position-relative flex-1" style="min-width: 0;">
|
|
14
14
|
{{{ if isTopicOrMain }}}
|
|
15
|
-
<input class="title form-control h-100 rounded-1 shadow-none" type="text" tabindex="1" placeholder="[[topic:composer.
|
|
15
|
+
<input class="title form-control h-100 rounded-1 shadow-none" type="text" tabindex="1" placeholder="[[topic:composer.title-placeholder]]" value="{topicTitle}"/>
|
|
16
16
|
{{{ else }}}
|
|
17
|
-
<span class="d-none d-md-block title h-100 text-truncate">{{{ if isEditing }}}[[topic:composer.editing-in, "{topicTitle}"]]{{{ else }}}[[topic:composer.
|
|
17
|
+
<span class="d-none d-md-block title h-100 text-truncate">{{{ if isEditing }}}[[topic:composer.editing-in, "{topicTitle}"]]{{{ else }}}[[topic:composer.replying-to, "{topicTitle}"]]{{{ end }}}</span>
|
|
18
18
|
{{{ end }}}
|
|
19
19
|
<div id="quick-search-container" class="quick-search-container mt-2 dropdown-menu d-block p-2 hidden">
|
|
20
20
|
<div class="text-center loading-indicator"><i class="fa fa-spinner fa-spin"></i></div>
|