nodebb-theme-harmony 1.0.0-beta.116 → 1.0.0-beta.118
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
package/public/harmony.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
$(document).ready(function () {
|
|
4
|
+
setupSkinSwitcher();
|
|
4
5
|
setupNProgress();
|
|
5
6
|
setupMobileMenu();
|
|
6
7
|
setupSearch();
|
|
@@ -9,21 +10,22 @@ $(document).ready(function () {
|
|
|
9
10
|
setupNavTooltips();
|
|
10
11
|
fixPlaceholders();
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
function setupSkinSwitcher() {
|
|
14
|
+
$('[component="skinSwitcher"]').on('click', '.dropdown-item', function () {
|
|
15
|
+
const skin = $(this).attr('data-value');
|
|
16
|
+
$('[component="skinSwitcher"] .dropdown-item .fa-check').addClass('invisible');
|
|
17
|
+
$(this).find('.fa-check').removeClass('invisible');
|
|
18
|
+
require(['forum/account/settings', 'hooks'], function (accountSettings, hooks) {
|
|
19
|
+
hooks.one('action:skin.change', function () {
|
|
20
|
+
$('[component="skinSwitcher"] [component="skinSwitcher/icon"]').removeClass('fa-fade');
|
|
21
|
+
});
|
|
22
|
+
$('[component="skinSwitcher"] [component="skinSwitcher/icon"]').addClass('fa-fade');
|
|
23
|
+
accountSettings.changeSkin(skin);
|
|
24
|
+
});
|
|
19
25
|
});
|
|
20
|
-
}
|
|
26
|
+
}
|
|
21
27
|
|
|
22
28
|
require(['hooks'], function (hooks) {
|
|
23
|
-
hooks.on('action:skin.change', function () {
|
|
24
|
-
$('[component="skinSwitcher"] [component="skinSwitcher/icon"]').removeClass('fa-fade');
|
|
25
|
-
});
|
|
26
|
-
|
|
27
29
|
$(window).on('action:composer.resize action:sidebar.toggle', function () {
|
|
28
30
|
$('[component="composer"]').css({
|
|
29
31
|
left: $('.sidebar-left').outerWidth(true),
|
|
@@ -65,6 +67,9 @@ $(document).ready(function () {
|
|
|
65
67
|
$body.on('hidden.bs.dropdown', '.sticky-tools', function () {
|
|
66
68
|
bottomBar.removeClass('hidden');
|
|
67
69
|
});
|
|
70
|
+
function isSearchVisible() {
|
|
71
|
+
return !!$('[component="bottombar"] [component="sidebar/search"] .search-dropdown.show').length;
|
|
72
|
+
}
|
|
68
73
|
|
|
69
74
|
let lastScrollTop = 0;
|
|
70
75
|
let newPostsLoaded = false;
|
|
@@ -76,7 +81,7 @@ $(document).ready(function () {
|
|
|
76
81
|
lastScrollTop = st;
|
|
77
82
|
return;
|
|
78
83
|
}
|
|
79
|
-
if (st !== lastScrollTop && !navigator.scrollActive) {
|
|
84
|
+
if (st !== lastScrollTop && !navigator.scrollActive && !isSearchVisible()) {
|
|
80
85
|
const diff = Math.abs(st - lastScrollTop);
|
|
81
86
|
const scrolledDown = st > lastScrollTop;
|
|
82
87
|
const scrolledUp = st < lastScrollTop;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div component="topic/reply/container" class="btn-group action-bar {{{ if !privileges.topics:reply }}}hidden{{{ end }}}">
|
|
2
|
-
<a href="{config.relative_path}/compose?tid={tid}
|
|
2
|
+
<a href="{config.relative_path}/compose?tid={tid}" class="d-flex align-items-center btn btn-sm btn-primary px-3 fw-semibold " component="topic/reply" data-ajaxify="false" role="button"><i class="fa fa-reply d-sm-block d-md-none"></i><span class="d-none d-md-block"> [[topic:reply]]</span></a>
|
|
3
3
|
<button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-bs-toggle="dropdown">
|
|
4
4
|
<span class="caret"></span>
|
|
5
5
|
</button>
|