nodebb-theme-harmony 0.0.9 → 0.0.11

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 (72) hide show
  1. package/languages/en-GB/harmony.json +5 -1
  2. package/lib/controllers.js +15 -0
  3. package/library.js +63 -6
  4. package/package.json +1 -1
  5. package/plugin.json +5 -1
  6. package/public/settings.js +28 -0
  7. package/scss/account.scss +0 -3
  8. package/scss/common.scss +6 -0
  9. package/scss/modules/bottom-sheet.scss +1 -1
  10. package/scss/modules/topic-navigator.scss +0 -6
  11. package/scss/sidebar.scss +18 -16
  12. package/templates/account/blocks.tpl +2 -2
  13. package/templates/account/categories.tpl +27 -21
  14. package/templates/account/consent.tpl +10 -64
  15. package/templates/account/edit/password.tpl +29 -24
  16. package/templates/account/edit/username.tpl +25 -20
  17. package/templates/account/edit.tpl +110 -115
  18. package/templates/account/followers.tpl +2 -3
  19. package/templates/account/following.tpl +2 -3
  20. package/templates/account/groups.tpl +2 -3
  21. package/templates/account/info.tpl +206 -204
  22. package/templates/account/posts.tpl +4 -4
  23. package/templates/account/profile.tpl +9 -9
  24. package/templates/account/sessions.tpl +3 -6
  25. package/templates/account/settings.tpl +193 -206
  26. package/templates/account/theme.tpl +25 -21
  27. package/templates/account/topics.tpl +17 -16
  28. package/templates/account/uploads.tpl +4 -8
  29. package/templates/admin/plugins/harmony.tpl +4 -0
  30. package/templates/groups/details.tpl +3 -20
  31. package/templates/groups/list.tpl +10 -9
  32. package/templates/header.tpl +3 -21
  33. package/templates/login.tpl +1 -1
  34. package/templates/notifications.tpl +4 -4
  35. package/templates/partials/account/header.tpl +58 -47
  36. package/templates/partials/account/sidebar-left.tpl +19 -12
  37. package/templates/partials/buttons/newTopic.tpl +1 -3
  38. package/templates/partials/categories/item.tpl +1 -8
  39. package/templates/partials/category/sort.tpl +3 -3
  40. package/templates/partials/category/subcategory.tpl +1 -1
  41. package/templates/partials/category/tools.tpl +3 -3
  42. package/templates/partials/category/watch.tpl +7 -7
  43. package/templates/partials/category-filter-content.tpl +4 -4
  44. package/templates/partials/category-selector-content.tpl +10 -9
  45. package/templates/partials/chats/message-window.tpl +9 -7
  46. package/templates/partials/groups/admin.tpl +3 -5
  47. package/templates/partials/groups/sidebar-left.tpl +1 -1
  48. package/templates/partials/header/brand.tpl +19 -0
  49. package/templates/partials/notifications_list.tpl +5 -5
  50. package/templates/partials/post_bar.tpl +5 -5
  51. package/templates/partials/sidebar/logged-in-menu.tpl +23 -0
  52. package/templates/partials/sidebar/user-menu.tpl +1 -1
  53. package/templates/partials/sidebar-left.tpl +1 -1
  54. package/templates/partials/sidebar-right.tpl +1 -23
  55. package/templates/partials/tags_list.tpl +3 -2
  56. package/templates/partials/topic/navigator.tpl +2 -2
  57. package/templates/partials/topic/post-menu.tpl +2 -4
  58. package/templates/partials/topic/post.tpl +13 -13
  59. package/templates/partials/topic/reply-button.tpl +3 -3
  60. package/templates/partials/topic/sort.tpl +3 -3
  61. package/templates/partials/topic/tools.tpl +3 -3
  62. package/templates/partials/topic/watch.tpl +17 -16
  63. package/templates/partials/topic-filters.tpl +3 -3
  64. package/templates/partials/topic-list-bar.tpl +8 -12
  65. package/templates/partials/topic-terms.tpl +3 -3
  66. package/templates/partials/topics_list.tpl +4 -4
  67. package/templates/partials/users/item.tpl +27 -25
  68. package/templates/partials/users_list_menu.tpl +1 -1
  69. package/templates/search.tpl +0 -2
  70. package/templates/tags.tpl +12 -8
  71. package/templates/topic.tpl +1 -3
  72. package/templates/users.tpl +4 -5
