nodebb-theme-harmony 1.0.0 → 1.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 (155) hide show
  1. package/README.md +12 -1
  2. package/languages/en-GB/harmony.json +6 -1
  3. package/library.js +56 -25
  4. package/package.json +1 -1
  5. package/plugin.json +0 -1
  6. package/public/harmony.js +165 -41
  7. package/public/settings.js +1 -0
  8. package/screenshots/categories.png +0 -0
  9. package/screenshots/recent.png +0 -0
  10. package/screenshots/topic.png +0 -0
  11. package/scss/account.scss +1 -1
  12. package/scss/chats.scss +81 -26
  13. package/scss/common.scss +84 -10
  14. package/scss/flags.scss +5 -0
  15. package/scss/groups.scss +2 -2
  16. package/scss/harmony.scss +3 -0
  17. package/scss/mixins.scss +7 -3
  18. package/scss/modals.scss +5 -3
  19. package/scss/modules/bottom-sheet.scss +1 -1
  20. package/scss/modules/composer.scss +0 -4
  21. package/scss/modules/cover.scss +1 -11
  22. package/scss/modules/filters.scss +8 -0
  23. package/scss/modules/paginator.scss +24 -0
  24. package/scss/modules/tags.scss +2 -2
  25. package/scss/modules/topic-navigator.scss +18 -42
  26. package/scss/modules/topics-list.scss +32 -17
  27. package/scss/modules/user-menu.scss +6 -0
  28. package/scss/overrides.scss +4 -1
  29. package/scss/sidebar.scss +61 -8
  30. package/scss/topic.scss +36 -13
  31. package/templates/account/blocks.tpl +35 -40
  32. package/templates/account/categories.tpl +47 -29
  33. package/templates/account/consent.tpl +66 -10
  34. package/templates/account/edit/password.tpl +25 -30
  35. package/templates/account/edit/username.tpl +21 -26
  36. package/templates/account/edit.tpl +105 -116
  37. package/templates/account/followers.tpl +12 -19
  38. package/templates/account/following.tpl +12 -18
  39. package/templates/account/groups.tpl +12 -17
  40. package/templates/account/info.tpl +178 -206
  41. package/templates/account/posts.tpl +31 -36
  42. package/templates/account/profile.tpl +82 -72
  43. package/templates/account/sessions.tpl +8 -30
  44. package/templates/account/settings.tpl +222 -203
  45. package/templates/account/theme.tpl +39 -25
  46. package/templates/account/topics.tpl +36 -38
  47. package/templates/account/uploads.tpl +33 -40
  48. package/templates/admin/plugins/harmony.tpl +21 -3
  49. package/templates/categories.tpl +3 -6
  50. package/templates/category.tpl +13 -14
  51. package/templates/chats.tpl +9 -10
  52. package/templates/flags/detail.tpl +160 -193
  53. package/templates/flags/list.tpl +3 -70
  54. package/templates/footer.tpl +2 -2
  55. package/templates/groups/details.tpl +22 -19
  56. package/templates/groups/list.tpl +1 -1
  57. package/templates/groups/members.tpl +0 -2
  58. package/templates/header.tpl +2 -2
  59. package/templates/login.tpl +4 -4
  60. package/templates/notifications.tpl +5 -5
  61. package/templates/partials/account/admin-menu.tpl +9 -9
  62. package/templates/partials/account/category-item.tpl +14 -17
  63. package/templates/partials/account/footer.tpl +3 -0
  64. package/templates/partials/account/header.tpl +78 -81
  65. package/templates/partials/account/session-list.tpl +18 -0
  66. package/templates/partials/account/sidebar-left.tpl +31 -25
  67. package/templates/partials/breadcrumbs.tpl +6 -6
  68. package/templates/partials/buttons/newTopic.tpl +1 -1
  69. package/templates/partials/categories/item.tpl +31 -27
  70. package/templates/partials/categories/lastpost.tpl +7 -7
  71. package/templates/partials/category/filter-dropdown-content.tpl +37 -0
  72. package/templates/partials/{category-selector-content.tpl → category/selector-dropdown-content.tpl} +7 -7
  73. package/templates/partials/category/sort.tpl +22 -7
  74. package/templates/partials/category/subcategory.tpl +2 -3
  75. package/templates/partials/category/tags.tpl +0 -2
  76. package/templates/partials/category/tools.tpl +28 -25
  77. package/templates/partials/category/watch.tpl +39 -6
  78. package/templates/partials/chats/dropdown.tpl +4 -1
  79. package/templates/partials/chats/message-window.tpl +12 -8
  80. package/templates/partials/chats/message.tpl +8 -10
  81. package/templates/partials/chats/options.tpl +14 -6
  82. package/templates/partials/chats/recent_room.tpl +41 -32
  83. package/templates/partials/cookie-consent.tpl +5 -5
  84. package/templates/partials/flags/bulk-actions.tpl +9 -0
  85. package/templates/partials/flags/filters.tpl +165 -78
  86. package/templates/partials/flags/results.tpl +38 -0
  87. package/templates/partials/groups/admin.tpl +4 -4
  88. package/templates/partials/groups/badge.tpl +1 -1
  89. package/templates/partials/groups/invited.tpl +1 -1
  90. package/templates/partials/groups/list.tpl +2 -2
  91. package/templates/partials/groups/memberlist.tpl +2 -2
  92. package/templates/partials/groups/sidebar-left.tpl +10 -10
  93. package/templates/partials/header/brand.tpl +9 -2
  94. package/templates/partials/mobile-footer.tpl +69 -61
  95. package/templates/partials/notifications_list.tpl +11 -8
  96. package/templates/partials/paginator.tpl +11 -9
  97. package/templates/partials/post_bar.tpl +26 -24
  98. package/templates/partials/posts_list_item.tpl +5 -5
  99. package/templates/partials/quick-search-results.tpl +3 -3
  100. package/templates/partials/search-filters.tpl +184 -0
  101. package/templates/partials/search-results.tpl +28 -35
  102. package/templates/partials/sidebar/chats.tpl +26 -34
  103. package/templates/partials/sidebar/drafts.tpl +45 -34
  104. package/templates/partials/sidebar/logged-in-menu.tpl +5 -5
  105. package/templates/partials/sidebar/logged-out-menu.tpl +1 -1
  106. package/templates/partials/sidebar/notifications.tpl +30 -9
  107. package/templates/partials/sidebar/search-mobile.tpl +1 -1
  108. package/templates/partials/sidebar/search.tpl +1 -1
  109. package/templates/partials/sidebar/user-menu.tpl +38 -29
  110. package/templates/partials/sidebar-left.tpl +14 -11
  111. package/templates/partials/sidebar-right.tpl +1 -3
  112. package/templates/partials/skin-switcher.tpl +3 -3
  113. package/templates/partials/tags/filter-dropdown-content.tpl +34 -0
  114. package/templates/partials/tags_list.tpl +4 -4
  115. package/templates/partials/topic/browsing-users.tpl +0 -2
  116. package/templates/partials/topic/event.tpl +1 -1
  117. package/templates/partials/topic/navigation-post.tpl +5 -9
  118. package/templates/partials/topic/navigator-mobile.tpl +62 -0
  119. package/templates/partials/topic/navigator.tpl +23 -17
  120. package/templates/partials/topic/post-editor.tpl +0 -2
  121. package/templates/partials/topic/post-menu-list.tpl +60 -62
  122. package/templates/partials/topic/post-menu.tpl +16 -11
  123. package/templates/partials/topic/post.tpl +45 -27
  124. package/templates/partials/topic/quickreply.tpl +8 -8
  125. package/templates/partials/topic/reply-button.tpl +7 -7
  126. package/templates/partials/topic/sort.tpl +17 -5
  127. package/templates/partials/topic/tools.tpl +2 -2
  128. package/templates/partials/topic/topic-menu-list.tpl +22 -24
  129. package/templates/partials/topic/watch.tpl +42 -9
  130. package/templates/partials/topic-filters.tpl +6 -3
  131. package/templates/partials/topic-list-bar.tpl +50 -46
  132. package/templates/partials/topic-terms.tpl +6 -3
  133. package/templates/partials/topics_list.tpl +88 -93
  134. package/templates/partials/userFilter-placeholders.tpl +5 -0
  135. package/templates/partials/users/filter-dropdown-content.tpl +23 -0
  136. package/templates/partials/users/item.tpl +25 -27
  137. package/templates/partials/users_list.tpl +1 -1
  138. package/templates/popular.tpl +3 -1
  139. package/templates/post-queue.tpl +166 -0
  140. package/templates/recent.tpl +3 -2
  141. package/templates/register.tpl +4 -4
  142. package/templates/search.tpl +39 -177
  143. package/templates/tags.tpl +3 -3
  144. package/templates/top.tpl +3 -1
  145. package/templates/topic.tpl +74 -68
  146. package/templates/unread.tpl +3 -1
  147. package/templates/users.tpl +7 -3
  148. package/templates/modules/usercard.tpl +0 -39
  149. package/templates/partials/acceptTos.tpl +0 -11
  150. package/templates/partials/category-filter-content.tpl +0 -30
  151. package/templates/partials/category-filter-right.tpl +0 -5
  152. package/templates/partials/category-filter.tpl +0 -3
  153. package/templates/partials/category-selector-right.tpl +0 -5
  154. package/templates/partials/category-selector.tpl +0 -3
  155. package/templates/partials/slideout-menu.tpl +0 -6
