nodebb-theme-harmony 1.0.23 → 1.0.25
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/languages/harmony.json +1 -0
- package/lib/controllers.js +2 -2
- package/library.js +3 -1
- package/package.json +1 -1
- package/public/harmony.js +2 -2
- package/scss/chats.scss +8 -0
- package/templates/account/theme.tpl +15 -8
- package/templates/admin/plugins/harmony.tpl +13 -7
- package/templates/chat.tpl +42 -0
- package/templates/partials/chats/options.tpl +1 -1
- package/templates/partials/chats/recent_room.tpl +0 -1
- package/templates/partials/sidebar/logged-out-menu.tpl +2 -2
- package/templates/partials/sidebar-left.tpl +2 -2
- package/templates/partials/skin-switcher.tpl +2 -2
- package/languages/en-GB/harmony.json +0 -14
- package/languages/he/harmony.json +0 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/lib/controllers.js
CHANGED
|
@@ -15,8 +15,8 @@ Controllers.renderThemeSettings = async (req, res, next) => {
|
|
|
15
15
|
return next();
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
userData.title = '[[harmony:settings.title]]';
|
|
19
|
-
userData.breadcrumbs = helpers.buildBreadcrumbs([{ text: userData.username, url: `/user/${userData.userslug}` }, { text: '[[harmony:settings.title]]' }]);
|
|
18
|
+
userData.title = '[[themes/harmony:settings.title]]';
|
|
19
|
+
userData.breadcrumbs = helpers.buildBreadcrumbs([{ text: userData.username, url: `/user/${userData.userslug}` }, { text: '[[themes/harmony:settings.title]]' }]);
|
|
20
20
|
|
|
21
21
|
res.render('account/theme', userData);
|
|
22
22
|
};
|
package/library.js
CHANGED
|
@@ -16,6 +16,7 @@ const defaults = {
|
|
|
16
16
|
stickyToolbar: 'on',
|
|
17
17
|
autohideBottombar: 'off',
|
|
18
18
|
openSidebars: 'off',
|
|
19
|
+
chatModals: 'off',
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
library.init = async function (params) {
|
|
@@ -64,7 +65,7 @@ library.addProfileItem = async (data) => {
|
|
|
64
65
|
id: 'theme',
|
|
65
66
|
route: 'theme',
|
|
66
67
|
icon: 'fa-paint-brush',
|
|
67
|
-
name: '[[harmony:settings.title]]',
|
|
68
|
+
name: '[[themes/harmony:settings.title]]',
|
|
68
69
|
visibility: {
|
|
69
70
|
self: true,
|
|
70
71
|
other: false,
|
|
@@ -146,6 +147,7 @@ async function loadThemeConfig(uid) {
|
|
|
146
147
|
config.stickyToolbar = config.stickyToolbar === 'on';
|
|
147
148
|
config.autohideBottombar = config.autohideBottombar === 'on';
|
|
148
149
|
config.openSidebars = config.openSidebars === 'on';
|
|
150
|
+
config.chatModals = config.chatModals === 'on';
|
|
149
151
|
return config;
|
|
150
152
|
}
|
|
151
153
|
|
package/package.json
CHANGED
package/public/harmony.js
CHANGED
|
@@ -36,8 +36,8 @@ $(document).ready(function () {
|
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
hooks.on('filter:chat.openChat', function (hookData) {
|
|
39
|
-
// disables chat modals & goes straight to chat page
|
|
40
|
-
hookData.modal =
|
|
39
|
+
// disables chat modals & goes straight to chat page based on user setting
|
|
40
|
+
hookData.modal = config.theme.chatModals;
|
|
41
41
|
return hookData;
|
|
42
42
|
});
|
|
43
43
|
});
|
package/scss/chats.scss
CHANGED
|
@@ -105,5 +105,13 @@ body.page-user-chats {
|
|
|
105
105
|
[component="chat/nav-wrapper"][data-loaded="0"] + [component="chat/main-wrapper"] {
|
|
106
106
|
display: none!important;
|
|
107
107
|
}
|
|
108
|
+
}
|
|
108
109
|
|
|
110
|
+
.chat-modal {
|
|
111
|
+
left: auto;
|
|
112
|
+
top: auto;
|
|
113
|
+
bottom: 0px;
|
|
114
|
+
right: 2rem;
|
|
115
|
+
width: auto!important;
|
|
116
|
+
height: auto!important;
|
|
109
117
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- IMPORT partials/account/header.tpl -->
|
|
2
2
|
|
|
3
3
|
<div class="mb-3 d-flex justify-content-between">
|
|
4
|
-
<h3 class="fw-semibold fs-5">[[harmony:settings.title]]</h3>
|
|
4
|
+
<h3 class="fw-semibold fs-5">[[themes/harmony:settings.title]]</h3>
|
|
5
5
|
|
|
6
6
|
<button id="save" type="button" class="btn btn-primary">[[global:save_changes]]</button>
|
|
7
7
|
</div>
|
|
@@ -9,25 +9,25 @@
|
|
|
9
9
|
<form id="theme-settings" role="form">
|
|
10
10
|
<div class="form-check mb-3">
|
|
11
11
|
<input class="form-check-input" type="checkbox" id="enableQuickReply" name="enableQuickReply" {{{ if config.theme.enableQuickReply }}}checked{{{ end }}}>
|
|
12
|
-
<label class="form-check-label" for="enableQuickReply">[[harmony:settings.enableQuickReply]]</label>
|
|
12
|
+
<label class="form-check-label" for="enableQuickReply">[[themes/harmony:settings.enableQuickReply]]</label>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
15
|
<div class="form-check mb-3">
|
|
16
16
|
<input class="form-check-input" type="checkbox" id="centerHeaderElements" name="centerHeaderElements" {{{ if config.theme.centerHeaderElements }}}checked{{{ end }}}>
|
|
17
|
-
<label class="form-check-label" for="centerHeaderElements">[[harmony:settings.centerHeaderElements]]</label>
|
|
17
|
+
<label class="form-check-label" for="centerHeaderElements">[[themes/harmony:settings.centerHeaderElements]]</label>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
20
|
<div class="form-check mb-3">
|
|
21
21
|
<input class="form-check-input" type="checkbox" id="mobileTopicTeasers" name="mobileTopicTeasers" {{{ if config.theme.mobileTopicTeasers }}}checked{{{ end }}}>
|
|
22
|
-
<label class="form-check-label" for="mobileTopicTeasers">[[harmony:settings.mobileTopicTeasers]]</label>
|
|
22
|
+
<label class="form-check-label" for="mobileTopicTeasers">[[themes/harmony:settings.mobileTopicTeasers]]</label>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
25
|
<div class="form-check mb-3">
|
|
26
26
|
<input class="form-check-input" type="checkbox" id="stickyToolbar" name="stickyToolbar" {{{ if config.theme.stickyToolbar }}}checked{{{ end }}}>
|
|
27
27
|
<label class="form-check-label" for="stickyToolbar">
|
|
28
|
-
[[harmony:settings.stickyToolbar]]
|
|
28
|
+
[[themes/harmony:settings.stickyToolbar]]
|
|
29
29
|
<p class="form-text mb-0">
|
|
30
|
-
[[harmony:settings.stickyToolbar.help]]
|
|
30
|
+
[[themes/harmony:settings.stickyToolbar.help]]
|
|
31
31
|
</p>
|
|
32
32
|
</label>
|
|
33
33
|
</div>
|
|
@@ -35,13 +35,20 @@
|
|
|
35
35
|
<div class="form-check mb-3">
|
|
36
36
|
<input class="form-check-input" type="checkbox" id="autohideBottombar" name="autohideBottombar" {{{ if config.theme.autohideBottombar }}}checked{{{ end }}}>
|
|
37
37
|
<label class="form-check-label" for="autohideBottombar">
|
|
38
|
-
[[harmony:settings.autohideBottombar]]
|
|
38
|
+
[[themes/harmony:settings.autohideBottombar]]
|
|
39
39
|
<p class="form-text mb-0">
|
|
40
|
-
[[harmony:settings.autohideBottombar.help]]
|
|
40
|
+
[[themes/harmony:settings.autohideBottombar.help]]
|
|
41
41
|
</p>
|
|
42
42
|
</label>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
|
+
<div class="form-check mb-3">
|
|
46
|
+
<input class="form-check-input" type="checkbox" id="chatModals" name="chatModals" {{{ if config.theme.chatModals }}}checked{{{ end }}}>
|
|
47
|
+
<label class="form-check-label" for="chatModals">
|
|
48
|
+
[[themes/harmony:settings.chatModals]]
|
|
49
|
+
</label>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
45
52
|
</form>
|
|
46
53
|
|
|
47
54
|
<!-- IMPORT partials/account/footer.tpl -->
|
|
@@ -4,34 +4,40 @@
|
|
|
4
4
|
<form role="form" class="harmony-settings">
|
|
5
5
|
<div class="form-check form-switch">
|
|
6
6
|
<input type="checkbox" class="form-check-input" id="enableQuickReply" name="enableQuickReply" />
|
|
7
|
-
<label for="enableQuickReply" class="form-check-label">[[harmony:settings.enableQuickReply]]</label>
|
|
7
|
+
<label for="enableQuickReply" class="form-check-label">[[themes/harmony:settings.enableQuickReply]]</label>
|
|
8
8
|
</div>
|
|
9
9
|
<div class="form-check form-switch">
|
|
10
10
|
<input type="checkbox" class="form-check-input" id="centerHeaderElements" name="centerHeaderElements" />
|
|
11
|
-
<label for="centerHeaderElements" class="form-check-label">[[harmony:settings.centerHeaderElements]]</label>
|
|
11
|
+
<label for="centerHeaderElements" class="form-check-label">[[themes/harmony:settings.centerHeaderElements]]</label>
|
|
12
12
|
</div>
|
|
13
13
|
<div class="form-check form-switch">
|
|
14
14
|
<input type="checkbox" class="form-check-input" id="mobileTopicTeasers" name="mobileTopicTeasers" />
|
|
15
|
-
<label for="mobileTopicTeasers" class="form-check-label">[[harmony:settings.mobileTopicTeasers]]</label>
|
|
15
|
+
<label for="mobileTopicTeasers" class="form-check-label">[[themes/harmony:settings.mobileTopicTeasers]]</label>
|
|
16
16
|
</div>
|
|
17
17
|
<div class="form-check form-switch">
|
|
18
18
|
<input type="checkbox" class="form-check-input" id="stickyToolbar" name="stickyToolbar" />
|
|
19
19
|
<div for="stickyToolbar" class="form-check-label">
|
|
20
|
-
[[harmony:settings.stickyToolbar]]
|
|
20
|
+
[[themes/harmony:settings.stickyToolbar]]
|
|
21
21
|
<p class="form-text">
|
|
22
|
-
[[harmony:settings.stickyToolbar.help]]
|
|
22
|
+
[[themes/harmony:settings.stickyToolbar.help]]
|
|
23
23
|
</p>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
26
|
<div class="form-check form-switch">
|
|
27
27
|
<input type="checkbox" class="form-check-input" id="autohideBottombar" name="autohideBottombar" />
|
|
28
28
|
<div for="autohideBottombar" class="form-check-label">
|
|
29
|
-
[[harmony:settings.autohideBottombar]]
|
|
29
|
+
[[themes/harmony:settings.autohideBottombar]]
|
|
30
30
|
<p class="form-text">
|
|
31
|
-
[[harmony:settings.autohideBottombar.help]]
|
|
31
|
+
[[themes/harmony:settings.autohideBottombar.help]]
|
|
32
32
|
</p>
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
|
+
<div class="form-check form-switch">
|
|
36
|
+
<input type="checkbox" class="form-check-input" id="chatModals" name="chatModals" />
|
|
37
|
+
<div for="chatModals" class="form-check-label">
|
|
38
|
+
[[themes/harmony:settings.chatModals]]
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
35
41
|
</form>
|
|
36
42
|
</div>
|
|
37
43
|
</div>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<div id="chat-modal" class="chat-modal d-flex flex-nowrap modal hide overflow-visible" tabindex="-1" role="dialog" aria-labelledby="Chat" aria-hidden="true" data-center="false">
|
|
2
|
+
<div class="modal-dialog">
|
|
3
|
+
<div class="modal-content">
|
|
4
|
+
<div class="modal-header d-flex gap-4 justify-content-between">
|
|
5
|
+
<div class="fs-6 flex-grow-1" component="chat/room/name">{./chatWithMessage}</div>
|
|
6
|
+
<div class="d-flex gap-1 align-items-center">
|
|
7
|
+
<button type="button" class="btn-ghost-sm d-none d-md-flex" data-action="maximize">
|
|
8
|
+
<i class="fa fa-fw fa-expand text-muted"></i>
|
|
9
|
+
</button>
|
|
10
|
+
|
|
11
|
+
<!-- IMPORT partials/chats/options.tpl -->
|
|
12
|
+
|
|
13
|
+
<button id="chat-close-btn" type="button" class="btn-close btn-ghost-sm" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div class="modal-body d-flex flex-column" style="height: 500px;">
|
|
18
|
+
<div class="position-relative">
|
|
19
|
+
<div component="chat/messages/scroll-up-alert" class="position-absolute scroll-up-alert alert alert-info hidden w-100" role="button" style="z-index: 1;">[[modules:chat.scroll-up-alert]]</div>
|
|
20
|
+
</div>
|
|
21
|
+
<ul class="chat-content p-0 m-0 list-unstyled d-flex flex-column overflow-auto flex-grow-1" component="chat/messages">
|
|
22
|
+
<!-- IMPORT partials/chats/messages.tpl -->
|
|
23
|
+
</ul>
|
|
24
|
+
|
|
25
|
+
<div component="chat/composer" class="d-flex flex-column flex-md-row gap-2 border-top pt-2 align-items-start align-items-md-end">
|
|
26
|
+
<div class="w-100 flex-grow-1 flex-nowrap position-relative input-group">
|
|
27
|
+
<button component="chat/upload/button" class="btn btn-outline-primary btn-sm align-self-stretch px-3 px-md-2" type="button"><i class="fa fa-fw fa-upload"></i></button>
|
|
28
|
+
<div class="flex-grow-1 position-relative">
|
|
29
|
+
<textarea component="chat/input" placeholder="[[modules:chat.placeholder.mobile]]" class="form-control chat-input mousetrap rounded-0" style="height:0;max-height:30vh;resize:none;"></textarea>
|
|
30
|
+
<span component="chat/message/remaining" class="text-xs text-muted position-absolute me-1 mb-1 end-0 bottom-0">{maximumChatMessageLength}</span>
|
|
31
|
+
</div>
|
|
32
|
+
<button class="btn btn-primary btn-sm align-self-stretch px-3 px-md-2" type="button" data-action="send"><i class="fa fa-fw fa-paper-plane"></i></button>
|
|
33
|
+
</div>
|
|
34
|
+
<form class="hidden" component="chat/upload" method="post" enctype="multipart/form-data">
|
|
35
|
+
<input type="file" name="files[]" multiple class="hidden"/>
|
|
36
|
+
</form>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="imagedrop"><div>[[topic:composer.drag_and_drop_images]]</div></div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="dropdown">
|
|
2
|
-
<button class="btn
|
|
2
|
+
<button class="btn-ghost-sm" data-bs-toggle="dropdown" component="chat/controlsToggle">
|
|
3
3
|
<i class="fa fa-gear text-muted"></i>
|
|
4
4
|
</button>
|
|
5
5
|
<ul class="dropdown-menu dropdown-menu-end p-1 text-sm" component="chat/controls">
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<div class="d-flex gap-1 justify-content-between p-1">
|
|
3
3
|
<div class="chat-room-btn position-relative d-flex flex-grow-1 gap-2 justify-content-start align-items-start btn-ghost-sm ff-sans">
|
|
4
4
|
<div class="main-avatar">
|
|
5
|
-
<a class="stretched-link" href="{config.relative_path}/me/chats/{./roomId}"></a>
|
|
6
5
|
{{{ if ./users.length }}}
|
|
7
6
|
{{{ if ./groupChat}}}
|
|
8
7
|
<div class="position-relative stacked-avatars">
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
|
|
28
28
|
{{{ if config.searchEnabled }}}
|
|
29
29
|
<li component="sidebar/search" class="visible-open nav-item mx-2 search">
|
|
30
|
-
<div class="d-flex gap-2 py-1 px-2 align-items-center" title="[[harmony:login-register-to-search]]">
|
|
30
|
+
<div class="d-flex gap-2 py-1 px-2 align-items-center" title="[[themes/harmony:login-register-to-search]]">
|
|
31
31
|
<i class="fa fa-fw fa-search text-muted"></i>
|
|
32
|
-
<span class="nav-text visible-open text-xs text-muted">[[harmony:login-register-to-search]]</span>
|
|
32
|
+
<span class="nav-text visible-open text-xs text-muted">[[themes/harmony:login-register-to-search]]</span>
|
|
33
33
|
</a>
|
|
34
34
|
</a>
|
|
35
35
|
{{{ end }}}
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
{{{ end }}}
|
|
34
34
|
|
|
35
35
|
<div class="sidebar-toggle m-2 d-none d-lg-block">
|
|
36
|
-
<a href="#" role="button" component="sidebar/toggle" class="nav-btn d-flex gap-2 align-items-center p-2 pointer nav-link w-100 text-nowrap" title="[[harmony:expand]]">
|
|
36
|
+
<a href="#" role="button" component="sidebar/toggle" class="nav-btn d-flex gap-2 align-items-center p-2 pointer nav-link w-100 text-nowrap" title="[[themes/harmony:expand]]">
|
|
37
37
|
<i class="fa fa-fw fa-angles-right"></i>
|
|
38
38
|
<i class="fa fa-fw fa-angles-left"></i>
|
|
39
|
-
<span class="nav-text visible-open fw-semibold small lh-1">[[harmony:collapse]]</span>
|
|
39
|
+
<span class="nav-text visible-open fw-semibold small lh-1">[[themes/harmony:collapse]]</span>
|
|
40
40
|
</a>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<div class="dropend m-2" component="skinSwitcher" title="[[harmony:skins]]">
|
|
1
|
+
<div class="dropend m-2" component="skinSwitcher" title="[[themes/harmony:skins]]">
|
|
2
2
|
<a data-bs-toggle="dropdown" href="#" role="button" class="nav-link nav-btn position-relative">
|
|
3
3
|
<span class="justify-content-between w-100">
|
|
4
4
|
<span class="d-flex gap-2 align-items-center text-nowrap truncate-open">
|
|
5
5
|
<span>
|
|
6
6
|
<i component="skinSwitcher/icon" class="fa fa-fw fa-paintbrush"></i>
|
|
7
7
|
</span>
|
|
8
|
-
<span class="nav-text small visible-open fw-semibold">[[harmony:skins]]</span>
|
|
8
|
+
<span class="nav-text small visible-open fw-semibold">[[themes/harmony:skins]]</span>
|
|
9
9
|
</span>
|
|
10
10
|
</span>
|
|
11
11
|
</a>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skins": "Skins",
|
|
3
|
-
"collapse": "Collapse",
|
|
4
|
-
"expand": "Expand",
|
|
5
|
-
"login-register-to-search": "Login or register to search.",
|
|
6
|
-
"settings.title": "Theme settings",
|
|
7
|
-
"settings.enableQuickReply": "Enable quick reply",
|
|
8
|
-
"settings.centerHeaderElements": "Center header elements",
|
|
9
|
-
"settings.mobileTopicTeasers": "Show topic teasers on mobile",
|
|
10
|
-
"settings.stickyToolbar": "Sticky toolbar",
|
|
11
|
-
"settings.stickyToolbar.help": "The toolbar on topic and category pages will stick to the top of the page",
|
|
12
|
-
"settings.autohideBottombar": "Auto hide bottom bar",
|
|
13
|
-
"settings.autohideBottombar.help": "The bottom bar on mobile view will be hidden when the page is scrolled down"
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skins": "עיצובים",
|
|
3
|
-
"collapse": "כיווץ",
|
|
4
|
-
"expand": "הרחבה",
|
|
5
|
-
"login-register-to-search": "התחבר או הירשם כדי לחפש.",
|
|
6
|
-
"settings.title": "הגדרות ערכת נושא",
|
|
7
|
-
"settings.enableQuickReply": "אפשר תשובה מהירה",
|
|
8
|
-
"settings.centerHeaderElements": "מרכז אלמנטים של כותרת",
|
|
9
|
-
"settings.mobileTopicTeasers": "הצג טיזרים לנושאים בנייד",
|
|
10
|
-
"settings.stickyToolbar": "סרגל כלים דביק",
|
|
11
|
-
"settings.stickyToolbar.help": "סרגל הכלים בדפי נושאים וקטגוריות ייצמד לראש העמוד",
|
|
12
|
-
"settings.autohideBottombar": "הסתר אוטומטית את הסרגל התחתון",
|
|
13
|
-
"settings.autohideBottombar.help": "הסרגל התחתון בתצוגת הנייד יוסתר כאשר הדף ייגלל מטה"
|
|
14
|
-
}
|