nodebb-theme-persona 13.3.12 → 13.3.14

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": "13.3.12",
3
+ "version": "13.3.14",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.7.0"
6
6
  },
@@ -5,15 +5,22 @@
5
5
  <div class="dropdown">
6
6
  <input class="form-control" type="text" id="user-search" placeholder="[[users:enter-username]]" data-bs-toggle="dropdown" autocomplete="off" aria-haspopup="true" aria-expanded="false"/>
7
7
 
8
- <ul class="dropdown-menu block-edit list-unstyled" role="menu">
9
- <li><a href="#" class="dropdown-item" role="menuitem">[[admin/menu:search.start-typing]]</a></li>
8
+ <ul component="blocks/search/list" class="dropdown-menu block-edit list-unstyled" role="menu">
9
+ <li component="blocks/start-typing">
10
+ <a href="#" class="dropdown-item" role="menuitem">[[admin/menu:search.start-typing]]</a>
11
+ </li>
12
+ <li component="blocks/no-users" class="hidden">
13
+ <a href="#" class="dropdown-item role="menuitem">[[users:no-users-found]]</a>
14
+ </li>
10
15
  {{{ each edit }}}
11
- <li class="">
16
+ <li component="blocks/search/match">
12
17
  <div class="dropdown-item d-flex flex-nowrap gap-2 justify-content-between" role="menuitem">
13
18
  <div class="text-truncate">
14
19
  <a href="{config.relative_path}/uid/{../uid}">{buildAvatar(edit, "24px", true)} {../username}</a>
15
20
  </div>
16
- <button class="btn btn-sm btn-primary text-nowrap" data-uid="{../uid}" data-action="toggle">[[user:block-toggle]]</button>
21
+
22
+ <button class="btn btn-sm btn-outline-danger text-nowrap {{{ if ./isBlocked }}}hidden{{{ end }}}" data-uid="{./uid}" data-action="block">[[user:block-user]]</button>
23
+ <button class="btn btn-sm btn-outline-primary text-nowrap {{{ if !./isBlocked }}}hidden{{{ end }}}" data-uid="{./uid}" data-action="unblock">[[user:unblock-user]]</button>
17
24
  </div>
18
25
  </li>
19
26
  {{{ end }}}
@@ -23,8 +30,14 @@
23
30
  </div>
24
31
 
25
32
  <div class="users row">
26
- <div class="col-12">
27
- <!-- IMPORT partials/users_list.tpl -->
33
+ <div id="users-container" class="users-container list-unstyled d-flex flex-wrap gap-2">
34
+ {{{ each users }}}
35
+ <div class="d-flex flex-column gap-1">
36
+ <!-- IMPORT partials/users/item.tpl -->
37
+ <button class="btn btn-sm btn-outline-primary text-nowrap mx-auto" data-uid="{./uid}" data-action="unblock">[[user:unblock-user]]</button>
38
+ </div>
39
+ {{{ end }}}
40
+
28
41
  <div class="alert alert-warning text-center"<!-- IF users.length --> style="display: none;"<!-- END -->>[[user:has-no-blocks]]</div>
29
42
  <!-- IMPORT partials/paginator.tpl -->
30
43
  </div>
@@ -91,7 +91,7 @@
91
91
  {{{ else }}}
92
92
  <a class="title" href="{config.relative_path}/post/{../pid}">{../title}</a><br />
93
93
  {{{ end }}}
94
- <span class="timestamp">[[flags:flagged-timeago-readable, {../timestampISO}, {../timestampReadable}]]</span>
94
+ <span class="timestamp">[[flags:flagged-timeago-readable, {../timestampISO}, {isoTimeToLocaleString(./timestampISO, config.userLang)}]]</span>
95
95
  </p>
96
96
  </li>
97
97
  {{{end}}}
@@ -126,9 +126,9 @@
126
126
  <strong>
127
127
  <a href="<!-- IF history.bans.user.userslug -->{config.relative_path}/user/{history.bans.user.userslug}<!-- ELSE -->#<!-- ENDIF history.bans.user.userslug -->" itemprop="author" data-username="{history.bans.user.username}" data-uid="{history.bans.user.uid}">{history.bans.user.username}</a>
128
128
  </strong>
129
- <span class="timestamp timeago" title="{../timestampISO}"></span> &mdash; {../timestampReadable}<br />
129
+ <span class="timestamp timeago" title="{../timestampISO}"></span> &mdash; {isoTimeToLocaleString(./timestampISO, config.userLang)}<br />
130
130
  <!-- IF ../until -->
131
- <span class="expiry">[[user:info.banned-until, {../untilReadable}]]</span><br />
131
+ <span class="expiry">[[user:info.banned-until, isoTimeToLocaleString{./untilISO, config.userLang)}]]</span><br />
132
132
  <!-- ELSE -->
133
133
  <span class="expiry">[[user:info.banned-permanently]]</span><br />
134
134
  <!-- ENDIF ../until -->
@@ -167,9 +167,9 @@
167
167
  <strong>
168
168
  <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>
169
169
  </strong>