@@ -1,22 +1,15 @@
1
- <div class="account">
2
- <!-- IMPORT partials/account/header.tpl -->
1
+ <!-- IMPORT partials/account/header.tpl -->
2
+ <h3 class="fw-semibold fs-5">[[pages:{template.name}, {username}]]</h3>
3
3
 
4
- <div class="d-flex flex-column flex-md-row">
5
- <!-- IMPORT partials/account/sidebar-left.tpl -->
6
- <div class="flex-1 ps-md-2 ps-lg-5" style="min-width: 0;">
7
- <h3 class="fw-semibold fs-5">[[pages:{template.name}, {username}]]</h3>
4
+ {{{ if !users.length }}}
5
+ <div class="alert alert-warning text-center">[[user:has_no_follower]]</div>
6
+ {{{ end }}}
8
7
 
9
- {{{ if !users.length }}}
10
- <div class="alert alert-warning text-center">[[user:has_no_follower]]</div>
11
- {{{ end }}}
8
+ <div class="row row-cols-2 row-cols-lg-3 row-cols-xl-4 g-4">
9
+ {{{ each users }}}
10
+ <!-- IMPORT partials/users/item.tpl -->
11
+ {{{end}}}
12
+ </div>
12
13
 
13
- <div class="row row-cols-2 row-cols-lg-3 row-cols-xl-4 g-2">
14
- {{{ each users }}}
15
- <!-- IMPORT partials/users/item.tpl -->
16
- {{{end}}}
17
- </div>
18
-
19
- <!-- IMPORT partials/paginator.tpl -->
20
- </div>
21
- </div>
22
- </div>
14
+ <!-- IMPORT partials/paginator.tpl -->
15
+ <!-- IMPORT partials/account/footer.tpl -->
@@ -1,22 +1,16 @@
1
- <div class="account">
2
- <!-- IMPORT partials/account/header.tpl -->
1
+ <!-- IMPORT partials/account/header.tpl -->
3
2
 