@@ -1,137 +1,132 @@
1
- <!-- THIS FILE IS STILL PERSONA -->
2
-
3
1
  <div class="account">
4
2
  <!-- IMPORT partials/account/header.tpl -->
5
- <!-- IF sso.length --><div><!-- ENDIF sso.length -->
6
- <div class="row">
7
- <div class="col-md-3 col-sm-4">
8
- <div class="account-picture-block text-center">
9
- <div class="row mb-3">
10
- <div class="col-12 hidden-xs">
11
- <!-- IF picture -->
12
- <img id="user-current-picture" class="avatar avatar-rounded" style="--avatar-size: 128px;" src="{picture}" />
13
- <!-- ELSE -->
14
- <div class="avatar avatar-rounded" style="background-color: {icon:bgColor}; --avatar-size: 128px;">{icon:text}</div>
15
- <!-- ENDIF picture -->
16
- </div>
17
- </div>
18
- <ul class="list-group mb-3">
19
- <!-- IF allowProfilePicture -->
20
- <a id="changePictureBtn" href="#" class="list-group-item">[[user:change_picture]]</a>
21
- <!-- ENDIF allowProfilePicture -->
22
- <!-- IF !username:disableEdit -->
23
- <a href="{config.relative_path}/user/{userslug}/edit/username" class="list-group-item">[[user:change_username]]</a>
24
- <!-- ENDIF !username:disableEdit -->
25
- <!-- IF !email:disableEdit -->
26
- <a href="{config.relative_path}/user/{userslug}/edit/email" class="list-group-item">[[user:change_email]]</a>
27
- <!-- ENDIF !email:disableEdit -->
28
- <!-- IF canChangePassword -->
29
- <a href="{config.relative_path}/user/{userslug}/edit/password" class="list-group-item">[[user:change_password]]</a>
30
- <!-- ENDIF canChangePassword -->
31
- {{{each editButtons}}}
32
- <a href="{config.relative_path}{editButtons.link}" class="list-group-item">{editButtons.text}</a>
33
- {{{end}}}
34
- </ul>
35
3
 
36
- <!-- IF config.requireEmailConfirmation -->
37
- <!-- IF email -->
38
- <!-- IF isSelf -->
39
- <a id="confirm-email" href="#" class="btn btn-warning <!-- IF email:confirmed -->hide<!-- ENDIF email:confirmed -->">[[user:confirm_email]]</a><br/><br/>
40
- <!-- ENDIF isSelf -->
41
- <!-- ENDIF email -->
42
- <!-- ENDIF config.requireEmailConfirmation -->
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 justify-content-between mb-3">
8
+ <h3 class="fw-semibold fs-5">{{{ if isSelf }}}[[user:edit-profile]]{{{ else }}}[[pages:account/edit, {username}]]{{{ end }}}</h3>
9
+ <button id="submitBtn" class="btn btn-primary">[[global:save_changes]]</button>
10
+ </div>
11
+ <div class="row">
12
+ <div class="col-xl-6 col-12">
13
+ <form role="form" component="profile/edit/form">
14
+ <div class="mb-2">
15
+ <label class="form-label fw-bold" for="fullname">[[user:fullname]]</label>
16
+ <input class="form-control" type="text" id="fullname" name="fullname" placeholder="[[user:fullname]]" value="{fullname}">
17
+ </div>
18
+ <!-- IF allowWebsite -->
19
+ <div class="mb-2">
20
+ <label class="form-label fw-bold" for="website">[[user:website]]</label>
21
+ <input class="form-control" type="text" id="website" name="website" placeholder="http://..." value="{website}">
22
+ </div>
23
+ <!-- ENDIF allowWebsite -->
43
24
 
44
- <!-- IF allowAccountDelete -->
45
- <!-- IF isSelf -->
46
- <a id="deleteAccountBtn" href="#" class="btn btn-danger">[[user:delete_account]]</a><br/><br/>
47
- <!-- ENDIF isSelf -->
48
- <!-- ENDIF allowAccountDelete -->
25
+ <div class="mb-2">
26
+ <label class="form-label fw-bold" for="location">[[user:location]]</label>
27
+ <input class="form-control" type="text" id="location" name="location" placeholder="[[user:location]]" value="{location}">
28
+ </div>
49
29
 