170
- <span class="timestamp timeago" title="{../timestampISO}"></span> &mdash; {../timestampReadable}<br />
170
+ <span class="timestamp timeago" title="{../timestampISO}"></span> &mdash; {isoTimeToLocaleString(./timestampISO, config.userLang)}<br />
171
171
  {{{ if ../until }}}
172
- <span class="expiry">[[user:info.muted-until, {../untilReadable}]]</span><br />
172
+ <span class="expiry">[[user:info.muted-until, {isoTimeToLocaleString(./untilISO, config.userLang)}]]</span><br />
173
173
  {{{ end }}}
174
174
 
175
175
  <span class="reason"><strong>[[user:info.banned-reason-label]]</strong>: {../reason}</span>
@@ -0,0 +1,44 @@
1
+ <li class="users-box registered-user text-center pb-3" data-uid="{users.uid}" style="width: 102px;">
2
+ <a href="{config.relative_path}/user/{users.userslug}">{buildAvatar(users, "64px", true)}</a>
3
+
4
+ <div class="user-info">
5
+ <div class="text-nowrap text-truncate">
6
+ <span>
7
+ <i component="user/status" class="fa fa-circle status {users.status}" title="[[global:{users.status}]]"></i>
8
+ <a href="{config.relative_path}/user/{users.userslug}">{users.username}</a>
9
+ </span>
10
+ </div>
11
+ <!-- IF section_online -->
12
+ <div class="lastonline">
13
+ <span class="timeago" title="{users.lastonlineISO}"></span>
14
+ </div>
15
+ <!-- ENDIF section_online -->
16
+
17
+ <!-- IF section_joindate -->
18
+ <div class="joindate">
19
+ <span class="timeago" title="{users.joindateISO}"></span>
20
+ </div>
21
+ <!-- ENDIF section_joindate -->
22
+
23
+ <!-- IF section_sort-reputation -->
24
+ <div class="reputation">
25
+ <i class="fa fa-star"></i>
26
+ <span>{formattedNumber(users.reputation)}</span>
27
+ </div>
28
+ <!-- ENDIF section_sort-reputation -->
29
+
30
+ <!-- IF section_sort-posts -->
31
+ <div class="post-count">
32
+ <i class="fa fa-pencil"></i>
33
+ <span>{formattedNumber(users.postcount)}</span>
34
+ </div>
35
+ <!-- ENDIF section_sort-posts -->
36
+
37
+ <!-- IF section_flagged -->
38
+ <div class="flag-count">
39
+ <i class="fa fa-flag"></i>
40
+ <span><a href="{config.relative_path}/flags?targetUid={users.uid}">{users.flags}</a></span>
41
+ </div>
42
+ <!-- ENDIF section_flagged -->
43
+ </div>
44
+ </li>
@@ -1,49 +1,6 @@
1
1
  <ul id="users-container" class="users-container list-unstyled d-flex flex-wrap gap-2">
2
2
  {{{each users}}}
3
- <li class="users-box registered-user text-center pb-3" data-uid="{users.uid}" style="width: 102px;">
4
- <a href="{config.relative_path}/user/{users.userslug}">{buildAvatar(users, "64px", true)}</a>
5
-
6
- <div class="user-info">
7
- <div class="text-nowrap text-truncate">
8
- <span>
9
- <i component="user/status" class="fa fa-circle status {users.status}" title="[[global:{users.status}]]"></i>
10
- <a href="{config.relative_path}/user/{users.userslug}">{users.username}</a>
11
- </span>
12
- </div>
13
- <!-- IF section_online -->
14
- <div class="lastonline">
15
- <span class="timeago" title="{users.lastonlineISO}"></span>
16
- </div>
17
- <!-- ENDIF section_online -->
18
-
19
- <!-- IF section_joindate -->
20
- <div class="joindate">
21
- <span class="timeago" title="{users.joindateISO}"></span>
22
- </div>
23
- <!-- ENDIF section_joindate -->
24
-
25
- <!-- IF section_sort-reputation -->
26
- <div class="reputation">
27
- <i class="fa fa-star"></i>
28
- <span>{formattedNumber(users.reputation)}</span>
29
- </div>
30
- <!-- ENDIF section_sort-reputation -->
31
-
32
- <!-- IF section_sort-posts -->
33
- <div class="post-count">
34
- <i class="fa fa-pencil"></i>
35
- <span>{formattedNumber(users.postcount)}</span>
36
- </div>
37
- <!-- ENDIF section_sort-posts -->
38
-
39
- <!-- IF section_flagged -->
40
- <div class="flag-count">
41
- <i class="fa fa-flag"></i>
42
- <span><a href="{config.relative_path}/flags?targetUid={users.uid}">{users.flags}</a></span>
43
- </div>
44
- <!-- ENDIF section_flagged -->
45
- </div>
46
- </li>
3
+ <!-- IMPORT partials/users/item.tpl -->
47
4
  {{{end}}}
48
5
  <!-- IF anonymousUserCount -->
49
6
  <li class="users-box anon-user text-center pb-3" style="width: 102px;">