nodebb-theme-harmony 1.0.0-beta.74 → 1.0.0-beta.76
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/library.js
CHANGED
|
@@ -138,25 +138,6 @@ library.saveUserSettings = async function (hookData) {
|
|
|
138
138
|
return hookData;
|
|
139
139
|
};
|
|
140
140
|
|
|
141
|
-
library.addUserToTopic = async function (hookData) {
|
|
142
|
-
const { enableQuickReply } = await loadThemeConfig(hookData.req.uid);
|
|
143
|
-
if (enableQuickReply) {
|
|
144
|
-
if (hookData.req.user) {
|
|
145
|
-
const userData = await user.getUserData(hookData.req.uid);
|
|
146
|
-
hookData.templateData.loggedInUser = userData;
|
|
147
|
-
} else {
|
|
148
|
-
hookData.templateData.loggedInUser = {
|
|
149
|
-
uid: 0,
|
|
150
|
-
username: '[[global:guest]]',
|
|
151
|
-
picture: user.getDefaultAvatar(),
|
|
152
|
-
'icon:text': '?',
|
|
153
|
-
'icon:bgColor': '#aaa',
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return hookData;
|
|
158
|
-
};
|
|
159
|
-
|
|
160
141
|
library.filterMiddlewareRenderHeader = async function (hookData) {
|
|
161
142
|
const userSettings = await user.getSettings(hookData.req.uid);
|
|
162
143
|
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
{ "hook": "filter:settings.get", "method": "getAdminSettings"},
|
|
9
9
|
{ "hook": "filter:user.saveSettings", "method": "saveUserSettings" },
|
|
10
10
|
{ "hook": "filter:user.profileMenu", "method": "addProfileItem" },
|
|
11
|
-
{ "hook": "filter:topic.build", "method": "addUserToTopic" },
|
|
12
11
|
{ "hook": "filter:middleware.renderHeader", "method": "filterMiddlewareRenderHeader" },
|
|
13
12
|
{ "hook": "filter:middleware.render", "method": "removeFinalBreadcrumb" }
|
|
14
13
|
],
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
{{{ end }}}
|
|
64
64
|
|
|
65
65
|
{{{ if !posts.deleted }}}
|
|
66
|
-
{{{ if posts.display_history }}}
|
|
66
|
+
{{{ if (posts.display_history && privileges.posts:history)}}}
|
|
67
67
|
<li>
|
|
68
68
|
<a class="dropdown-item" component="post/view-history" role="menuitem" tabindex="-1" href="#">
|
|
69
69
|
<span class="menu-icon"><i class="fa fa-fw fa-history"></i></span> [[topic:view-history]]
|
|
@@ -103,13 +103,13 @@
|
|
|
103
103
|
|
|
104
104
|
<div component="post/actions" class="d-flex justify-content-end gap-1 post-tools">
|
|
105
105
|
<!-- IMPORT partials/topic/reactions.tpl -->
|
|
106
|
-
<a component="post/reply" href="#" class="btn-ghost-sm user-select-none {{{ if !privileges.topics:reply }}}hidden{{{ end }}}" title="[[topic:reply]]"><i class="fa fa-reply text-primary"></i></a>
|
|
107
|
-
<a component="post/quote" href="#" class="btn-ghost-sm user-select-none {{{ if !privileges.topics:reply }}}hidden{{{ end }}}" title="[[topic:quote]]"><i class="fa fa-quote-right text-primary"></i></a>
|
|
106
|
+
<a component="post/reply" href="#" class="btn-ghost-sm user-select-none {{{ if !privileges.topics:reply }}}hidden{{{ end }}}" title="[[topic:reply]]"><i class="fa fa-fw fa-reply text-primary"></i></a>
|
|
107
|
+
<a component="post/quote" href="#" class="btn-ghost-sm user-select-none {{{ if !privileges.topics:reply }}}hidden{{{ end }}}" title="[[topic:quote]]"><i class="fa fa-fw fa-quote-right text-primary"></i></a>
|
|
108
108
|
|
|
109
109
|
{{{ if !reputation:disabled }}}
|
|
110
110
|
<div class="d-flex votes align-items-stretch">
|
|
111
111
|
<a component="post/upvote" href="#" class="btn-ghost-sm {{{ if posts.upvoted }}}upvoted{{{ end }}}">
|
|
112
|
-
<i class="fa fa-chevron-up text-primary"></i>
|
|
112
|
+
<i class="fa fa-fw fa-chevron-up text-primary"></i>
|
|
113
113
|
</a>
|
|
114
114
|
|
|
115
115
|
<meta itemprop="upvoteCount" content="{posts.upvotes}">
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
|
|
119
119
|
{{{ if !downvote:disabled }}}
|
|
120
120
|
<a component="post/downvote" href="#" class="btn-ghost-sm {{{ if posts.downvoted }}}downvoted{{{ end }}}">
|
|
121
|
-
<i class="fa fa-chevron-down text-primary"></i>
|
|
121
|
+
<i class="fa fa-fw fa-chevron-down text-primary"></i>
|
|
122
122
|
</a>
|
|
123
123
|
{{{ end }}}
|
|
124
124
|
</div>
|
package/templates/topic.tpl
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</h2>
|
|
13
13
|
|
|
14
14
|
<div class="topic-info d-flex gap-2 align-items-center flex-wrap {{{ if config.theme.centerHeaderElements }}}justify-content-center{{{ end }}}">
|
|
15
|
-
<span component="topic/labels" class="d-flex gap-2">
|
|
15
|
+
<span component="topic/labels" class="d-flex gap-2 {{{ if (!scheduled && (!pinned && (!locked && (!oldCid && !icons.length)))) }}}hidden{{{ end }}}">
|
|
16
16
|
<span component="topic/scheduled" class="badge badge border border-gray-300 text-primary {{{ if !scheduled }}}hidden{{{ end }}}">
|
|
17
17
|
<i class="fa fa-clock-o"></i>
|
|
18
18
|
[[topic:scheduled]]
|