4
- <div class="d-flex flex-column flex-md-row">
5
- <!-- IMPORT partials/account/sidebar-left.tpl -->
6
- <div class="flex-1 ps-md-2 ps-lg-5" style="min-width: 0;">
7
- <h3 class="fw-semibold fs-5">[[pages:{template.name}, {username}]]</h3>
3
+ <h3 class="fw-semibold fs-5">[[pages:{template.name}, {username}]]</h3>
8
4
 
9
- {{{ if !users.length }}}
10
- <div class="alert alert-warning text-center">[[user:follows_no_one]]</div>
11
- {{{ end }}}
5
+ {{{ if !users.length }}}
6
+ <div class="alert alert-warning text-center">[[user:follows_no_one]]</div>
7
+ {{{ end }}}
12
8
 
13
- <div class="row row-cols-2 row-cols-lg-3 row-cols-xl-4 g-2">
14
- {{{ each users }}}
15
- <!-- IMPORT partials/users/item.tpl -->
16
- {{{end}}}
17
- </div>
9
+ <div class="row row-cols-2 row-cols-lg-3 row-cols-xl-4 g-4">
10
+ {{{ each users }}}
11
+ <!-- IMPORT partials/users/item.tpl -->
12
+ {{{end}}}
13
+ </div>
18
14
 
