nodebb-theme-persona 13.0.49 → 13.0.50
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 +0 -18
- package/package.json +1 -1
- package/plugin.json +1 -2
- package/templates/flags/detail.tpl +5 -6
- package/templates/partials/flags/filters.tpl +78 -3
package/library.js
CHANGED
|
@@ -96,22 +96,4 @@ library.getThemeConfig = async function (config) {
|
|
|
96
96
|
return config;
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
library.addUserToTopic = async function (hookData) {
|
|
100
|
-
const settings = await meta.settings.get('persona');
|
|
101
|
-
if (settings.enableQuickReply === 'on') {
|
|
102
|
-
if (hookData.req.user) {
|
|
103
|
-
const userData = await user.getUserData(hookData.req.user.uid);
|
|
104
|
-
hookData.templateData.loggedInUser = userData;
|
|
105
|
-
} else {
|
|
106
|
-
hookData.templateData.loggedInUser = {
|
|
107
|
-
uid: 0,
|
|
108
|
-
username: '[[global:guest]]',
|
|
109
|
-
picture: user.getDefaultAvatar(),
|
|
110
|
-
'icon:text': '?',
|
|
111
|
-
'icon:bgColor': '#aaa',
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
99
|
|
|
116
|
-
return hookData;
|
|
117
|
-
};
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
{ "hook": "filter:config.get", "method": "getThemeConfig" },
|
|
6
6
|
{ "hook": "static:app.load", "method": "init" },
|
|
7
7
|
{ "hook": "filter:admin.header.build", "method": "addAdminNavigation" },
|
|
8
|
-
{ "hook": "filter:user.profileMenu", "method": "addProfileItem" }
|
|
9
|
-
{ "hook": "filter:topic.build", "method": "addUserToTopic" }
|
|
8
|
+
{ "hook": "filter:user.profileMenu", "method": "addProfileItem" }
|
|
10
9
|
],
|
|
11
10
|
"scripts": [
|
|
12
11
|
"public/modules/autohidingnavbar.js",
|
|
@@ -84,10 +84,9 @@
|
|
|
84
84
|
|
|
85
85
|
<form role="form">
|
|
86
86
|
<div class="mb-3">
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
<button type="button" class="btn btn-block btn-primary" data-action="appendNote">[[flags:add-note]]</button>
|
|
87
|
+
<div class="d-flex align-items-center">
|
|
88
|
+
<h2 class="h4 me-auto mb-0" for="note">[[flags:notes]]</h2>
|
|
89
|
+
<button type="button" class="btn btn-primary" data-action="addEditNote">[[flags:add-note]]</button>
|
|
91
90
|
</div>
|
|
92
91
|
</div>
|
|
93
92
|
</form>
|
|
@@ -97,7 +96,7 @@
|
|
|
97
96
|
<div class="alert alert-success text-center">[[flags:no-notes]]</div>
|
|
98
97
|
<!-- ENDIF !notes.length -->
|
|
99
98
|
{{{each notes}}}
|
|
100
|
-
<div class="d-flex mb-3">
|
|
99
|
+
<div class="d-flex mb-3" component="flag/note" data-datetime="{./datetime}" data-index="{@index}">
|
|
101
100
|
<div class="flex-shrink-0">
|
|
102
101
|
<a href="{config.relative_path}/user/{../user.userslug}">{buildAvatar(notes.user, "32px", true, "media-object")}</a>
|
|
103
102
|
</div>
|
|
@@ -109,7 +108,7 @@
|
|
|
109
108
|
{../content}
|
|
110
109
|
</div>
|
|
111
110
|
<div class="flex-shrink-0">
|
|
112
|
-
<a href="#" class="btn btn-sm btn-link" data-action="
|
|
111
|
+
<a href="#" class="btn btn-sm btn-link" data-action="addEditNote"><i class="fa fa-pencil"></i></a>
|
|
113
112
|
<a href="#" class="btn btn-sm btn-link" data-action="delete-note"><i class="fa fa-trash text-danger"></i></a>
|
|
114
113
|
</div>
|
|
115
114
|
</div>
|
|
@@ -70,17 +70,92 @@
|
|
|
70
70
|
<fieldset class="collapse{{{ if expanded }}} show{{{ end }}}" id="more-filters" aria-expanded="{expanded}">
|
|
71
71
|
<div class="mb-3">
|
|
72
72
|
<label class="form-label" for="filter-assignee">[[flags:filter-assignee]]</label>
|
|
73
|
-
<
|
|
73
|
+
<div component="flags/filter/assignee" class="dropdown" data-filter-name="assignee">
|
|
74
|
+
<a component="user/filter/button" class="filter-btn btn btn-sm border {{{ if filters.assignee }}}btn-primary{{{ else }}}btn-light{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false">
|
|
75
|
+
<span class="filter-label">[[flags:filter-assignee]]</span>
|
|
76
|
+
<span class="caret"></span>
|
|
77
|
+
</a>
|
|
78
|
+
|
|
79
|
+
<ul class="dropdown-menu" style="width: 350px;">
|
|
80
|
+
<li class="px-3 py-1 d-flex flex-column gap-2">
|
|
81
|
+
<input type="text" class="form-control" component="user/filter/search" placeholder="[[search:type-a-username]]">
|
|
82
|
+
<div component="user/filter/selected" class="d-flex flex-wrap gap-2">
|
|
83
|
+
{{{ each selected.assignee }}}
|
|
84
|
+
<div class="d-flex px-2 py-1 rounded-1 text-bg-primary gap-2 align-items-center text-sm">
|
|
85
|
+
{buildAvatar(@value, "16px", true)} {./username}
|
|
86
|
+
<button type="button" component="user/filter/delete" data-uid="{./uid}" class="btn btn-primary btn-sm py-0"><i class="fa fa-times fa-xs"></i></button>
|
|
87
|
+
</div>
|
|
88
|
+
{{{ end }}}
|
|
89
|
+
</div>
|
|
90
|
+
<hr/>
|
|
91
|
+
<div component="user/filter/results" class="d-flex flex-wrap gap-2">
|
|
92
|
+
{{{ each userFilterResults }}}
|
|
93
|
+
<button type="button" class="btn btn-light btn-sm border" data-uid="{./uid}" data-username="{./username}">{buildAvatar(@value, "16px", true)} {./username}</button>
|
|
94
|
+
{{{ end }}}
|
|
95
|
+
</div>
|
|
96
|
+
</li>
|
|
97
|
+
</ul>
|
|
98
|
+
</div>
|
|
74
99
|
</div>
|
|
75
100
|
|
|
76
101
|
<div class="mb-3">
|
|
77
102
|
<label class="form-label" for="filter-targetUid">[[flags:filter-targetUid]]</label>
|
|
78
|
-
<
|
|
103
|
+
<div component="flags/filter/targetUid" class="dropdown" data-filter-name="targetUid">
|
|
104
|
+
<a component="user/filter/button" class="filter-btn btn btn-sm border {{{ if filters.targetUid }}}btn-primary{{{ else }}}btn-light{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false">
|
|
105
|
+
<span class="filter-label">[[flags:filter-targetUid]]</span>
|
|
106
|
+
<span class="caret"></span>
|
|
107
|
+
</a>
|
|
108
|
+
|
|
109
|
+
<ul class="dropdown-menu" style="width: 350px;">
|
|
110
|
+
<li class="px-3 py-1 d-flex flex-column gap-2">
|
|
111
|
+
<input type="text" class="form-control" component="user/filter/search" placeholder="[[search:type-a-username]]">
|
|
112
|
+
<div component="user/filter/selected" class="d-flex flex-wrap gap-2">
|
|
113
|
+
{{{ each selected.targetUid }}}
|
|
114
|
+
<div class="d-flex px-2 py-1 rounded-1 text-bg-primary gap-2 align-items-center text-sm">
|
|
115
|
+
{buildAvatar(@value, "16px", true)} {./username}
|
|
116
|
+
<button type="button" component="user/filter/delete" data-uid="{./uid}" class="btn btn-primary btn-sm py-0"><i class="fa fa-times fa-xs"></i></button>
|
|
117
|
+
</div>
|
|
118
|
+
{{{ end }}}
|
|
119
|
+
</div>
|
|
120
|
+
<hr/>
|
|
121
|
+
<div component="user/filter/results" class="d-flex flex-wrap gap-2">
|
|
122
|
+
{{{ each userFilterResults }}}
|
|
123
|
+
<button type="button" class="btn btn-light btn-sm border" data-uid="{./uid}" data-username="{./username}">{buildAvatar(@value, "16px", true)} {./username}</button>
|
|
124
|
+
{{{ end }}}
|
|
125
|
+
</div>
|
|
126
|
+
</li>
|
|
127
|
+
</ul>
|
|
128
|
+
</div>
|
|
79
129
|
</div>
|
|
80
130
|
|
|
81
131
|
<div class="mb-3">
|
|
82
132
|
<label class="form-label" for="filter-reporterId">[[flags:filter-reporterId]]</label>
|
|
83
|
-
<
|
|
133
|
+
<div component="flags/filter/reporterId" class="dropdown" data-filter-name="reporterId">
|
|
134
|
+
<a component="user/filter/button" class="filter-btn btn btn-sm border {{{ if filters.reporterId }}}btn-primary{{{ else }}}btn-light{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false">
|
|
135
|
+
<span class="filter-label">[[flags:filter-reporterId]]</span>
|
|
136
|
+
<span class="caret"></span>
|
|
137
|
+
</a>
|
|
138
|
+
|
|
139
|
+
<ul class="dropdown-menu" style="width: 350px;">
|
|
140
|
+
<li class="px-3 py-1 d-flex flex-column gap-2">
|
|
141
|
+
<input type="text" class="form-control" component="user/filter/search" placeholder="[[search:type-a-username]]">
|
|
142
|
+
<div component="user/filter/selected" class="d-flex flex-wrap gap-2">
|
|
143
|
+
{{{ each selected.reporterId }}}
|
|
144
|
+
<div class="d-flex px-2 py-1 rounded-1 text-bg-primary gap-2 align-items-center text-sm">
|
|
145
|
+
{buildAvatar(@value, "16px", true)} {./username}
|
|
146
|
+
<button type="button" component="user/filter/delete" data-uid="{./uid}" class="btn btn-primary btn-sm py-0"><i class="fa fa-times fa-xs"></i></button>
|
|
147
|
+
</div>
|
|
148
|
+
{{{ end }}}
|
|
149
|
+
</div>
|
|
150
|
+
<hr/>
|
|
151
|
+
<div component="user/filter/results" class="d-flex flex-wrap gap-2">
|
|
152
|
+
{{{ each userFilterResults }}}
|
|
153
|
+
<button type="button" class="btn btn-light btn-sm border" data-uid="{./uid}" data-username="{./username}">{buildAvatar(@value, "16px", true)} {./username}</button>
|
|
154
|
+
{{{ end }}}
|
|
155
|
+
</div>
|
|
156
|
+
</li>
|
|
157
|
+
</ul>
|
|
158
|
+
</div>
|
|
84
159
|
</div>
|
|
85
160
|
</fieldset>
|
|
86
161
|
|