50
- </div>
51
- </div>
30
+ <div class="mb-2">
31
+ <label class="form-label fw-bold" for="birthday">[[user:birthday]]</label>
32
+ <input class="form-control" type="date" id="birthday" name="birthday" value="{birthday}" placeholder="mm/dd/yyyy">
33
+ </div>
52
34
 
53
- <div class="<!-- IF !sso.length -->col-md-9 col-sm-8<!-- ELSE -->col-md-5 col-sm-4<!-- ENDIF !sso.length -->">
54
- <form role="form" component="profile/edit/form">
55
- <div class="mb-2">
56
- <label class="form-label fw-bold" for="fullname">[[user:fullname]]</label>
57
- <input class="form-control" type="text" id="fullname" name="fullname" placeholder="[[user:fullname]]" value="{fullname}">
58
- </div>
59
- <!-- IF allowWebsite -->
60
- <div class="mb-2">
61
- <label class="form-label fw-bold" for="website">[[user:website]]</label>
62
- <input class="form-control" type="text" id="website" name="website" placeholder="http://..." value="{website}">
63
- </div>
64
- <!-- ENDIF allowWebsite -->
35
+ <div class="mb-2">
36
+ <label class="form-label fw-bold" for="groupTitle">[[user:grouptitle]]</label>
65
37
 
66
- <div class="mb-2">
67
- <label class="form-label fw-bold" for="location">[[user:location]]</label>
68
- <input class="form-control" type="text" id="location" name="location" placeholder="[[user:location]]" value="{location}">
69
- </div>
38
+ <select class="form-select mb-1" id="groupTitle" name="groupTitle" <!-- IF allowMultipleBadges --> size="{groupSelectSize}" multiple<!-- ENDIF allowMultipleBadges -->>
39
+ <option value="">[[user:no-group-title]]</option>
40
+ {{{each groups}}}
41
+ <!-- IF groups.userTitleEnabled -->
42
+ <option value="{groups.displayName}" <!-- IF groups.selected -->selected<!-- ENDIF groups.selected -->>{groups.userTitle}</option>
43
+ <!-- ENDIF groups.userTitleEnabled -->
44
+ {{{end}}}
45
+ </select>
46
+ <!-- IF allowMultipleBadges -->
47
+ <div class="d-none d-md-block">
48
+ <span class="form-text">[[user:group-order-help]]</span>
49
+ <i role="button" component="group/order/up" class="fa fa-chevron-up"></i> <i role="button" component="group/order/down" class="fa fa-chevron-down"></i>
50
+ </div>
51
+ <!-- ENDIF -->
52
+ </div>
70
53
 
71
- <div class="mb-2">
72
- <label class="form-label fw-bold" for="birthday">[[user:birthday]]</label>
73
- <input class="form-control" type="date" id="birthday" name="birthday" value="{birthday}" placeholder="mm/dd/yyyy">
74
- </div>
54
+ <!-- IF allowAboutMe -->
55
+ <div class="mb-2">
56
+ <label class="form-label fw-bold" for="aboutme">[[user:aboutme]]</label> <small><label id="aboutMeCharCountLeft"></label></small>
57
+ <textarea class="form-control" id="aboutme" name="aboutme" rows="5">{aboutme}</textarea>
58
+ </div>
59
+ <!-- ENDIF allowAboutMe -->
75
60
 
76
- <div class="mb-2">
77
- <label class="form-label fw-bold" for="groupTitle">[[user:grouptitle]]</label>
61
+ <!-- IF allowSignature -->
62
+ <!-- IF !disableSignatures -->
63
+ <div class="mb-2">
64
+ <label class="form-label fw-bold" for="signature">[[user:signature]]</label> <small><label id="signatureCharCountLeft"></label></small>
65
+ <textarea class="form-control" id="signature" name="signature" rows="5">{signature}</textarea>
66
+ </div>
67
+ <!-- ENDIF !disableSignatures -->
68
+ <!-- ENDIF allowSignature -->
69
+ </form>
70
+ <hr class="visible-xs visible-sm"/>
71
+ </div>
78
72
 
