nodebb-theme-harmony 3.1.14 → 3.2.0

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,8 +1,8 @@
1
1
  {
2
2
  "name": "nodebb-theme-harmony",
3
- "version": "3.1.14",
3
+ "version": "3.2.0",
4
4
  "nbbpm": {
5
- "compatibility": "^4.14.0"
5
+ "compatibility": "^4.15.0"
6
6
  },
7
7
  "description": "Harmony theme for NodeBB",
8
8
  "main": "library.js",
@@ -45,7 +45,7 @@
45
45
  "@fontsource/poppins": "5.2.7"
46
46
  },
47
47
  "devDependencies": {
48
- "eslint": "10.8.0",
48
+ "eslint": "10.8.1",
49
49
  "eslint-config-nodebb": "^2.0.2"
50
50
  }
51
51
  }
@@ -224,7 +224,7 @@
224
224
  </div>
225
225
 
226
226
  <div class="col-sm-6 mb-3">
227
- {{{ if isAdminOrGlobalModerator }}}
227
+ {{{ if isAdminOrGlobalModeratorOrModerator }}}
228
228
  <div class="card">
229
229
  <h5 class="card-header">
230
230
  {{tx("user:info.moderation-note")}}
@@ -236,10 +236,8 @@
236
236
  <br/>
237
237
  <div component="account/moderation-note/list">
238
238
  {{{ each moderationNotes }}}
239
- <hr/>
240
-
241
- <div data-id="{./id}">
242
- <div class="d-flex align-items-baseline gap-1 mb-1">
239
+ <div data-id="{./id}" class="border-bottom pb-3 mb-3">
240
+ <div class="d-flex align-items-baseline gap-2 mb-1">
243
241
  <a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">{{buildAvatar(./user, "24px", true)}}</a>
244
242
 
245
243
  <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>
@@ -247,12 +245,16 @@
247
245
  <span class="timeago text-sm text-secondary" title="{./timestampISO}"></span>
248
246
  </div>
249
247
 
250
-
251
248
  <div component="account/moderation-note/content-area" class="d-flex flex-column">
252
249
  <div class="content text-secondary">
253
- {{txEscape(./note)}}
250
+ {{./note}}
254
251
  </div>
255
- <button component="account/moderation-note/edit" class="btn btn-sm btn-link align-self-end">{{tx("topic:edit")}}</button>
252
+ {{{ if isAdmin }}}
253
+ <div class="d-flex gap-1 justify-content-end">
254
+ <button component="account/moderation-note/delete" class="btn btn-sm btn-link text-danger align-self-end">{{tx("topic:delete")}}</button>
255
+ <button component="account/moderation-note/edit" class="btn btn-sm btn-link align-self-end">{{tx("topic:edit")}}</button>
256
+ </div>
257
+ {{{ end }}}
256
258
  </div>
257
259
 
258
260
  <div component="account/moderation-note/edit-area" class="d-flex flex-column gap-2 hidden">
@@ -10,7 +10,7 @@
10
10
 
11
11
  {{{ if aboutme }}}
12
12
  <div component="aboutme" class="text-sm text-break">
13
- {{txEscape(aboutmeParsed)}}
13
+ {{aboutmeParsed}}
14
14
  </div>
15
15
  {{{ end }}}
16
16
 
@@ -3,12 +3,12 @@
3
3
  {{{ if @first }}}
4
4
  <div component="category/posts" class="ps-2 text-xs d-flex flex-column h-100 gap-1">
5
5
  <div class="text-nowrap text-truncate">
6
- <a class="text-decoration-none avatar-tooltip" title="{./user.displayname}" href="{config.relative_path}/user/{./user.userslug}">{{buildAvatar(posts.user, "18px", true)}}</a>
6
+ <a class="text-decoration-none avatar-tooltip" title="{{txDisplayname(./user)}}" href="{config.relative_path}/user/{./user.userslug}">{{buildAvatar(posts.user, "18px", true)}}</a>
7
7
  <a class="permalink text-muted timeago text-xs" href="{config.relative_path}/topic/{./topic.slug}{{{ if ./index }}}/{./index}{{{ end }}}" title="{./timestampISO}" aria-label="{{tx("global:lastpost")}}"></a>
8
8
  </div>
9
9
  <div class="post-content text-xs text-break line-clamp-sm-2 lh-sm position-relative flex-fill">
