nodebb-theme-harmony 2.0.0-pre.9 → 2.0.1

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.
Files changed (163) hide show
  1. package/.eslintrc +3 -3
  2. package/README.md +22 -19
  3. package/lib/controllers.js +29 -29
  4. package/library.js +184 -190
  5. package/package.json +48 -48
  6. package/plugin.json +24 -25
  7. package/public/.eslintrc +3 -3
  8. package/public/admin.js +15 -15
  9. package/public/harmony.js +287 -287
  10. package/public/settings.js +31 -31
  11. package/renovate.json +6 -6
  12. package/scss/account.scss +27 -27
  13. package/scss/category.scss +3 -3
  14. package/scss/chats.scss +11 -11
  15. package/scss/common.scss +122 -128
  16. package/scss/fonts.scss +19 -19
  17. package/scss/groups.scss +22 -22
  18. package/scss/harmony.scss +24 -25
  19. package/scss/header.scss +15 -15
  20. package/scss/mixins.scss +183 -176
  21. package/scss/modals.scss +6 -6
  22. package/scss/modules/breadcrumbs.scss +15 -15
  23. package/scss/modules/cover.scss +102 -104
  24. package/scss/modules/filters.scss +7 -7
  25. package/scss/modules/nprogress.scss +80 -80
  26. package/scss/modules/paginator.scss +23 -23
  27. package/scss/modules/tags.scss +5 -5
  28. package/scss/modules/topic-navigator.scss +52 -52
  29. package/scss/modules/topics-list.scss +40 -40
  30. package/scss/modules/user-menu.scss +10 -10
  31. package/scss/overrides.scss +65 -61
  32. package/scss/sidebar.scss +188 -189
  33. package/scss/skins.scss +58 -49
  34. package/scss/status.scss +24 -24
  35. package/scss/topic.scss +130 -138
  36. package/templates/account/blocks.tpl +51 -40
  37. package/templates/account/categories.tpl +63 -63
  38. package/templates/account/consent.tpl +73 -73
  39. package/templates/account/edit/password.tpl +34 -34
  40. package/templates/account/edit/username.tpl +29 -30
  41. package/templates/account/edit.tpl +137 -122
  42. package/templates/account/followers.tpl +14 -14
  43. package/templates/account/following.tpl +15 -15
  44. package/templates/account/groups.tpl +15 -15
  45. package/templates/account/info.tpl +270 -201
  46. package/templates/account/posts.tpl +35 -35
  47. package/templates/account/profile.tpl +92 -95
  48. package/templates/account/read.tpl +1 -0
  49. package/templates/account/sessions.tpl +8 -8
  50. package/templates/account/settings.tpl +236 -236
  51. package/templates/account/shares.tpl +20 -0
  52. package/templates/account/tags.tpl +12 -12
  53. package/templates/account/theme.tpl +63 -63
  54. package/templates/account/topics.tpl +44 -43
  55. package/templates/account/uploads.tpl +37 -37
  56. package/templates/admin/plugins/harmony.tpl +57 -56
  57. package/templates/categories.tpl +29 -29
  58. package/templates/category.tpl +72 -72
  59. package/templates/footer.tpl +17 -17
  60. package/templates/groups/details.tpl +86 -86
  61. package/templates/groups/list.tpl +58 -56
  62. package/templates/groups/members.tpl +9 -9
  63. package/templates/header.tpl +45 -45
  64. package/templates/notifications.tpl +32 -32
  65. package/templates/partials/account/admin-menu.tpl +36 -36
  66. package/templates/partials/account/category-item.tpl +22 -22
  67. package/templates/partials/account/footer.tpl +2 -2
  68. package/templates/partials/account/header.tpl +98 -98
  69. package/templates/partials/account/session-list.tpl +18 -18
  70. package/templates/partials/account/sidebar-left.tpl +116 -102
  71. package/templates/partials/breadcrumbs-json-ld.tpl +16 -26
  72. package/templates/partials/breadcrumbs.tpl +12 -12
  73. package/templates/partials/buttons/newTopic.tpl +22 -22
  74. package/templates/partials/categories/item.tpl +56 -56
  75. package/templates/partials/categories/lastpost.tpl +24 -24
  76. package/templates/partials/categories/link.tpl +4 -4
  77. package/templates/partials/category/subcategory.tpl +18 -18
  78. package/templates/partials/category/tags.tpl +3 -3
  79. package/templates/partials/cookie-consent.tpl +6 -6
  80. package/templates/partials/groups/admin.tpl +95 -95
  81. package/templates/partials/groups/invited.tpl +32 -32
  82. package/templates/partials/groups/list.tpl +15 -15
  83. package/templates/partials/groups/memberlist.tpl +46 -46
  84. package/templates/partials/groups/pending.tpl +29 -29
  85. package/templates/partials/groups/sidebar-left.tpl +27 -27
  86. package/templates/partials/header/brand.tpl +27 -25
  87. package/templates/partials/mobile-footer.tpl +95 -98
  88. package/templates/partials/notifications_list.tpl +44 -44
  89. package/templates/partials/paginator.tpl +46 -46
  90. package/templates/partials/post_bar.tpl +27 -29
  91. package/templates/partials/posts_list.tpl +7 -7
  92. package/templates/partials/posts_list_item.tpl +19 -19
  93. package/templates/partials/quick-search-results.tpl +46 -46
  94. package/templates/partials/search-filters.tpl +183 -183
  95. package/templates/partials/search-results.tpl +54 -54
  96. package/templates/partials/sidebar/chats.tpl +45 -45
  97. package/templates/partials/sidebar/drafts.tpl +63 -63
  98. package/templates/partials/sidebar/logged-in-menu.tpl +22 -22
  99. package/templates/partials/sidebar/logged-out-menu.tpl +44 -44
  100. package/templates/partials/sidebar/notifications.tpl +49 -49
  101. package/templates/partials/sidebar/search-mobile.tpl +28 -28
  102. package/templates/partials/sidebar/search.tpl +30 -30
  103. package/templates/partials/sidebar/user-menu.tpl +103 -103
  104. package/templates/partials/sidebar-left.tpl +39 -42
  105. package/templates/partials/sidebar-right.tpl +16 -16
  106. package/templates/partials/skin-switcher.tpl +50 -50
  107. package/templates/partials/tags_list.tpl +7 -5
  108. package/templates/partials/toast.tpl +19 -19
  109. package/templates/partials/topic/event.tpl +12 -12
  110. package/templates/partials/topic/navigation-post.tpl +9 -9
  111. package/templates/partials/topic/navigator-mobile.tpl +61 -61
  112. package/templates/partials/topic/navigator.tpl +26 -26
  113. package/templates/partials/topic/necro-post.tpl +5 -5
  114. package/templates/partials/topic/post-menu-list.tpl +156 -140
  115. package/templates/partials/topic/post-menu.tpl +4 -30
  116. package/templates/partials/topic/post-placeholder.tpl +14 -14
  117. package/templates/partials/topic/post.tpl +146 -139
  118. package/templates/partials/topic/quickreply.tpl +28 -28
  119. package/templates/partials/topic/reply-button.tpl +26 -24
  120. package/templates/partials/topic/selection-tooltip.tpl +2 -2
  121. package/templates/partials/topic/sort.tpl +27 -27
  122. package/templates/partials/topic/stats.tpl +14 -14
  123. package/templates/partials/topic/thumbs.tpl +4 -4
  124. package/templates/partials/topic/tools.tpl +8 -12
  125. package/templates/partials/topic/topic-menu-list.tpl +73 -73
  126. package/templates/partials/topic/watch.tpl +59 -59
  127. package/templates/partials/topic-filters.tpl +15 -15
  128. package/templates/partials/topic-list-bar.tpl +54 -54
  129. package/templates/partials/topic-terms.tpl +15 -15
  130. package/templates/partials/topics_list.tpl +131 -123
  131. package/templates/partials/users/item.tpl +39 -37
  132. package/templates/partials/users_list.tpl +4 -4
  133. package/templates/partials/users_list_menu.tpl +14 -14
  134. package/templates/popular.tpl +34 -34
  135. package/templates/post-queue.tpl +211 -207
  136. package/templates/recent.tpl +42 -35
  137. package/templates/search.tpl +46 -46
  138. package/templates/tag.tpl +34 -34
  139. package/templates/tags.tpl +49 -49
  140. package/templates/top.tpl +34 -34
  141. package/templates/topic.tpl +123 -130
  142. package/templates/unread.tpl +31 -31
  143. package/templates/users.tpl +39 -39
  144. package/templates/world.tpl +66 -35
  145. package/theme.json +6 -6
  146. package/package-lock.json +0 -2368
  147. package/scss/modules/bottom-sheet.scss +0 -52
  148. package/templates/flags/detail.tpl +0 -179
  149. package/templates/flags/list.tpl +0 -6
  150. package/templates/login.tpl +0 -102
  151. package/templates/partials/category/filter-dropdown-content.tpl +0 -41
  152. package/templates/partials/category/selector-dropdown-content.tpl +0 -39
  153. package/templates/partials/category/sort.tpl +0 -39
  154. package/templates/partials/category/tools.tpl +0 -89
  155. package/templates/partials/category/watch.tpl +0 -67
  156. package/templates/partials/flags/bulk-actions.tpl +0 -9
  157. package/templates/partials/flags/filters.tpl +0 -189
  158. package/templates/partials/flags/results.tpl +0 -38
  159. package/templates/partials/groups/filter-dropdown-content.tpl +0 -25
  160. package/templates/partials/tags/filter-dropdown-content.tpl +0 -38
  161. package/templates/partials/tags/watch.tpl +0 -42
  162. package/templates/partials/users/filter-dropdown-content.tpl +0 -23
  163. package/templates/register.tpl +0 -104