79
- <select class="form-select" id="groupTitle" name="groupTitle" <!-- IF allowMultipleBadges --> size="{groupSelectSize}" multiple<!-- ENDIF allowMultipleBadges -->>
80
- <option value="">[[user:no-group-title]]</option>
81
- {{{each groups}}}
82
- <!-- IF groups.userTitleEnabled -->
83
- <option value="{groups.displayName}" <!-- IF groups.selected -->selected<!-- ENDIF groups.selected -->>{groups.userTitle}</option>
84
- <!-- ENDIF groups.userTitleEnabled -->
73
+ <div class="col-xl-6 col-12">
74
+ <div class="text-center">
75
+ <ul class="list-group mb-3 text-sm text-nowrap">
76
+ <!-- IF allowProfilePicture -->
77
+ <a id="changePictureBtn" href="#" class="list-group-item px-1 text-decoration-none">[[user:change_picture]]</a>
78
+ <!-- ENDIF allowProfilePicture -->
79
+ <!-- IF !username:disableEdit -->
80
+ <a href="{config.relative_path}/user/{userslug}/edit/username" class="list-group-item px-1 text-decoration-none">[[user:change_username]]</a>
81
+ <!-- ENDIF !username:disableEdit -->
82
+ <!-- IF !email:disableEdit -->
83
+ <a href="{config.relative_path}/user/{userslug}/edit/email" class="list-group-item px-1 text-decoration-none">[[user:change_email]]</a>
84
+ <!-- ENDIF !email:disableEdit -->
85
+ <!-- IF canChangePassword -->
86
+ <a href="{config.relative_path}/user/{userslug}/edit/password" class="list-group-item px-1 text-decoration-none">[[user:change_password]]</a>
87
+ <!-- ENDIF canChangePassword -->
88
+ {{{each editButtons}}}
89
+ <a href="{config.relative_path}{editButtons.link}" class="list-group-item px-1 text-decoration-none">{editButtons.text}</a>
85
90
  {{{end}}}
86
- </select>
87
- <!-- IF allowMultipleBadges -->
88
- <span>[[user:group-order-help]]</span>
89
- <i role="button" component="group/order/up" class="fa fa-chevron-up"></i> <i role="button" component="group/order/down" class="fa fa-chevron-down"></i>
90
- <!-- ENDIF -->
91
- </div>
91
+ </ul>
92
92
 
93
- <!-- IF allowAboutMe -->
94
- <div class="mb-2">
95
- <label class="form-label fw-bold" for="aboutme">[[user:aboutme]]</label> <small><label id="aboutMeCharCountLeft"></label></small>
96
- <textarea class="form-control" id="aboutme" name="aboutme" rows="5">{aboutme}</textarea>
93
+ <!-- IF config.requireEmailConfirmation -->
94
+ <!-- IF email -->
95
+ <!-- IF isSelf -->
96
+ <a id="confirm-email" href="#" class="btn btn-warning <!-- IF email:confirmed -->hide<!-- ENDIF email:confirmed -->">[[user:confirm_email]]</a><br/><br/>
97
+ <!-- ENDIF isSelf -->
98
+ <!-- ENDIF email -->
99
+ <!-- ENDIF config.requireEmailConfirmation -->
97
100
  </div>
98
- <!-- ENDIF allowAboutMe -->
99
101
 
100
- <!-- IF allowSignature -->
101
- <!-- IF !disableSignatures -->
102
- <div class="mb-2">
103
- <label class="form-label fw-bold" for="signature">[[user:signature]]</label> <small><label id="signatureCharCountLeft"></label></small>
104
- <textarea class="form-control" id="signature" name="signature" rows="5">{signature}</textarea>
102
+ {{{ if sso.length }}}
103
+ <label class="form-label text-sm fw-semibold">[[user:sso.title]]</label>
104
+ <div class="list-group">
105
+ {{{each sso}}}
106
+ <div class="list-group-item d-flex justify-content-between">
107
+ <a class="text-sm text-reset text-decoration-none" data-component="{../component}" href="{../url}" target="<!-- IF ../associated -->_blank<!-- ELSE -->_top<!-- ENDIF ../associated -->">
108
+ <!-- IF ../icon --><i class="fa {../icon}"></i><!-- ENDIF ../icon -->
109
+ <!-- IF ../associated -->[[user:sso.associated]]<!-- ELSE -->[[user:sso.not-associated]]<!-- ENDIF ../associated -->
110
+ {../name}
111
+ </a>
112
+ <!-- IF ../deauthUrl -->
113
+ <a data-component="{../component}" class="btn btn-outline-secondary btn-sm" href="{../deauthUrl}">[[user:sso.dissociate]]</a>
114
+ <!-- END -->
115
+ </div>
116
+ {{{end}}}
105
117
  </div>