10
10
  <a class="stretched-link" tabindex="-1" href="{config.relative_path}/topic/{./topic.slug}{{{ if ./index }}}/{./index}{{{ end }}}" aria-label="{{tx("global:lastpost")}}"></a>
11
- {{txEscape(./content)}}
11
+ {{./content}}
12
12
  </div>
13
13
  </div>
14
14
  {{{ end }}}
@@ -8,13 +8,13 @@
8
8
  <div class="d-flex gap-2 post-info text-sm align-items-center">
9
9
  <div class="post-author d-flex align-items-center gap-1">
10
10
  <a class="lh-1 text-decoration-none" href="{config.relative_path}/user/{./user.userslug}">{{buildAvatar(./user, "16px", true, "not-responsive")}}</a>
11
- <a class="lh-1 fw-semibold" href="{config.relative_path}/user/{./user.userslug}">{../user.displayname}</a>
11
+ <a class="lh-1 fw-semibold" href="{config.relative_path}/user/{./user.userslug}">{{txDisplayname(./user)}}</a>
12
12
  </div>
13
13
  <span class="timeago text-muted lh-1" title="{./timestampISO}"></span>
14
14
  </div>
15
15
 
16
16
  <div component="post/content" class="content text-sm text-break">
17
- {{{ if ./txContent }}}{{tx(./content)}}{{{ else }}}{{txEscape(./content)}}{{{ end }}}
17
+ {{{ if ./txContent }}}{{tx(./content)}}{{{ else }}}{{./content}}{{{ end }}}
18
18
  </div>
19
19
  </div>
20
20
  <div class="mb-3 d-flex flex-wrap gap-1 w-100">
@@ -3,9 +3,9 @@
3
3
  {{buildAvatar(post.user, "24px", true)}}
4
4
  </div>
5
5
  <div class="text-truncate">
6
- <a href="{{{ if post.user.userslug }}}{config.relative_path}/user/{post.user.userslug}{{{else }}}#{{{ end }}}">{post.user.displayname}</a>
6
+ <a href="{{{ if post.user.userslug }}}{config.relative_path}/user/{post.user.userslug}{{{else }}}#{{{ end }}}">{{txDisplayname(post.user)}}</a>
7
7
  </div>
8
8
  <span class="timeago text-nowrap text-muted" title="{post.timestampISO}"></span>
9
9
  </div>
10
10
 
11
- <div class="text-sm">{{{ if post.txContent }}}{{tx(posts.content)}}{{{ else }}}{{txEscape(post.content)}}{{{ end }}}</div>
11
+ <div class="text-sm">{{{ if post.txContent }}}{{tx(posts.content)}}{{{ else }}}{{post.content}}{{{ end }}}</div>
@@ -10,7 +10,7 @@
10
10
  {{{ end }}}
11
11
  <div class="d-flex align-items-start gap-3 post-container-parent">
12
12
  <div class="bg-body d-none d-sm-block rounded-circle" style="box-shadow: 0 0 0 3px var(--bs-body-bg);">
13
- <a class="d-inline-block position-relative text-decoration-none" href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" aria-label="{{tx("aria:profile-page-for", txEscape(./user.displayname))}}">
13
+ <a class="d-inline-block position-relative text-decoration-none" href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" aria-label="{{tx("aria:profile-page-for", txEscape(txDisplayname(./user)))}}">
14
14
  {{buildAvatar(posts.user, "48px", true, "", "user/picture")}}
15
15
  {{{ if ./user.isLocal }}}
16
16
  <span component="user/status" class="position-absolute top-100 start-100 border border-white border-2 rounded-circle status {posts.user.status}"><span class="visually-hidden">{{tx(concat("global:", posts.user.status))}}</span></span>
@@ -25,7 +25,7 @@
25
25
  <div class="post-container d-flex gap-2 flex-grow-1 flex-column w-100" style="min-width:0;">
26
26
  <div class="d-flex align-items-start justify-content-between gap-1 flex-nowrap w-100 post-header" itemprop="author" itemscope itemtype="https://schema.org/Person">
27
27
  <div class="d-flex gap-1 flex-wrap align-items-center text-truncate">