19
- <!-- IMPORT partials/paginator.tpl -->
20
- </div>
21
- </div>
22
- </div>
15
+ <!-- IMPORT partials/paginator.tpl -->
16
+ <!-- IMPORT partials/account/footer.tpl -->
@@ -1,20 +1,15 @@
1
- <div class="account">
2
- <!-- IMPORT partials/account/header.tpl -->
1
+ <!-- IMPORT partials/account/header.tpl -->
3
2
 
4
- <div class="d-flex flex-column flex-md-row">
5
- <!-- IMPORT partials/account/sidebar-left.tpl -->
6
- <div class="flex-1 ps-md-2 ps-lg-5" style="min-width: 0;">
7
- <h3 class="fw-semibold fs-5">[[pages:{template.name}, {username}]]</h3>
3
+ <h3 class="fw-semibold fs-5">[[pages:{template.name}, {username}]]</h3>
8
4
 
9
- <div class="groups">
10
- <div component="groups/container" id="groups-list" class="row">
11
- {{{ if !groups.length }}}
12
- <div class="alert alert-warning text-center">[[groups:no_groups_found]]</div>
13
- {{{ else }}}
14
- <!-- IMPORT partials/groups/list.tpl -->
15
- {{{ end }}}
16
- </div>
17
- </div>
18
- </div>
5
+ <div class="groups">
6
+ <div component="groups/container" id="groups-list" class="row">
7
+ {{{ if !groups.length }}}
8
+ <div class="alert alert-warning text-center">[[groups:no_groups_found]]</div>
9
+ {{{ else }}}
10
+ <!-- IMPORT partials/groups/list.tpl -->
11
+ {{{ end }}}
19
12
  </div>
20
- </div>
13
+ </div>
14
+
15
+ <!-- IMPORT partials/account/footer.tpl -->
@@ -1,230 +1,202 @@
1
- <div class="account">
2
- <!-- IMPORT partials/account/header.tpl -->
1
+ <!-- IMPORT partials/account/header.tpl -->
3
2
 
4
- <div class="d-flex flex-column flex-md-row">
5
- <!-- IMPORT partials/account/sidebar-left.tpl -->
6
- <div class="flex-1 ps-md-2 ps-lg-5" style="min-width: 0;">
7
- {{{ if sessions.length }}}
8
- <div class="mb-3">
9
- <h4>[[global:sessions]]</h4>
10
- <ul class="list-group" component="user/sessions">
11
- {{{each sessions}}}
12
- <li class="list-group-item" data-uuid="{../uuid}">
13
- <div class="float-end">
14
- <!-- IF isSelfOrAdminOrGlobalModerator -->
15
- <!-- IF !../current -->
16
- <button class="btn btn-sm btn-outline-secondary" type="button" data-action="revokeSession">Revoke Session</button>
17
- <!-- ENDIF !../current -->
18
- <!-- ENDIF isSelfOrAdminOrGlobalModerator -->
19
- {function.userAgentIcons}
20
- <i class="fa fa-circle text-<!-- IF ../current -->success<!-- ELSE -->muted<!-- ENDIF ../current -->"></i>
21
- </div>
22
- {../browser} {../version} on {../platform}<br />
23
- <small class="timeago text-muted" title="{../datetimeISO}"></small>
24
- <ul>
25
- <li><strong>[[global:ip_address]]</strong>: {../ip}</li>
26
- </ul>
27
- </li>
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>
28
22
  {{{end}}}
29
23
  </ul>
30
24
  </div>
