nodebb-theme-persona 12.0.2 → 12.0.5

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-persona",
3
- "version": "12.0.2",
3
+ "version": "12.0.5",
4
4
  "nbbpm": {
5
5
  "compatibility": "^2.0.0"
6
6
  },
package/public/persona.js CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  $(document).ready(function () {
4
4
  setupNProgress();
5
+ setupTaskbar();
5
6
  setupEditedByIcon();
7
+ setupMobileMenu();
6
8
  setupQuickReply();
7
9
  configureNavbarHiding();
8
10
  updatePanelOffset();
@@ -10,13 +12,7 @@ $(document).ready(function () {
10
12
  $(window).on('resize', utils.debounce(configureNavbarHiding, 200));
11
13
  $(window).on('resize', updatePanelOffset);
12
14
 
13
- $(window).on('action:app.load', function () {
14
- setupTaskbar();
15
- setupMobileMenu();
16
- });
17
-
18
15
  function updatePanelOffset() {
19
- var env = utils.findBootstrapEnvironment();
20
16
  const headerEl = document.getElementById('header-menu');
21
17
 
22
18
  if (!headerEl) {
@@ -146,6 +146,49 @@
146
146
  <!-- ENDIF history.bans.length -->
147
147
  </div>
148
148
  </div>
149
+
150
+ <div class="panel panel-default">
151
+ <div class="panel-heading">
152
+ <h3 class="panel-title">
153
+ [[user:info.mute-history]]
154
+
155
+ {{{ if !muted }}}
156
+ {{{ if !isSelf }}}
157
+ <button class="btn btn-xs pull-right btn-danger" component="account/mute">[[user:mute_account]]</button>
158
+ {{{ end }}}
159
+ {{{ else }}}
160
+ {{{ if !isSelf }}}
161
+ <button class="btn btn-xs pull-right btn-success" component="account/unmute">[[user:unmute_account]]</button>
162
+ {{{ end }}}
163
+ {{{ end }}}
164
+ </h3>
165
+ </div>
166
+ <div class="panel-body">
167
+ {{{ if history.mutes.length }}}
168
+ <ul class="ban-history">
169
+ {{{ each history.mutes }}}
170
+ <li>
171
+ <p>
172
+ <a href="{config.relative_path}/user/{history.mutes.user.userslug}">{buildAvatar(history.mutes.user, "sm", true)}</a>
173
+ <strong>
174
+ <a href="<!-- IF history.mutes.user.userslug -->{config.relative_path}/user/{history.mutes.user.userslug}<!-- ELSE -->#<!-- ENDIF history.mutes.user.userslug -->" itemprop="author" data-username="{history.mutes.user.username}" data-uid="{history.mutes.user.uid}">{history.mutes.user.username}</a>
175
+ </strong>
176
+ <span class="timestamp timeago" title="{../timestampISO}"></span> &mdash; {../timestampReadable}<br />
177
+ {{{ if ../until }}}
178
+ <span class="expiry">[[user:info.muted-until, {../untilReadable}]]</span><br />
179
+ {{{ end }}}
180
+
181
+ <span class="reason"><strong>[[user:info.banned-reason-label]]</strong>: {../reason}</span>
182
+ </p>
183
+ </li>
184
+ {{{end}}}
185
+ </ul>
186
+ {{{ else }}}
187
+ <div class="alert alert-success">[[user:info.no-mute-history]]</div>
188
+ {{{ end }}}
189
+ </div>
190
+ </div>
191
+
149
192
  <!-- IF isAdminOrGlobalModerator -->
150
193
  <div class="panel panel-default">
151
194
  <div class="panel-heading">
@@ -147,7 +147,14 @@
147
147
  <li><a href="#" data-action="chat">[[flags:start-new-chat]]</a></li>
148
148
  {{{ end }}}
149
149
  <li role="separator" class="divider"></li>
150
- {{{ if privileges.ban }}}<li><a href="#" data-action="ban">[[user:ban_account]]</a></li>{{{ end }}}
150
+ {{{ if privileges.ban }}}
151
+ <li class="{{{ if target.user.banned }}}hidden{{{ end }}}"><a href="#" data-action="ban">[[user:ban_account]]</a></li>
152
+ <li class="{{{ if !target.user.banned }}}hidden{{{ end }}}"><a href="#" data-action="unban">[[user:unban_account]]</a></li>
153
+ {{{ end }}}
154
+ {{{ if privileges.mute}}}
155
+ <li class="{{{ if target.user.muted }}}hidden{{{ end }}}"><a href="#" data-action="mute">[[user:mute_account]]</a></li>
156
+ <li class="{{{ if !target.user.muted }}}hidden{{{ end }}}"><a href="#" data-action="unmute">[[user:unmute_account]]</a></li>
157
+ {{{ end }}}
151
158
  {{{ if privileges.admin:users }}}
152
159
  <li><a href="#" data-action="delete-account">[[user:delete_account_as_admin]]</a></li>
153
160
  <li><a href="#" data-action="delete-content">[[user:delete_content]]</a></li>
@@ -0,0 +1 @@
1
+ <!-- This partial intentionally left blank; overwritten by nodebb-plugin-browsing-users -->