@@ -1,202 +1,271 @@
1
- <!-- IMPORT partials/account/header.tpl -->
2
-
3
- {{{ if sessions.length }}}
4
- <div class="mb-3">
5
- <h4>[[global:sessions]]</h4>
6
- <ul class="list-group" component="user/sessions">
7
- <!-- IMPORT partials/account/session-list.tpl -->
8
- </ul>
9
- </div>
10
- {{{ end }}}
11
-
12
- <div class="row">
13
- <div class="col-sm-6 mb-3">
14
- <div class="card mb-3">
15
- <h5 class="card-header">
16
- [[global:recentips]]
17
- </h5>
18
- <div class="card-body">
19
- <ul>
20
- {{{each ips}}}
21
- <li>{@value}</li>
22
- {{{end}}}
23
- </ul>
24
- </div>
25
- </div>
26
-
27
- <div class="card mb-3">
28
- <h5 class="card-header">
29
- [[user:info.username-history]]
30
- </h5>
31
- <div class="card-body">
32
- <ul class="list-group">
33
- {{{each usernames}}}
34
- <li class="list-group-item">
35
- {../value}
36
- <small class="float-end"><span class="timeago" title="{../timestampISO}"></span></small>
37
- </li>
38
- {{{end}}}
39
- </ul>
40
- </div>
41
- </div>
42
-
43
- <div class="card">
44
- <h5 class="card-header">
45
- [[user:info.email-history]]
46
- </h5>
47
- <div class="card-body">
48
- <ul class="list-group">
49
- {{{each emails}}}
50
- <li class="list-group-item">
51
- {../value}
52
- <small class="float-end"><span class="timeago" title="{../timestampISO}"></span></small>
53
- </li>
54
- {{{end}}}
55
- </ul>
56
- </div>
57
- </div>
58
- </div>
59
- <div class="col-sm-6 mb-3">
60
- <div class="card mb-3">
61
- <h5 class="card-header">
62
- [[user:info.latest-flags]]
63
- </h5>
64
- <div class="card-body">
65
- {{{ if history.flags.length }}}
66
- <ul class="recent-flags list-unstyled">
67
- {{{ each history.flags }}}
68
- <li>
69
- <p>
70
- {{{ if history.flags.targetPurged }}}
71
- <div>[[flags:target-purged]]</div>
72
- {{{ else }}}
73
- <a class="title" href="{config.relative_path}/post/{./pid}">{./title}</a><br />
74
- {{{ end }}}
75
- <span class="timestamp">[[flags:flagged-timeago-readable, {./timestampISO}, {./timestampReadable}]]</span>
76
- </p>
77
- </li>
78
- {{{ end }}}
79
- </ul>
80
- {{{ else }}}
81
- <div class="alert alert-success">[[user:info.no-flags]]</div>
82
- {{{ end }}}
83
- </div>
84
- </div>
85
-
86
- <div class="card mb-3">
87
- <h5 class="card-header">
88
- [[user:info.ban-history]]
89
-
90
- {{{ if (!banned && !isSelf) }}}
91
- <button class="btn btn-sm float-end btn-danger" component="account/ban">[[user:ban-account]]</button>
92
- {{{ end }}}
93
- {{{ if (banned && !isSelf) }}}
94
- <button class="btn btn-sm float-end btn-success" component="account/unban">[[user:unban-account]]</button>
95
- {{{ end }}}
96
- </h5>
97
- <div class="card-body">
98
- {{{ if history.bans.length }}}
99
- <ul class="ban-history list-unstyled">
100
- {{{each history.bans}}}
101
- <li>
102
- <p>
103
- <a href="{config.relative_path}/user/{./user.userslug}">{buildAvatar(./user, "24px", true)}</a>
104
- <strong>
105
- <a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" itemprop="author" data-username="{./user.username}" data-uid="{./user.uid}">{./user.username}</a>
106
- </strong>
107
- <span class="timestamp timeago" title="{./timestampISO}"></span> &mdash; {./timestampReadable}<br />
108
- {{{ if ./until }}}
109
- <span class="expiry">[[user:info.banned-until, {./untilReadable}]]</span><br />
110
- {{{ else }}}
111
- <span class="expiry">[[user:info.banned-permanently]]</span><br />
112
- {{{ end }}}
113
- <span class="reason"><strong>[[user:info.banned-reason-label]]</strong>: {./reason}</span>
114
- </p>
115
- </li>
116
- {{{end}}}
117
- </ul>
118
- {{{ else }}}
119
- <div class="alert alert-success">[[user:info.no-ban-history]]</div>
120
- {{{ end }}}
121
- </div>
122
- </div>
123
-
124
- <div class="card mb-3">
125
- <h5 class="card-header">
126
- [[user:info.mute-history]]
127
-
128
- {{{ if !muted }}}
129
- {{{ if !isSelf }}}
130
- <button class="btn btn-sm float-end btn-danger" component="account/mute">[[user:mute-account]]</button>
131
- {{{ end }}}
132
- {{{ else }}}
133
- {{{ if !isSelf }}}
134
- <button class="btn btn-sm float-end btn-success" component="account/unmute">[[user:unmute-account]]</button>
135
- {{{ end }}}
136
- {{{ end }}}
137
- </h5>
138
- <div class="card-body">
139
- {{{ if history.mutes.length }}}
140
- <ul class="ban-history list-unstyled">
141
- {{{ each history.mutes }}}
142
- <li>
143
- <p>
144
- <a href="{config.relative_path}/user/{./user.userslug}">{buildAvatar(./user, "24px", true)}</a>
145
- <strong>
146
- <a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" itemprop="author" data-username="{./user.username}" data-uid="{./user.uid}">{./user.username}</a>
147
- </strong>
148
- <span class="timestamp timeago" title="{./timestampISO}"></span> &mdash; {./timestampReadable}<br />
149
- {{{ if ./until }}}
150
- <span class="expiry">[[user:info.muted-until, {./untilReadable}]]</span><br />
151
- {{{ end }}}
152
-
153
- <span class="reason"><strong>[[user:info.banned-reason-label]]</strong>: {./reason}</span>
154
- </p>
155
- </li>
156
- {{{ end }}}
157
- </ul>
158
- {{{ else }}}
159
- <div class="alert alert-success">[[user:info.no-mute-history]]</div>
160
- {{{ end }}}
161
- </div>
162
- </div>
163
-
164
- {{{ if isAdminOrGlobalModerator }}}
165
- <div class="card">
166
- <h5 class="card-header">
167
- [[user:info.moderation-note]]
168
- </h5>
169
- <div class="card-body">
170
- <textarea component="account/moderation-note" class="form-control mb-3" aria-label="[[user:info.moderation-note]]"></textarea>
171
-
172
- <button class="btn btn-sm float-end btn-success" component="account/save-moderation-note">[[user:info.moderation-note.add]]</button>
173
- <br/>
174
- <div component="account/moderation-note/list">
175
- {{{ each moderationNotes }}}
176
- <hr/>
177
-
178
- <div>
179
- <a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">{buildAvatar(./user, "24px", true)}</a>
180
- <strong>
181
- <a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" itemprop="author" data-username="{./user.username}" data-uid="{./user.uid}">{./user.username}</a>
182
- </strong>
183
-
184
- <div class="visible-xs-inline-block visible-sm-inline-block visible-md-inline-block visible-lg-inline-block">
185
- <span class="timeago" title="{./timestampISO}"></span>
186
- </div>
187
- <br />
188
-
189
- <div class="content">
190
- {./note}
191
- </div>
192
- </div>
193
- {{{ end }}}
194
- </div>
195
- <!-- IMPORT partials/paginator.tpl -->
196
- </div>
197
- </div>
198
- {{{ end }}}
199
- </div>
200
- </div>
201
-
1
+ <!-- IMPORT partials/account/header.tpl -->
2
+
3
+ {{{ if sessions.length }}}
4
+ <div class="mb-3">
5
+ <h4>[[global:sessions]]</h4>
6
+ <ul class="list-group" component="user/sessions">
7
+ <!-- IMPORT partials/account/session-list.tpl -->
8
+ </ul>
9
+ </div>
10
+ {{{ end }}}
11
+
12
+ <div class="row">
13
+ <div class="col-sm-6 mb-3">
14
+ <div class="card mb-3">
15
+ <h5 class="card-header">
16
+ [[global:recentips]]
17
+ </h5>
18
+ <div class="card-body">
19
+ <ul>
20
+ {{{each ips}}}
21
+ <li>{@value}</li>
22
+ {{{end}}}
23
+ </ul>
24
+ </div>
25
+ </div>
26
+
27
+ <div class="card mb-3">
28
+ <h5 class="card-header">
29
+ [[user:info.username-history]]
30
+ </h5>
31
+ <div class="card-body">
32
+ <ul class="list-unstyled mb-0">
33
+ {{{ each usernames }}}
34
+ <li class="d-flex justify-content-between mb-1">
35
+ <span class="text-sm">{./value}</span>
36
+
37
+ <div>
38
+ {{{ if ./byUid }}}
39
+ <a class="lh-1" href="{{{ if ./byUser.userslug }}}{config.relative_path}/user/{./byUser.userslug}{{{ else }}}#{{{ end }}}">
40
+ {buildAvatar(./byUser, "18px", true)}</a>
41
+ {{{ end }}}
42
+ <span class="timeago text-sm lh-1 align-middle" title="{./timestampISO}"></span>
43
+ </div>
44
+ </li>
45
+ {{{ end }}}
46
+ </ul>
47
+ </div>
48
+ </div>
49
+
50
+ <div class="card mb-3">
51
+ <h5 class="card-header">
52
+ [[user:info.email-history]]
53
+ </h5>
54
+ <div class="card-body">
55
+ <ul class="list-unstyled mb-0">
56
+ {{{ each emails }}}
57
+ <li class="d-flex justify-content-between mb-1">
58
+ <span class="text-sm">{./value}</span>
59
+ <div>
60
+ {{{ if ./byUid }}}
61
+ <a class="lh-1" href="{{{ if ./byUser.userslug }}}{config.relative_path}/user/{./byUser.userslug}{{{ else }}}#{{{ end }}}">
62
+ {buildAvatar(./byUser, "18px", true)}</a>
63
+ {{{ end }}}
64
+ <span class="timeago text-sm lh-1 align-middle" title="{./timestampISO}"></span>
65
+ </div>
66
+ </li>
67
+ {{{ end }}}
68
+ </ul>
69
+ </div>
70
+ </div>
71
+
72
+ {{{ if isAdminOrGlobalModerator }}}
73
+ <div class="card">
74
+ <h5 class="card-header">
75
+ [[user:info.moderation-note]]
76
+ </h5>
77
+ <div class="card-body">
78
+ <textarea component="account/moderation-note" class="form-control mb-3" aria-label="[[user:info.moderation-note]]"></textarea>
79
+
80
+ <button class="btn btn-sm float-end btn-success" component="account/save-moderation-note">[[user:info.moderation-note.add]]</button>
81
+ <br/>
82
+ <div component="account/moderation-note/list">
83
+ {{{ each moderationNotes }}}
84
+ <hr/>
85
+
86
+ <div data-id="{./id}">
87
+ <div class="mb-1">
88
+ <a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">{buildAvatar(./user, "24px", true)}</a>
89
+
90
+ <a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" class="fw-bold" itemprop="author" data-username="{./user.username}" data-uid="{./user.uid}">{./user.username}</a>
91
+
92
+ <span class="timeago" title="{./timestampISO}"></span>
93
+ </div>
94
+
95
+
96
+ <div component="account/moderation-note/content-area" class="d-flex flex-column">
97
+ <div class="content">
98
+ {./note}
99
+ </div>
100
+ <button component="account/moderation-note/edit" class="btn btn-sm btn-link align-self-end">[[topic:edit]]</button>
101
+ </div>
102
+
103
+ <div component="account/moderation-note/edit-area" class="d-flex flex-column gap-2">
104
+ <textarea class="form-control w-100 overflow-hidden">{./rawNote}</textarea>
105
+ <div class="align-self-end">
106
+ <button component="account/moderation-note/cancel-edit" class="btn btn-sm btn-link text-danger align-self-end">[[global:cancel]]</button>
107
+ <button component="account/moderation-note/save-edit" class="btn btn-sm btn-primary align-self-end">[[global:save]]</button>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ {{{ end }}}
112
+ </div>
113
+ <!-- IMPORT partials/paginator.tpl -->
114
+ </div>
115
+ </div>
116
+ {{{ end }}}
117
+ </div>
118
+ <div class="col-sm-6 mb-3">
119
+ <div class="card mb-3">
120
+ <h5 class="card-header">
121
+ [[user:info.latest-flags]]
122
+ </h5>
123
+ <div class="card-body">
124
+ {{{ if history.flags.length }}}
125
+ <ul class="recent-flags list-unstyled">
126
+ {{{ each history.flags }}}
127
+ <li class="mb-4 border-bottom">
128
+ <div class="mb-1 d-flex align-items-center justify-content-between">
129
+ <div>
130
+ {{{ if (./type == "user")}}}
131
+ <span class="badge text-bg-info">[[user:info.profile]]</span>
132
+ {{{ else }}}
133
+ <span class="badge text-bg-info">[[user:info.post]]</span>
134
+ {{{ end }}}
135
+ <span class="timestamp timeago" title="{./timestampISO}"></span>
136
+ </div>
137
+
138
+ <a href="{config.relative_path}/flags/{./flagId}" class="badge badge border border-gray-300 text-body">[[user:info.view-flag]]</a>
139
+ </div>
140
+
141
+ {{{ if (./type == "post") }}}
142
+ <p class="mb-1">
143
+ {{{ if history.flags.targetPurged }}}
144
+ <div>[[flags:target-purged]]</div>
145
+ {{{ else }}}
146
+ <a class="title" href="{config.relative_path}/post/{./pid}">{./title}</a>
147
+ {{{ end }}}
148
+ </p>
149
+ {{{ end }}}
150
+
151
+ <div class="d-flex gap-2 align-items-center mb-3">
152
+ <span class="text-sm">[[user:info.reported-by]]</span>
153
+ <div class="d-flex text-nowrap">
154
+ {{{ each ./reports }}}
155
+ <a style="width: 18px; z-index: 3;" class="text-decoration-none" href="{config.relative_path}/user/{./reporter.userslug}">{buildAvatar(./reporter, "24px", true)}</a>
156
+ {{{ end }}}
157
+ </div>
158
+ </div>
159
+ </li>
160
+ {{{ end }}}
161
+ </ul>
162
+ {{{ else }}}
163
+ <div class="alert alert-success">[[user:info.no-flags]]</div>
164
+ {{{ end }}}
165
+ </div>
166
+ </div>
167
+
168
+ <div class="card mb-3">
169
+ <h5 class="card-header">
170
+ [[user:info.ban-history]]
171
+
172
+ {{{ if (!banned && !isSelf) }}}
173
+ <button class="btn btn-sm float-end btn-danger" component="account/ban">[[user:ban-account]]</button>
174
+ {{{ end }}}
175
+ {{{ if (banned && !isSelf) }}}
176
+ <button class="btn btn-sm float-end btn-success" component="account/unban">[[user:unban-account]]</button>
177
+ {{{ end }}}
178
+ </h5>
179
+ <div class="card-body">
180
+ {{{ if history.bans.length }}}
181
+ <ul class="ban-history list-unstyled">
182
+ {{{ each history.bans }}}
183
+ <li class="mb-4 border-bottom">
184
+ <div class="mb-1 d-flex align-items-center justify-content-between">
185
+ <div>
186
+ <a href="{config.relative_path}/user/{./user.userslug}">{buildAvatar(./user, "24px", true)}</a>
187
+ <strong>
188
+ <a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" itemprop="author" data-username="{./user.username}" data-uid="{./user.uid}">{./user.username}</a>
189
+ </strong>
190
+ <span class="timestamp timeago" title="{./timestampISO}"></span>
191
+ </div>
192
+ {{{ if (./type != "unban") }}}
193
+ <span class="badge text-bg-danger">[[user:banned]]</span>
194
+ {{{ else }}}
195
+ <span class="badge text-bg-success">[[user:unbanned]]</span>
196
+ {{{ end }}}
197
+ </div>
198
+ <p class="mb-1">
199
+ <span class="reason">[[user:info.banned-reason-label]]: <strong>{./reason}</strong></span>
200
+ </p>
201
+ <p>
202
+ {{{ if ./until }}}
203
+ <span class="expiry">[[user:info.banned-until, {isoTimeToLocaleString(./untilISO, config.userLang)}]]</span>
204
+ {{{ else }}}
205
+ {{{ if (./type != "unban") }}}
206
+ <span class="expiry">[[user:info.banned-permanently]]</span>
207
+ {{{ end }}}
208
+ {{{ end }}}
209
+ </p>
210
+ </li>
211
+ {{{ end }}}
212
+ </ul>
213
+ {{{ else }}}
214
+ <div class="alert alert-success">[[user:info.no-ban-history]]</div>
215
+ {{{ end }}}
216
+ </div>
217
+ </div>
218
+
219
+ <div class="card mb-3">
220
+ <h5 class="card-header">
221
+ [[user:info.mute-history]]
222
+
223
+ {{{ if !muted }}}
224
+ {{{ if !isSelf }}}
225
+ <button class="btn btn-sm float-end btn-danger" component="account/mute">[[user:mute-account]]</button>
226
+ {{{ end }}}
227
+ {{{ else }}}
228
+ {{{ if !isSelf }}}
229
+ <button class="btn btn-sm float-end btn-success" component="account/unmute">[[user:unmute-account]]</button>
230
+ {{{ end }}}
231
+ {{{ end }}}
232
+ </h5>
233
+ <div class="card-body">
234
+ {{{ if history.mutes.length }}}
235
+ <ul class="ban-history list-unstyled">
236
+ {{{ each history.mutes }}}
237
+ <li class="mb-4 border-bottom">
238
+ <div class="mb-1 d-flex align-items-center justify-content-between">
239
+ <div>
240
+ <a href="{config.relative_path}/user/{./user.userslug}">{buildAvatar(./user, "24px", true)}</a>
241
+ <strong>
242
+ <a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" itemprop="author" data-username="{./user.username}" data-uid="{./user.uid}">{./user.username}</a>
243
+ </strong>
244
+ <span class="timestamp timeago" title="{./timestampISO}"></span>
245
+ </div>
246
+ {{{ if (./type != "unmute") }}}
247
+ <span class="badge text-bg-danger">[[user:muted]]</span>
248
+ {{{ else }}}
249
+ <span class="badge text-bg-success">[[user:unmuted]]</span>
250
+ {{{ end }}}
251
+ </div>
252
+ <p class="mb-1">
253
+ <span class="reason">[[user:info.banned-reason-label]]: <strong>{./reason}</strong></span>
254
+ </p>
255
+ <p>
256
+ {{{ if ./until }}}
257
+ <span class="expiry">[[user:info.muted-until, {isoTimeToLocaleString(./untilISO, config.userLang)}]]</span>
258
+ {{{ end }}}
259
+ </p>
260
+ </li>
261
+ {{{ end }}}
262
+ </ul>
263
+ {{{ else }}}
264
+ <div class="alert alert-success">[[user:info.no-mute-history]]</div>
265
+ {{{ end }}}
266
+ </div>
267
+ </div>
268
+ </div>
269
+ </div>
270
+
202
271
  <!-- IMPORT partials/account/footer.tpl -->