28
- <meta itemprop="name" content="{./user.displayname}">
28
+ <meta itemprop="name" content="{{txDisplayname(./user)}}">
29
29
  {{{ if ./user.userslug }}}<meta itemprop="url" content="{config.relative_path}/user/{./user.userslug}">{{{ end }}}
30
30
 
31
31
  <div class="d-flex flex-nowrap gap-1 align-items-center text-truncate">
@@ -43,7 +43,7 @@
43
43
  </a>
44
44
  </div>
45
45
 
46
- <a class="fw-bold text-nowrap text-truncate" href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" data-username="{posts.user.username}" data-uid="{posts.user.uid}">{posts.user.displayname}</a>
46
+ <a class="fw-bold text-nowrap text-truncate" href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" data-username="{posts.user.username}" data-uid="{posts.user.uid}">{{txDisplayname(posts.user)}}</a>
47
47
  </div>
48
48
 
49
49
  {{{ each posts.user.selectedGroups }}}
@@ -78,12 +78,12 @@
78
78
  </div>
79
79
 
80
80
  <div class="content text-break" component="post/content" itemprop="text">
81
- {{{ if posts.txContent }}}{{tx(posts.content)}}{{{ else }}}{{txEscape(posts.content)}}{{{ end }}}
81
+ {{{ if posts.txContent }}}{{tx(posts.content)}}{{{ else }}}{{posts.content}}{{{ end }}}
82
82
  </div>
83
83
 
84
84
  <div component="post/footer" class="post-footer border-bottom pb-2">
85
85
  {{{ if posts.user.signature }}}
86
- <div component="post/signature" data-uid="{posts.user.uid}" class="text-xs text-muted mt-2">{{txEscape(posts.user.signature)}}</div>
86
+ <div component="post/signature" data-uid="{posts.user.uid}" class="text-xs text-muted mt-2">{{posts.user.signature}}</div>
87
87
  {{{ end }}}
88
88
 
89
89
  <div class="d-flex flex-wrap-reverse gap-2 {{{ if (hideReplies || !posts.replies.count) }}}justify-content-end{{{ else }}}justify-content-between{{{ end }}}">
@@ -10,7 +10,7 @@
10
10
 
11
11
  <div class="d-flex p-0 col-12 col-lg-7 gap-2 gap-lg-3 pe-2 align-items-start {{{ if config.theme.mobileTopicTeasers }}}mb-2 mb-lg-0{{{ end }}}">
12
12
  <div class="flex-shrink-0 position-relative">
13
- <a class="d-inline-block text-decoration-none avatar-tooltip" title="{./user.displayname}" href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">
13
+ <a class="d-inline-block text-decoration-none avatar-tooltip" title="{{txDisplayname(./user)}}" href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">
14
14
  {{buildAvatar(./user, "40px", true)}}
15
15
  </a>
16
16
  {{{ if showSelect }}}
@@ -115,12 +115,12 @@
115
115
  {{{ else }}}
116
116
  {{{ if ./teaser.pid }}}
117
117
  <div class="ps-2">
118
- <a href="{{{ if ./teaser.user.userslug }}}{config.relative_path}/user/{./teaser.user.userslug}{{{ else }}}#{{{ end }}}" class="text-decoration-none avatar-tooltip" title="{./teaser.user.displayname}">{{buildAvatar(./teaser.user, "18px", true)}}</a>
118
+ <a href="{{{ if ./teaser.user.userslug }}}{config.relative_path}/user/{./teaser.user.userslug}{{{ else }}}#{{{ end }}}" class="text-decoration-none avatar-tooltip" title="{{txDisplayname(./teaser.user)}}">{{buildAvatar(./teaser.user, "18px", true)}}</a>
119
119
  <a class="permalink text-muted timeago text-xs" href="{config.relative_path}/topic/{./slug}/{./teaser.index}" title="{./teaser.timestampISO}" aria-label="{{tx("global:lastpost")}}"></a>
120
120
  </div>
121
121
  <div class="post-content text-xs ps-2 line-clamp-sm-2 lh-sm text-break position-relative flex-fill">
122
122
  <a class="stretched-link" tabindex="-1" href="{config.relative_path}/topic/{./slug}/{./teaser.index}" aria-label="{{tx("global:lastpost")}}"></a>
123
- {{txEscape(./teaser.content)}}
123
+ {{./teaser.content}}
124
124
  </div>
125
125
  {{{ end }}}
126
126
  {{{ end }}}