31
- {{{ end }}}
32
-
33
- <div class="row">
34
- <div class="col-sm-6 mb-3">
35
- <div class="card mb-3">
36
- <h5 class="card-header">
37
- [[global:recentips]]
38
- </h5>
39
- <div class="card-body">
40
- <ul>
41
- {{{each ips}}}
42
- <li>{@value}</li>
43
- {{{end}}}
44
- </ul>
45
- </div>
46
- </div>
47
-
48
- <div class="card mb-3">
49
- <h5 class="card-header">
50
- [[user:info.username-history]]
51
- </h5>
52
- <div class="card-body">
53
- <ul class="list-group">
54
- {{{each usernames}}}
55
- <li class="list-group-item">
56
- {../value}
57
- <small class="float-end"><span class="timeago" title="{../timestampISO}"></span></small>
58
- </li>
59
- {{{end}}}
60
- </ul>
61
- </div>
62
- </div>
63
-
64
- <div class="card">
65
- <h5 class="card-header">
66
- [[user:info.email-history]]
67
- </h5>
68
- <div class="card-body">
69
- <ul class="list-group">
70
- {{{each emails}}}
71
- <li class="list-group-item">
72
- {../value}
73
- <small class="float-end"><span class="timeago" title="{../timestampISO}"></span></small>
74
- </li>
75
- {{{end}}}
76
- </ul>
77
- </div>
78
- </div>
79
- </div>
80
- <div class="col-sm-6 mb-3">
81
- <div class="card mb-3">
82
- <h5 class="card-header">
83
- [[user:info.latest-flags]]
84
- </h5>
85
- <div class="card-body">
86
- <!-- IF history.flags.length -->
87
- <ul class="recent-flags list-unstyled">
88
- {{{each history.flags}}}
89
- <li>
90
- <p>
91
- {{{ if history.flags.targetPurged }}}
92
- <div>[[flags:target-purged]]</div>
93
- {{{ else }}}
94
- <a class="title" href="{config.relative_path}/post/{../pid}">{../title}</a><br />
95
- {{{ end }}}
96
- <span class="timestamp">[[flags:flagged-timeago-readable, {../timestampISO}, {../timestampReadable}]]</span>
97
- </p>
98
- </li>
99
- {{{end}}}
100
- </ul>
101
- <!-- ELSE -->
102
- <div class="alert alert-success">[[user:info.no-flags]]</div>
103
- <!-- ENDIF history.flags.length -->
104
- </div>
105
- </div>
25
+ </div>
106
26
 
107
- <div class="card mb-3">
108
- <h5 class="card-header">
109
- [[user:info.ban-history]]
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>
110
42
 
111
- <!-- IF !banned -->
112
- <!-- IF !isSelf -->
113
- <button class="btn btn-sm float-end btn-danger" component="account/ban">[[user:ban_account]]</button>
114
- <!-- ENDIF !isSelf -->
115
- <!-- ELSE -->
116
- <!-- IF !isSelf -->
117
- <button class="btn btn-sm float-end btn-success" component="account/unban">[[user:unban_account]]</button>
118
- <!-- ENDIF !isSelf -->
119
- <!-- ENDIF !banned -->
120
- </h5>
121
- <div class="card-body">
122
- <!-- IF history.bans.length -->
123
- <ul class="ban-history list-unstyled">
124
- {{{each history.bans}}}
125
- <li>
126
- <p>
127
- <a href="{config.relative_path}/user/{history.bans.user.userslug}">{buildAvatar(history.bans.user, "24px", true)}</a>
128
- <strong>
129
- <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>
130
- </strong>
131
- <span class="timestamp timeago" title="{../timestampISO}"></span> &mdash; {../timestampReadable}<br />
132
- <!-- IF ../until -->
133
- <span class="expiry">[[user:info.banned-until, {../untilReadable}]]</span><br />
134
- <!-- ELSE -->
135
- <span class="expiry">[[user:info.banned-permanently]]</span><br />
136
- <!-- ENDIF ../until -->
137
- <span class="reason"><strong>[[user:info.banned-reason-label]]</strong>: {../reason}</span>
138
- </p>
139
- </li>
140
- {{{end}}}
141
- </ul>
142
- <!-- ELSE -->
143
- <div class="alert alert-success">[[user:info.no-ban-history]]</div>
144
- <!-- ENDIF history.bans.length -->
145
- </div>
146
- </div>
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>
147
85
 