@@ -1,35 +1,35 @@
1
- <!-- IMPORT partials/account/header.tpl -->
2
-
3
- <div class="d-flex flex-wrap justify-content-between align-items-center gap-2 mb-3">
4
- <h3 class="fw-semibold fs-5 mb-0">[[global:posts]]</h3>
5
- <div class="d-flex flex-wrap gap-1">
6
- <a href="{config.relative_path}/user/{userslug}/posts" class="btn-ghost-sm ff-secondary fw-semibold {{{ if template.account/posts }}}active{{{ end }}}">[[global:header.recent]]</a>
7
- {{{ if !reputation:disabled }}}
8
- <a href="{config.relative_path}/user/{userslug}/best"class="btn-ghost-sm ff-secondary fw-semibold {{{ if template.account/best }}}active{{{ end }}}">[[global:best]]</a>
9
- <a href="{config.relative_path}/user/{userslug}/controversial" class="btn-ghost-sm ff-secondary fw-semibold {{{ if template.account/controversial }}}active{{{ end }}}">[[global:controversial]]</a>
10
- {{{ if canEdit }}}
11
- <a href="{config.relative_path}/user/{userslug}/upvoted" class="btn-ghost-sm ff-secondary fw-semibold {{{ if template.account/upvoted }}}active{{{ end }}}">[[global:upvoted]]</a>
12
- {{{ if !downvote:disabled }}}
13
- <a href="{config.relative_path}/user/{userslug}/downvoted" class="btn-ghost-sm ff-secondary fw-semibold {{{ if template.account/downvoted }}}active{{{ end }}}">[[global:downvoted]]</a>
14
- {{{ end }}}
15
- {{{ end }}}
16
- {{{ end }}}
17
- {{{ if canEdit }}}
18
- <a href="{config.relative_path}/user/{userslug}/bookmarks" class="btn-ghost-sm ff-secondary fw-semibold {{{ if template.account/bookmarks }}}active{{{ end }}}">[[user:bookmarks]]</a>
19
- {{{ end }}}
20
- </div>
21
- </div>
22
-
23
- {{{ if !posts.length }}}
24
- <div class="alert alert-warning text-center">{noItemsFoundKey}</div>
25
- {{{ end }}}
26
-
27
- <div class="">
28
- <!-- IMPORT partials/posts_list.tpl -->
29
-
30
- {{{ if config.usePagination }}}
31
- <!-- IMPORT partials/paginator.tpl -->
32
- {{{ end }}}
33
- </div>
34
-
35
- <!-- IMPORT partials/account/footer.tpl -->
1
+ <!-- IMPORT partials/account/header.tpl -->
2
+
3
+ <div class="d-flex flex-wrap justify-content-between align-items-center gap-2 mb-3">
4
+ <h3 class="fw-semibold fs-5 mb-0">[[global:posts]]</h3>
5
+ <div class="d-flex flex-wrap gap-1">
6
+ <a href="{config.relative_path}/user/{userslug}/posts" class="btn btn-ghost btn-sm ff-secondary fw-semibold {{{ if template.account/posts }}}active{{{ end }}}">[[global:header.recent]]</a>
7
+ {{{ if !reputation:disabled }}}
8
+ <a href="{config.relative_path}/user/{userslug}/best"class="btn btn-ghost btn-sm ff-secondary fw-semibold {{{ if template.account/best }}}active{{{ end }}}">[[global:best]]</a>
9
+ <a href="{config.relative_path}/user/{userslug}/controversial" class="btn btn-ghost btn-sm ff-secondary fw-semibold {{{ if template.account/controversial }}}active{{{ end }}}">[[global:controversial]]</a>
10
+ {{{ if canEdit }}}
11
+ <a href="{config.relative_path}/user/{userslug}/upvoted" class="btn btn-ghost btn-sm ff-secondary fw-semibold {{{ if template.account/upvoted }}}active{{{ end }}}">[[global:upvoted]]</a>
12
+ {{{ if !downvote:disabled }}}
13
+ <a href="{config.relative_path}/user/{userslug}/downvoted" class="btn btn-ghost btn-sm ff-secondary fw-semibold {{{ if template.account/downvoted }}}active{{{ end }}}">[[global:downvoted]]</a>
14
+ {{{ end }}}
15
+ {{{ end }}}
16
+ {{{ end }}}
17
+ {{{ if canEdit }}}
18
+ <a href="{config.relative_path}/user/{userslug}/bookmarks" class="btn btn-ghost btn-sm ff-secondary fw-semibold {{{ if template.account/bookmarks }}}active{{{ end }}}">[[user:bookmarks]]</a>
19
+ {{{ end }}}
20
+ </div>
21
+ </div>
22
+
23
+ {{{ if !posts.length }}}
24
+ <div class="alert alert-warning text-center">{noItemsFoundKey}</div>
25
+ {{{ end }}}
26
+
27
+ <div>
28
+ <!-- IMPORT partials/posts_list.tpl -->
29
+
30
+ {{{ if config.usePagination }}}
31
+ <!-- IMPORT partials/paginator.tpl -->
32
+ {{{ end }}}
33
+ </div>
34
+
35
+ <!-- IMPORT partials/account/footer.tpl -->