106
- <!-- ENDIF !disableSignatures -->
107
- <!-- ENDIF allowSignature -->
108
-
109
- <a id="submitBtn" href="#" class="btn btn-primary">[[global:save_changes]]</a>
110
- </form>
118
+ {{{ end }}}
111
119
 
112
- <hr class="visible-xs visible-sm"/>
113
- </div>
114
-
115
- <!-- IF sso.length -->
116
- <div class="col-md-4 col-sm-4">
117
- <label>[[user:sso.title]]</label>
118
- <div class="list-group">
119
- {{{each sso}}}
120
- <div class="list-group-item">
121
- <!-- IF ../deauthUrl -->
122
- <a data-component="{../component}" class="btn btn-outline-secondary btn-sm float-end" href="{../deauthUrl}">[[user:sso.dissociate]]</a>
123
- <!-- END -->
124
- <a data-component="{../component}" href="{../url}" target="<!-- IF ../associated -->_blank<!-- ELSE -->_top<!-- ENDIF ../associated -->">
125
- <!-- IF ../icon --><i class="fa {../icon}"></i><!-- ENDIF ../icon -->
126
- <!-- IF ../associated -->[[user:sso.associated]]<!-- ELSE -->[[user:sso.not-associated]]<!-- ENDIF ../associated -->
127
- {../name}
128
- </a>
120
+ <hr/>
121
+ {{{ if (allowAccountDelete && isSelf) }}}
122
+ <div class="d-flex justify-content-end">
123
+ <button id="deleteAccountBtn" class="btn btn-danger">[[user:delete_account]]</button>
129
124
  </div>
130
- {{{end}}}
125
+ {{{ end }}}
131
126
  </div>
132
127
  </div>
133
- <!-- ENDIF sso.length -->
134
128
  </div>
135
- <!-- IF sso.length --></div><!-- ENDIF sso.length -->
129
+ </div>
136
130
  </div>
137
131
 
132
+
@@ -1,10 +1,9 @@
1
1
  <div class="account">
2
2
  <!-- IMPORT partials/account/header.tpl -->
3
3
 
4
- <div class="row gx-5">
4
+ <div class="d-flex flex-column flex-md-row">
5
5
  <!-- IMPORT partials/account/sidebar-left.tpl -->
6
-
7
- <div class="col-12 col-md-9 col-lg-10 ps-md-5">
6
+ <div class="flex-1 ps-md-2 ps-lg-5" style="min-width: 0;">
8
7
  <h3 class="fw-semibold fs-5">[[pages:{template.name}, {username}]]</h3>
9
8
 
10
9
  {{{ if !users.length }}}
@@ -1,10 +1,9 @@
1
1
  <div class="account">
2
2
  <!-- IMPORT partials/account/header.tpl -->
3
3
 
4
- <div class="row gx-5">
4
+ <div class="d-flex flex-column flex-md-row">
5
5
  <!-- IMPORT partials/account/sidebar-left.tpl -->
6
-
7
- <div class="col-12 col-md-9 col-lg-10 ps-md-5">
6
+ <div class="flex-1 ps-md-2 ps-lg-5" style="min-width: 0;">
8
7
  <h3 class="fw-semibold fs-5">[[pages:{template.name}, {username}]]</h3>
9
8
 
10
9
  {{{ if !users.length }}}
@@ -1,10 +1,9 @@
1
1
  <div class="account">
2
2
  <!-- IMPORT partials/account/header.tpl -->
3
3
 
4
- <div class="row gx-5">
4
+ <div class="d-flex flex-column flex-md-row">
5
5
  <!-- IMPORT partials/account/sidebar-left.tpl -->
6
-
7
- <div class="col-12 col-md-9 col-lg-10 ps-md-5">
6
+ <div class="flex-1 ps-md-2 ps-lg-5" style="min-width: 0;">
8
7
  <h3 class="fw-semibold fs-5">[[pages:{template.name}, {username}]]</h3>
9
8
 
10
9
  <div class="groups">