nodebb-plugin-composer-default 10.0.24 → 10.0.26
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/package.json +1 -1
- package/static/lib/composer/categoryList.js +1 -1
- package/static/lib/composer/preview.js +7 -3
- package/static/lib/composer/tags.js +1 -1
- package/static/templates/composer.tpl +16 -15
- package/static/templates/partials/composer-formatting.tpl +2 -2
- package/static/templates/partials/composer-title-container.tpl +1 -1
package/package.json
CHANGED
|
@@ -47,7 +47,7 @@ define('composer/categoryList', [
|
|
|
47
47
|
states: ['watching', 'notwatching', 'ignoring'],
|
|
48
48
|
openOnLoad: true,
|
|
49
49
|
showLinks: false,
|
|
50
|
-
|
|
50
|
+
onSubmit: function (selectedCategory) {
|
|
51
51
|
postContainer.find('.category-name').text(selectedCategory.name);
|
|
52
52
|
selector.selectCategory(selectedCategory.cid);
|
|
53
53
|
if (postData.hasOwnProperty('cid')) {
|
|
@@ -45,12 +45,12 @@ define('composer/preview', ['hooks'], function (hooks) {
|
|
|
45
45
|
|
|
46
46
|
preview.handleToggler = function ($postContainer) {
|
|
47
47
|
const postContainer = $postContainer.get(0);
|
|
48
|
-
|
|
49
|
-
const isMobile = ['xs', 'sm'].includes(
|
|
48
|
+
preview.env = utils.findBootstrapEnvironment();
|
|
49
|
+
const isMobile = ['xs', 'sm'].includes(preview.env);
|
|
50
50
|
const toggler = postContainer.querySelector('.formatting-bar [data-action="preview"]');
|
|
51
51
|
const showText = toggler.querySelector('.show-text');
|
|
52
52
|
const hideText = toggler.querySelector('.hide-text');
|
|
53
|
-
let show = localStorage.getItem('composer:previewToggled')
|
|
53
|
+
let show = localStorage.getItem('composer:previewToggled') && !isMobile;
|
|
54
54
|
const previewContainer = postContainer.querySelector('.preview-container');
|
|
55
55
|
const writeContainer = postContainer.querySelector('.write-container');
|
|
56
56
|
|
|
@@ -62,10 +62,14 @@ define('composer/preview', ['hooks'], function (hooks) {
|
|
|
62
62
|
if (isMobile) {
|
|
63
63
|
previewContainer.classList.toggle('hide', false);
|
|
64
64
|
writeContainer.classList.toggle('maximized', false);
|
|
65
|
+
|
|
65
66
|
previewContainer.classList.toggle('d-none', !show);
|
|
66
67
|
previewContainer.classList.toggle('d-flex', show);
|
|
68
|
+
previewContainer.classList.toggle('w-100', show);
|
|
69
|
+
|
|
67
70
|
writeContainer.classList.toggle('d-flex', !show);
|
|
68
71
|
writeContainer.classList.toggle('d-none', show);
|
|
72
|
+
writeContainer.classList.toggle('w-100', !show);
|
|
69
73
|
} else {
|
|
70
74
|
previewContainer.classList.toggle('hide', !show);
|
|
71
75
|
writeContainer.classList.toggle('w-50', show);
|
|
@@ -185,7 +185,7 @@ define('composer/tags', ['alerts'], function (alerts) {
|
|
|
185
185
|
input.removeAttr('readonly');
|
|
186
186
|
input.attr('placeholder', postContainer.find('input.tags').attr('placeholder'));
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
postContainer.find('.tags-container').toggleClass('haswhitelist', !!(data.tagWhitelist && data.tagWhitelist.length));
|
|
189
189
|
postContainer.find('.tags-container').toggleClass('hidden', (
|
|
190
190
|
data.privileges && data.privileges.hasOwnProperty('topics:tag') && !data.privileges['topics:tag']) ||
|
|
191
191
|
(maxTags === 0 && !postData && !postData.tags && !postData.tags.length));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<div component="composer" class="composer
|
|
1
|
+
<div component="composer" class="composer <!-- IF resizable --> resizable<!-- ENDIF resizable --><!-- IF !isTopicOrMain --> reply<!-- ENDIF !isTopicOrMain -->">
|
|
2
2
|
|
|
3
3
|
<div class="composer-container d-flex flex-column gap-1 h-100">
|
|
4
4
|
<!-- mobile header -->
|
|
5
|
-
<nav class="navbar fixed-top mobile-navbar hidden-md hidden-lg text-bg-primary flex-nowrap">
|
|
5
|
+
<nav class="navbar fixed-top mobile-navbar hidden-md hidden-lg text-bg-primary flex-nowrap gap-1">
|
|
6
6
|
<div class="btn-group">
|
|
7
7
|
<button class="btn btn-sm btn-primary composer-discard" data-action="discard" tabindex="-1"><i class="fa fa-times"></i></button>
|
|
8
8
|
<button class="btn btn-sm btn-primary composer-minimize" data-action="minimize" tabindex="-1"><i class="fa fa-minus"></i></button>
|
|
@@ -15,30 +15,31 @@
|
|
|
15
15
|
<!-- IF !isTopicOrMain -->
|
|
16
16
|
<h4 class="title text-bg-primary">[[topic:composer.replying_to, "{topicTitle}"]]</h4>
|
|
17
17
|
<!-- ENDIF !isTopicOrMain -->
|
|
18
|
-
<div class="display-scheduler
|
|
18
|
+
<div class="display-scheduler p-2 {{{ if !canSchedule }}} hidden{{{ end }}}">
|
|
19
19
|
<i class="fa fa-clock-o"></i>
|
|
20
20
|
</div>
|
|
21
21
|
<div class="btn-group">
|
|
22
22
|
<button class="btn btn-sm btn-primary composer-submit" data-action="post" tabindex="-1"><i class="fa fa-chevron-right"></i></button>
|
|
23
23
|
</div>
|
|
24
24
|
</nav>
|
|
25
|
+
<div class="p-2 d-flex flex-column gap-1 h-100">
|
|
26
|
+
<!-- IMPORT partials/composer-title-container.tpl -->
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
<!-- IMPORT partials/composer-formatting.tpl -->
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
<!-- IMPORT partials/composer-write-preview.tpl -->
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
<!-- IF isTopicOrMain -->
|
|
33
|
+
<!-- IMPORT partials/composer-tags.tpl -->
|
|
34
|
+
<!-- ENDIF isTopicOrMain -->
|
|
31
35
|
|
|
32
|
-
|
|
33
|
-
<!-- IMPORT partials/composer-tags.tpl -->
|
|
34
|
-
<!-- ENDIF isTopicOrMain -->
|
|
36
|
+
<div class="imagedrop"><div>[[topic:composer.drag_and_drop_images]]</div></div>
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<i class="fa fa-fw fa-up-down"></i>
|
|
38
|
+
<div class="resizer position-absolute w-100 bottom-100 pe-3 border-bottom">
|
|
39
|
+
<div class="trigger text-center">
|
|
40
|
+
<div class="handle d-inline-block px-2 py-1 border bg-body">
|
|
41
|
+
<i class="fa fa-fw fa-up-down"></i>
|
|
42
|
+
</div>
|
|
42
43
|
</div>
|
|
43
44
|
</div>
|
|
44
45
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<div class="d-flex justify-content-between align-items-center formatting-bar">
|
|
2
|
-
<ul class="list-unstyled mb-0 d-flex formatting-group gap-2">
|
|
1
|
+
<div class="d-flex justify-content-between gap-2 align-items-center formatting-bar">
|
|
2
|
+
<ul class="list-unstyled mb-0 d-flex formatting-group gap-2 overflow-auto">
|
|
3
3
|
<!-- BEGIN formatting -->
|
|
4
4
|
<!-- IF formatting.spacer -->
|
|
5
5
|
<li class="small spacer"></li>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
|
-
<div class="d-flex action-bar gap-1
|
|
25
|
+
<div class="d-none d-md-flex action-bar gap-1 align-items-center">
|
|
26
26
|
<button class="btn btn-sm btn-link text-body fw-semibold" data-action="hide" tabindex="-1"><i class="fa fa-angle-down"></i> [[topic:composer.hide]]</button>
|
|
27
27
|
<button class="btn btn-sm btn-link composer-discard text-body fw-semibold" data-action="discard" tabindex="-1"><i class="fa fa-trash"></i> [[topic:composer.discard]]</button>
|
|
28
28
|
<div class="btn-group btn-group-sm">
|