148
- <div class="card mb-3">
149
- <h5 class="card-header">
150
- [[user:info.mute-history]]
86
+ <div class="card mb-3">
87
+ <h5 class="card-header">
88
+ [[user:info.ban-history]]
151
89
 
152
- {{{ if !muted }}}
153
- {{{ if !isSelf }}}
154
- <button class="btn btn-sm float-end btn-danger" component="account/mute">[[user:mute_account]]</button>
155
- {{{ end }}}
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 />
156
110
  {{{ else }}}
157
- {{{ if !isSelf }}}
158
- <button class="btn btn-sm float-end btn-success" component="account/unmute">[[user:unmute_account]]</button>
111
+ <span class="expiry">[[user:info.banned-permanently]]</span><br />
159
112
  {{{ end }}}
160
- {{{ end }}}
161
- </h5>
162
- <div class="card-body">
163
- {{{ if history.mutes.length }}}
164
- <ul class="ban-history list-unstyled">
165
- {{{ each history.mutes }}}
166
- <li>
167
- <p>
168
- <a href="{config.relative_path}/user/{history.mutes.user.userslug}">{buildAvatar(history.mutes.user, "24px", true)}</a>
169
- <strong>
170
- <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>
171
- </strong>
172
- <span class="timestamp timeago" title="{../timestampISO}"></span> &mdash; {../timestampReadable}<br />
173
- {{{ if ../until }}}
174
- <span class="expiry">[[user:info.muted-until, {../untilReadable}]]</span><br />
175
- {{{ 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>
176
123
 
177
- <span class="reason"><strong>[[user:info.banned-reason-label]]</strong>: {../reason}</span>
178
- </p>
179
- </li>
180
- {{{end}}}
181
- </ul>
182
- {{{ else }}}
183
- <div class="alert alert-success">[[user:info.no-mute-history]]</div>
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 />
184
151
  {{{ end }}}
185
- </div>
186
- </div>
187
152
 
188
- <!-- IF isAdminOrGlobalModerator -->
189
- <div class="card">
190
- <h5 class="card-header">
191
- [[user:info.moderation-note]]
192
- </h5>
193
- <div class="card-body">
194
- <textarea component="account/moderation-note" class="form-control"></textarea>
195
- <br/>
196
- <button class="btn btn-sm float-end btn-success" component="account/save-moderation-note">[[user:info.moderation-note.add]]</button>
197
- <br/>
198
- <div component="account/moderation-note/list">
199
- {{{each moderationNotes}}}
200
- <hr/>
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"></textarea>
171
+ <br/>
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/>
201
177
 
202
- <div class="clearfix">
203
- <div class="float-start">
204
- <a href="<!-- IF moderationNotes.user.userslug -->{config.relative_path}/user/{moderationNotes.user.userslug}<!-- ELSE -->#<!-- ENDIF moderationNotes.user.userslug -->">{buildAvatar(moderationNotes.user, "24px", true)}</a>
205
- <strong>
206
- <a href="<!-- IF moderationNotes.user.userslug -->{config.relative_path}/user/{moderationNotes.user.userslug}<!-- ELSE -->#<!-- ENDIF moderationNotes.user.userslug -->" itemprop="author" data-username="{moderationNotes.user.username}" data-uid="{moderationNotes.user.uid}">{moderationNotes.user.username}</a>
207
- </strong>
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>
208
183
 
209
- <div class="visible-xs-inline-block visible-sm-inline-block visible-md-inline-block visible-lg-inline-block">
210
- <span class="timeago" title="{moderationNotes.timestampISO}"></span>
211
- </div>
212
- <br />
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 />
213
188
 
214
- <div class="content">
215
- {moderationNotes.note}
216
- </div>
217
- </div>
218
- </div>
219
- {{{end}}}
220
- </div>
221
- <!-- IMPORT partials/paginator.tpl -->
189
+ <div class="content">
190
+ {./note}
222
191
  </div>
223
192
  </div>
224
- <!-- ENDIF isAdminOrGlobalModerator -->
193
+ {{{ end }}}
225
194
  </div>
195
+ <!-- IMPORT partials/paginator.tpl -->
226
196
  </div>
227
197
  </div>
198
+ {{{ end }}}
228
199
  </div>
229
200
  </div>
230
201
 
202
+ <!-- IMPORT partials/account/footer.tpl -->
@@ -1,40 +1,35 @@
1
- <div class="account">
2
- <!-- IMPORT partials/account/header.tpl -->
1
+ <!-- IMPORT partials/account/header.tpl -->
3
2
 
4
- <div class="d-flex flex-column flex-md-row">
5
- <!-- IMPORT partials/account/sidebar-left.tpl -->
6
- <div class="flex-1 ps-md-2 ps-lg-5" style="min-width: 0;">
7
- <div class="d-flex flex-wrap justify-content-between align-items-center gap-2 mb-3">
8
- <h3 class="fw-semibold fs-5 mb-0">[[global:posts]]</h3>
9
- <div class="d-flex flex-wrap gap-1">
10
- <a href="{config.relative_path}/user/{userslug}/posts" class="btn-ghost-sm fw-semibold {{{ if template.account/posts }}}active{{{ end }}}">[[global:header.recent]]</a>
11
- {{{ if !reputation:disabled }}}
12
- <a href="{config.relative_path}/user/{userslug}/best"class="btn-ghost-sm fw-semibold {{{ if template.account/best }}}active{{{ end }}}">[[global:best]]</a>
13
- <a href="{config.relative_path}/user/{userslug}/controversial" class="btn-ghost-sm fw-semibold {{{ if template.account/controversial }}}active{{{ end }}}">[[global:controversial]]</a>
14
- {{{ if canEdit }}}
15
- <a href="{config.relative_path}/user/{userslug}/upvoted" class="btn-ghost-sm fw-semibold {{{ if template.account/upvoted }}}active{{{ end }}}">[[global:upvoted]]</a>
16
- {{{ if !downvote:disabled }}}
17
- <a href="{config.relative_path}/user/{userslug}/downvoted" class="btn-ghost-sm fw-semibold {{{ if template.account/downvoted }}}active{{{ end }}}">[[global:downvoted]]</a>
18
- {{{ end }}}
19
- {{{ end }}}
20
- {{{ end }}}
21
- {{{ if canEdit }}}
22
- <a href="{config.relative_path}/user/{userslug}/bookmarks" class="btn-ghost-sm fw-semibold {{{ if template.account/bookmarks }}}active{{{ end }}}">[[user:bookmarks]]</a>
23
- {{{ end }}}
24
- </div>
25
- </div>
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 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 fw-semibold {{{ if template.account/best }}}active{{{ end }}}">[[global:best]]</a>
9
+ <a href="{config.relative_path}/user/{userslug}/controversial" class="btn-ghost-sm 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 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 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 fw-semibold {{{ if template.account/bookmarks }}}active{{{ end }}}">[[user:bookmarks]]</a>
19
+ {{{ end }}}
20
+ </div>
21
+ </div>
26
22
 
27
- {{{ if !posts.length }}}
28
- <div class="alert alert-warning text-center">{noItemsFoundKey}</div>
29
- {{{ end }}}
23
+ {{{ if !posts.length }}}
24
+ <div class="alert alert-warning text-center">{noItemsFoundKey}</div>
25
+ {{{ end }}}
30
26
 
31
- <div class="">
32
- <!-- IMPORT partials/posts_list.tpl -->
27
+ <div class="">
28
+ <!-- IMPORT partials/posts_list.tpl -->
33
29
 
34
- {{{ if config.usePagination }}}
35
- <!-- IMPORT partials/paginator.tpl -->
36
- {{{ end }}}
37
- </div>
38
- </div>
39
- </div>
40
- </div>
30
+ {{{ if config.usePagination }}}
31
+ <!-- IMPORT partials/paginator.tpl -->
32
+ {{{ end }}}
33
+ </div>
34
+
35
+ <!-- IMPORT partials/account/footer.tpl -->