nodebb-plugin-composer-default 10.3.19 → 10.3.20
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
CHANGED
|
@@ -39,22 +39,15 @@ define('composer/categoryList', [
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// this is the mobile category selector
|
|
42
|
-
|
|
43
|
-
.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
postContainer.find('.category-name').text(selectedCategory.name);
|
|
52
|
-
selector.selectCategory(selectedCategory.cid);
|
|
53
|
-
if (postData.hasOwnProperty('cid')) {
|
|
54
|
-
changeCategory(postContainer, postData, selectedCategory);
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
});
|
|
42
|
+
categorySelector.init(
|
|
43
|
+
postContainer.find('.mobile-navbar [component="category-selector"]'), {
|
|
44
|
+
privilege: 'topics:create',
|
|
45
|
+
states: ['watching', 'tracking', 'notwatching', 'ignoring'],
|
|
46
|
+
onSelect: function (selectedCategory) {
|
|
47
|
+
if (postData.hasOwnProperty('cid')) {
|
|
48
|
+
changeCategory(postContainer, postData, selectedCategory);
|
|
49
|
+
}
|
|
50
|
+
},
|
|
58
51
|
});
|
|
59
52
|
|
|
60
53
|
toggleDropDirection(postContainer);
|
|
@@ -19,22 +19,41 @@
|
|
|
19
19
|
flex-shrink: 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
// fix text-truncate in mobile
|
|
23
|
+
// these are not in selector-dropdown-content.tpl because they are only needed in the mobile composer and not in the category selector used in the topic list
|
|
24
|
+
.category-dropdown-container {
|
|
25
|
+
width: 100%;
|
|
26
|
+
> button {
|
|
27
|
+
width: 100%;
|
|
28
|
+
@include text-truncate;
|
|
29
|
+
text-align: start;
|
|
30
|
+
> [component="category-selector-selected"] {
|
|
31
|
+
width: 100%;
|
|
32
|
+
@include text-truncate;
|
|
33
|
+
> i:nth-child(1) {
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
color: var(--bs-btn-color)!important;
|
|
36
|
+
}
|
|
37
|
+
> span:nth-child(2) { // show "Select category" text on mobile
|
|
38
|
+
display: inline!important;
|
|
39
|
+
}
|
|
40
|
+
> .category-item {
|
|
41
|
+
width: 100%;
|
|
42
|
+
@include text-truncate;
|
|
43
|
+
span:nth-child(1) {
|
|
44
|
+
flex-shrink: 0;
|
|
45
|
+
}
|
|
46
|
+
span:nth-child(2) {
|
|
47
|
+
display: block!important;
|
|
48
|
+
@include text-truncate;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
24
53
|
}
|
|
25
54
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
.category-name-container, .title {
|
|
29
|
-
text-align: center;
|
|
30
|
-
text-overflow: ellipsis;
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
white-space: nowrap;
|
|
55
|
+
.title {
|
|
33
56
|
flex-grow: 2;
|
|
34
|
-
font-size: 16px;
|
|
35
|
-
line-height: inherit;
|
|
36
|
-
padding: 9px 5px;
|
|
37
|
-
margin: 0;
|
|
38
57
|
}
|
|
39
58
|
}
|
|
40
59
|
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
<div component="composer" class="composer {{{ if resizable }}} resizable{{{ end }}}{{{ if !isTopicOrMain }}} reply{{{ end }}}">
|
|
2
2
|
<div class="composer-container d-flex flex-column gap-1 h-100">
|
|
3
3
|
<!-- mobile header -->
|
|
4
|
-
<nav class="navbar fixed-top mobile-navbar
|
|
4
|
+
<nav class="navbar fixed-top mobile-navbar text-bg-primary d-flex d-md-none flex-nowrap gap-1 px-1">
|
|
5
5
|
<div class="btn-group">
|
|
6
|
-
<button class="btn btn-sm btn-primary composer-discard" data-action="discard" tabindex="-1"><i class="fa fa-fw fa-times"></i></button>
|
|
7
|
-
<button class="btn btn-sm btn-primary composer-minimize" data-action="minimize" tabindex="-1"><i class="fa fa-fw fa-minus"></i></button>
|
|
6
|
+
<button class="btn btn-sm btn-primary composer-discard fs-5" data-action="discard" tabindex="-1"><i class="fa fa-fw fa-times"></i></button>
|
|
7
|
+
<button class="btn btn-sm btn-primary composer-minimize fs-5" data-action="minimize" tabindex="-1"><i class="fa fa-fw fa-minus"></i></button>
|
|
8
8
|
</div>
|
|
9
9
|
{{{ if isTopic }}}
|
|
10
|
-
<div class="
|
|
11
|
-
|
|
10
|
+
<div class="flex-1" style="min-width: 0px;">
|
|
11
|
+
<!-- IMPORT partials/category/selector-dropdown-left.tpl -->
|
|
12
12
|
</div>
|
|
13
13
|
{{{ end }}}
|
|
14
14
|
{{{ if !isTopicOrMain }}}
|
|
15
|
-
<h4 class="title text-bg-primary">{titleLabel}</h4>
|
|
15
|
+
<h4 class="title text-center text-bg-primary text-truncate fs-6 mb-0 px-2">{titleLabel}</h4>
|
|
16
16
|
{{{ end }}}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
|
|
18
|
+
<div class="d-flex gap-1 flex-nowrap">
|
|
19
|
+
<button class="btn btn-sm btn-primary display-scheduler fs-5 {{{ if !canSchedule }}} hidden{{{ end }}}">
|
|
20
|
+
<i class="fa fa-clock-o"></i>
|
|
21
|
+
</button>
|
|
22
|
+
<button class="btn btn-sm btn-primary composer-submit fs-5" data-action="post" tabindex="-1"><i class="fa fa-fw fa-chevron-right"></i></button>
|
|
22
23
|
</div>
|
|
23
24
|
</nav>
|
|
24
25
|
<div class="p-2 d-flex flex-column gap-1 h-100">
|