nodebb-theme-harmony 1.0.0-beta.14 → 1.0.0-beta.16

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-harmony",
3
- "version": "1.0.0-beta.14",
3
+ "version": "1.0.0-beta.16",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.0.0"
6
6
  },
package/public/harmony.js CHANGED
@@ -61,8 +61,13 @@ $(document).ready(function () {
61
61
 
62
62
  function setupDrafts() {
63
63
  require(['composer/drafts'], function (drafts) {
64
+ const draftsEl = $('[component="sidebar/drafts"]');
65
+
64
66
  function updateBadgeCount() {
65
67
  const count = drafts.getAvailableCount();
68
+ if (count > 0) {
69
+ draftsEl.removeClass('hidden');
70
+ }
66
71
  $('[component="drafts/count"]').toggleClass('hidden', count <= 0).text(count);
67
72
  }
68
73
 
@@ -86,7 +91,7 @@ $(document).ready(function () {
86
91
  draftListEl.append(html).find('.timeago').timeago();
87
92
  }
88
93
 
89
- const draftsEl = $('[component="sidebar/drafts"]');
94
+
90
95
  draftsEl.on('shown.bs.dropdown', renderDraftList);
91
96
 
92
97
  draftsEl.on('click', '[component="drafts/open"]', function () {
package/scss/sidebar.scss CHANGED
@@ -128,7 +128,7 @@
128
128
  overflow: auto!important;
129
129
  }
130
130
  .search-dropdown .quick-search-results {
131
- max-height: 250px!important;
131
+ max-height: 225px!important;
132
132
  overflow-y: auto!important;
133
133
  }
134
134
  .search-dropdown, .chats-dropdown, .notifications-dropdown, .drafts-dropdown {
@@ -12,6 +12,68 @@
12
12
  <hr />
13
13
 
14
14
  <div class="row">
15
+ <div class="col-sm-6">
16
+ <!-- IF gdpr_consent -->
17
+ <div class="alert alert-success">
18
+ <i class="fa fa-check float-end fa-3x"></i>
19
+ [[user:consent.received]]
20
+ </div>
21
+ <!-- ELSE -->
22
+ <div class="alert alert-warning">
23
+ [[user:consent.not_received]]
24
+ <br /><br />
25
+ <div class="text-center">
26
+ <button class="btn btn-warning" data-action="consent">[[user:consent.give]]</button>
27
+ </div>
28
+ </div>
29
+ <!-- END -->
30
+ <div class="card">
31
+ <div class="card-body">
32
+ <p>[[user:consent.email_intro]]</p>
33
+ {{{ if digest.enabled }}}
34
+ <p>[[user:consent.digest_frequency, {digest.frequency}]]</p>
35
+ {{{ else }}}
36
+ <p>[[user:consent.digest_off]]</p>
37
+ {{{ end }}}
38
+
39
+ <div class="d-grid">
40
+ <a class="btn btn-outline-secondary" href="./settings">
41
+ <i class="fa fa-cog"></i>
42
+ [[pages:account/settings]]
43
+ </a>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ <div class="col-sm-6">
49
+ <div class="card">
50
+ <div class="card-body">
51
+ <p><strong>[[user:consent.right_of_access]]</strong></p>
52
+ <p>[[user:consent.right_of_access_description]]</p>
53
+ <p><strong>[[user:consent.right_to_rectification]]</strong></p>
54
+ <p>[[user:consent.right_to_rectification_description]]</p>
55
+ <p><strong>[[user:consent.right_to_erasure]]</strong></p>
56
+ <p>[[user:consent.right_to_erasure_description]]</p>
57
+ <p><strong>[[user:consent.right_to_data_portability]]</strong></p>
58
+ <p>[[user:consent.right_to_data_portability_description]]</p>
59
+
60
+ <hr />
61
+
62
+ <div class="btn-group-vertical d-grid">
63
+ <a data-action="export-profile" class="btn btn-outline-secondary">
64
+ <i class="fa fa-download"></i> [[user:consent.export_profile]]
65
+ </a>
66
+ <a data-action="export-posts" class="btn btn-outline-secondary">
67
+ <i class="fa fa-download"></i> [[user:consent.export_posts]]
68
+ </a>
69
+ <a data-action="export-uploads" class="btn btn-outline-secondary">
70
+ <i class="fa fa-download"></i> [[user:consent.export_uploads]]
71
+ </a>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ </div>
15
77
  </div>
16
78
  </div>
17
79
  </div>
@@ -8,24 +8,7 @@
8
8
  <div class="mb-3">
9
9
  <h4>[[global:sessions]]</h4>
10
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>
28
- {{{end}}}
11
+ <!-- IMPORT partials/account/session-list.tpl -->
29
12
  </ul>
30
13
  </div>
31
14
  {{{ end }}}
@@ -7,24 +7,7 @@
7
7
  <p class="lead">[[user:sessions.description]]</p>
8
8
  <hr />
9
9
  <ul class="list-group" component="user/sessions">
10
- {{{each sessions}}}
11
- <li class="list-group-item" data-uuid="{../uuid}">
12
- <div class="float-end">
13
- <!-- IF isSelfOrAdminOrGlobalModerator -->
14
- <!-- IF !../current -->
15
- <button class="btn btn-sm btn-outline-secondary" type="button" data-action="revokeSession">Revoke Session</button>
16
- <!-- ENDIF !../current -->
17
- <!-- ENDIF isSelfOrAdminOrGlobalModerator -->
18
- {function.userAgentIcons}
19
- <i class="fa fa-circle text-<!-- IF ../current -->success<!-- ELSE -->muted<!-- ENDIF ../current -->"></i>
20
- </div>
21
- {../browser} {../version} on {../platform}<br />
22
- <small class="timeago text-muted" title="{../datetimeISO}"></small>
23
- <ul>
24
- <li><strong>[[global:ip_address]]</strong>: {../ip}</li>
25
- </ul>
26
- </li>
27
- {{{end}}}
10
+ <!-- IMPORT partials/account/session-list.tpl -->
28
11
  </ul>
29
12
  </div>
30
13
  </div>
@@ -0,0 +1,18 @@
1
+ {{{ each sessions }}}
2
+ <li class="list-group-item text-break" data-uuid="{./uuid}">
3
+ <div class="float-end">
4
+ {{{ if isSelfOrAdminOrGlobalModerator }}}
5
+ {{{ if !./current }}}
6
+ <button class="btn btn-sm btn-outline-secondary" type="button" data-action="revokeSession">[[user:revoke-session]]</button>
7
+ {{{ end }}}
8
+ {{{ end }}}
9
+ {function.userAgentIcons}
10
+ <i class="fa fa-circle text-{{{ if ./current }}}success{{{ else }}}muted{{{ end }}}"></i>
11
+ </div>
12
+ [[user:browser-version-on-platform, {./browser}, {./version}, {./platform}]]<br />
13
+ <small class="timeago text-muted" title="{../datetimeISO}"></small>
14
+ <ul>
15
+ <li><strong>[[global:ip_address]]</strong>: {../ip}</li>
16
+ </ul>
17
+ </li>
18
+ {{{ end }}}
@@ -1,5 +1,5 @@
1
1
  {{{ if config.loggedIn }}}
2
- <div class="btn-group topic-watch-dropdown bottom-sheet" component="topic/watch">
2
+ <div class="btn-group bottom-sheet" component="topic/watch">
3
3
  <button class="btn-ghost-sm d-flex gap-2 align-items-baseline dropdown-toggle" data-bs-toggle="dropdown" type="button">
4
4
  <span component="category/watching/menu" {{{ if !./isWatched }}}class="hidden"{{{ end }}}><i class="fa fa-fw fa-inbox text-primary"></i><span class="visible-md-inline visible-lg-inline fw-semibold"> [[category:watching]]</span></span>
5
5
 
@@ -9,11 +9,35 @@
9
9
  </button>
10
10
 
11
11
  <ul class="dropdown-menu">
12
- <li><a class="dropdown-item" href="#" component="category/watching" data-state="watching"><i component="category/watching/check" class="fa fa-fw {{{ if ./isWatched }}}fa-check{{{ end }}}"></i><i class="fa fa-fw fa-inbox"></i> [[category:watching]]<p class="help-text text-muted"><small>[[category:watching.description]]</small></p></a></li>
12
+ <li>
13
+ <a class="dropdown-item d-flex" href="#" component="category/watching" data-state="watching">
14
+ <span><i component="category/watching/check" class="fa fa-fw {{{ if ./isWatched }}}fa-check{{{ end }}}"></i></span>
15
+ <div class="d-flex flex-column">
16
+ <span><i class="fa fa-fw fa-inbox"></i> [[category:watching]]</span>
17
+ <p class="help-text text-muted"><small>[[category:watching.description]]</small></p>
18
+ </div>
19
+ </a>
20
+ </li>
13
21
 
14
- <li><a class="dropdown-item" href="#" component="category/notwatching" data-state="notwatching"><i component="category/notwatching/check" class="fa fa-fw {{{ if ./isNotWatched }}}fa-check{{{ end }}}"></i><i class="fa fa-fw fa-clock-o"></i> [[category:not-watching]]<p class="help-text text-muted"><small>[[category:not-watching.description]]</small></p></a></li>
22
+ <li>
23
+ <a class="dropdown-item d-flex" href="#" component="category/notwatching" data-state="notwatching">
24
+ <span><i component="category/notwatching/check" class="fa fa-fw {{{ if ./isNotWatched }}}fa-check{{{ end }}}"></i></span>
25
+ <div class="d-flex flex-column">
26
+ <span><i class="fa fa-fw fa-clock-o"></i> [[category:not-watching]]</span>
27
+ <p class="help-text text-muted"><small>[[category:not-watching.description]]</small></p>
28
+ </div>
29
+ </a>
30
+ </li>
15
31
 
16
- <li><a class="dropdown-item" href="#" component="category/ignoring" data-state="ignoring"><i component="category/ignoring/check" class="fa fa-fw {{{ if ./isIgnored }}}fa-check{{{ end }}}"></i><i class="fa fa-fw fa-eye-slash"></i> [[category:ignoring]]<p class="help-text text-muted"><small>[[category:ignoring.description]]</small></p></a></li>
32
+ <li>
33
+ <a class="dropdown-item d-flex" href="#" component="category/ignoring" data-state="ignoring">
34
+ <span><i component="category/ignoring/check" class="fa fa-fw {{{ if ./isIgnored }}}fa-check{{{ end }}}"></i></span>
35
+ <div class="d-flex flex-column">
36
+ <span><i class="fa fa-fw fa-eye-slash"></i> [[category:ignoring]]</span>
37
+ <p class="help-text text-muted"><small>[[category:ignoring.description]]</small></p>
38
+ </div>
39
+ </a>
40
+ </li>
17
41
  </ul>
18
42
  </div>
19
43
  {{{ end }}}
@@ -60,7 +60,7 @@
60
60
  </li>
61
61
  {{{ end }}}
62
62
 
63
- <li component="sidebar/drafts" class="nav-item m-0 drafts">
63
+ <li component="sidebar/drafts" class="hidden nav-item m-0 drafts">
64
64
  <!-- IMPORT partials/sidebar/drafts.tpl -->
65
65
  </li>
66
66
 
@@ -1,5 +1,5 @@
1
1
  <hr/>
2
- <a class="topic-title fw-semibold fs-5 text-reset" href="{config.relative_path}/post/{./pid}">
2
+ <a class="topic-title fw-semibold fs-5 text-reset text-break" href="{config.relative_path}/post/{./pid}">
3
3
  {{{ if !./isMainPost }}}RE: {{{ end }}}{./topic.title}
4
4
  </a>
5
5
  <li component="post" class="posts-list-item {{{ if ./deleted }}} deleted{{{ else }}}{{{ if ./topic.deleted }}} deleted{{{ end }}}{{{ end }}}{{{ if ./topic.scheduled }}} scheduled{{{ end }}}" data-pid="{./pid}" data-uid="{./uid}">
@@ -12,7 +12,7 @@
12
12
  <span class="timeago text-sm text-muted" title="{../timestampISO}"></span>
13
13
  </div>
14
14
 
15
- <div component="post/content" class="content text-sm">
15
+ <div component="post/content" class="content text-sm text-break">
16
16
  {../content}
17
17
  </div>
18
18
  </div>
@@ -9,7 +9,7 @@
9
9
  </div>
10
10
  {{{ end }}}
11
11
 
12
- <ul id="quick-search-results" class="quick-search-results list-unstyled mb-0 p-0 overflow-auto" style="max-width:400px; max-height: 500px;">
12
+ <ul id="quick-search-results" class="quick-search-results list-unstyled mb-0 p-0 overflow-auto overscroll-behavior-contain" style="max-width: 400px; max-height: 500px;">
13
13
  <li role="separator" class="dropdown-divider d-none d-md-block"></li>
14
14
  {{{ each posts }}}
15
15
  <li data-tid="{posts.topic.tid}" data-pid="{posts.pid}" class="d-flex flex-column gap-1">
@@ -10,7 +10,7 @@
10
10
  </a>
11
11
  <ul class="chats-dropdown dropdown-menu p-1 shadow">
12
12
  <li>
13
- <ul component="chat/list" class="chat-list chats-list list-unstyled p-0 pe-1">
13
+ <ul component="chat/list" class="chat-list chats-list list-unstyled overscroll-behavior-contain p-0 pe-1">
14
14
  <li class="dropdown-item rounded-1 p-2 d-flex gap-2 placeholder-wave">
15
15
  <div class="main-avatar">
16
16
  <div class="placeholder" style="width: 32px; height: 32px;"></div>
@@ -10,7 +10,7 @@
10
10
  </a>
11
11
  <ul class="drafts-dropdown dropdown-menu p-1 shadow">
12
12
  <li>
13
- <ul component="drafts/list" class="draft-list list-unstyled d-flex flex-column gap-1 pe-1">
13
+ <ul component="drafts/list" class="draft-list list-unstyled d-flex flex-column overscroll-behavior-contain gap-1 pe-1">
14
14
  <li class="no-drafts text-center p-2">[[modules:composer.no-drafts]]</li>
15
15
 
16
16
  {{{ each drafts }}}
@@ -10,7 +10,7 @@
10
10
  </a>
11
11
  <ul class="notifications-dropdown dropdown-menu p-1 shadow">
12
12
  <li>
13
- <ul component="notifications/list" class="notification-list list-unstyled">
13
+ <ul component="notifications/list" class="notification-list list-unstyled overscroll-behavior-contain">
14
14
  <li class="mb-2 placeholder-wave">
15
15
  <div class="text-sm placeholder col-11">&nbsp;</div>
16
16
  <div class="text-sm placeholder col-5">&nbsp;</div><br />
@@ -2,7 +2,7 @@
2
2
  {buildAvatar(user, "20px", true)}
3
3
  <span id="user-header-name" class="nav-text small visible-open fw-semibold">{user.username}</span>
4
4
  </label>
5
- <ul id="user-control-list" component="header/usercontrol" class="user-dropdown dropdown-menu shadow p-1 text-sm" aria-labelledby="user_dropdown">
5
+ <ul id="user-control-list" component="header/usercontrol" class="overscroll-behavior-contain user-dropdown dropdown-menu shadow p-1 text-sm" aria-labelledby="user_dropdown">
6
6
  <li>
7
7
  <a class="dropdown-item rounded-1 d-flex align-items-center gap-1" component="header/profilelink" href="{relative_path}/user/{user.userslug}">
8
8
  <div class="text-center"><span component="user/status" class="badge border border-white border-2 rounded-circle status {user.status}"><span class="visually-hidden">[[global:{user.status}]]</span></span></div>
@@ -1,5 +1,5 @@
1
1
  {{{ if config.loggedIn }}}
2
- <div class="btn-group topic-watch-dropdown bottom-sheet" component="topic/watch">
2
+ <div class="btn-group bottom-sheet" component="topic/watch">
3
3
  <button class="btn-ghost-sm d-flex gap-2 align-items-baseline dropdown-toggle" data-bs-toggle="dropdown" type="button">
4
4
  <span component="topic/following/menu" class="d-flex gap-2 align-items-center{{{ if !isFollowing }}} hidden{{{ end }}}">
5
5
  <i class="fa fa-fw fa-bell-o link-primary"></i>
@@ -17,11 +17,35 @@
17
17
  </span>
18
18
  </button>
19
19
  <ul class="dropdown-menu">
20
- <li><a class="dropdown-item" href="#" component="topic/following"><i component="topic/following/check" class="fa fa-fw {{{ if isFollowing }}}fa-check{{{ end }}}"></i><i class="fa fa-fw fa-bell-o"></i> [[topic:watching]]<p class="help-text text-muted"><small>[[topic:watching.description]]</small></p></a></li>
20
+ <li>
21
+ <a class="dropdown-item d-flex" href="#" component="topic/following">
22
+ <span><i component="topic/following/check" class="fa fa-fw {{{ if isFollowing }}}fa-check{{{ end }}}"></i></span>
23
+ <div class="d-flex flex-column">
24
+ <span><i class="fa fa-fw fa-bell-o"></i> [[topic:watching]]</span>
25
+ <p class="help-text text-muted"><small>[[topic:watching.description]]</small></p>
26
+ </div>
27
+ </a>
28
+ </li>
21
29
 
22
- <li><a class="dropdown-item" href="#" component="topic/not-following"><i component="topic/not-following/check" class="fa fa-fw {{{ if isNotFollowing }}}fa-check{{{ end }}}"></i><i class="fa fa-fw fa-bell-slash-o"></i> [[topic:not-watching]]<p class="help-text text-muted"><small>[[topic:not-watching.description]]</small></p></a></li>
30
+ <li>
31
+ <a class="dropdown-item d-flex" href="#" component="topic/not-following">
32
+ <span><i component="topic/not-following/check" class="fa fa-fw {{{ if isNotFollowing }}}fa-check{{{ end }}}"></i></span>
33
+ <div class="d-flex flex-column">
34
+ <span><i class="fa fa-fw fa-bell-slash-o"></i> [[topic:not-watching]]</span>
35
+ <p class="help-text text-muted"><small>[[topic:not-watching.description]]</small></p>
36
+ </div>
37
+ </a>
38
+ </li>
23
39
 
24
- <li><a class="dropdown-item" href="#" component="topic/ignoring"><i component="topic/ignoring/check" class="fa fa-fw {{{ if isIgnoring }}}fa-check{{{ end }}}"></i><i class="fa fa-fw fa-eye-slash"></i> [[topic:ignoring]]<p class="help-text text-muted"><small>[[topic:ignoring.description]]</small></p></a></li>
40
+ <li>
41
+ <a class="dropdown-item d-flex" href="#" component="topic/ignoring">
42
+ <span><i component="topic/ignoring/check" class="fa fa-fw {{{ if isIgnoring }}}fa-check{{{ end }}}"></i></span>
43
+ <div class="d-flex flex-column">
44
+ <span><i class="fa fa-fw fa-eye-slash"></i> [[topic:ignoring]]</span>
45
+ <p class="help-text text-muted"><small>[[topic:ignoring.description]]</small></p>
46
+ </div>
47
+ </a>
48
+ </li>
25
49
  </ul>
26
50
  </div>
27
51
  {{{ end }}}