nodebb-theme-harmony 2.0.24 → 2.0.26

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": "2.0.24",
3
+ "version": "2.0.26",
4
4
  "nbbpm": {
5
5
  "compatibility": "^4.0.0"
6
6
  },
package/public/harmony.js CHANGED
@@ -63,6 +63,7 @@ $(document).ready(function () {
63
63
  });
64
64
 
65
65
  const bottomBar = $('[component="bottombar"]');
66
+ let stickyTools = null;
66
67
  const location = config.theme.topMobilebar ? 'top' : 'bottom';
67
68
  const $body = $('body');
68
69
  const $window = $(window);
@@ -94,8 +95,8 @@ $(document).ready(function () {
94
95
  -bottomBar.find('.bottombar-nav').outerHeight(true) :
95
96
  0,
96
97
  });
97
- if (config.theme.topMobilebar && config.theme.autohideBottombar) {
98
- $('.sticky-tools').css({
98
+ if (stickyTools && config.theme.topMobilebar && config.theme.autohideBottombar) {
99
+ stickyTools.css({
99
100
  top: isHiding ? 0 : 'var(--panel-offset)',
100
101
  });
101
102
  }
@@ -121,6 +122,8 @@ $(document).ready(function () {
121
122
  setTimeout(enableAutohide, 250);
122
123
  });
123
124
  hooks.on('action:ajaxify.end', function () {
125
+ const { template } = ajaxify.data;
126
+ stickyTools = (template.category || template.topic) ? $('.sticky-tools') : null;
124
127
  $window.off('scroll', delayedScroll);
125
128
  if (config.theme.autohideBottombar) {
126
129
  bottomBar.css({ [location]: 0 });
@@ -15,7 +15,8 @@
15
15
  </div>
16
16
  <div>
17
17
  <div class="d-flex justify-content-end gap-2">
18
- <button type="submit" component="topic/quickreply/expand" class="btn btn-ghost btn-sm border" title="[[topic:open-composer]]"><i class="fa fa-expand"></i></button>
18
+ <button type="button" component="topic/quickreply/upload/button" class="btn btn-ghost btn-sm border"><i class="fa fa-upload"></i></button>
19
+ <button type="button" component="topic/quickreply/expand" class="btn btn-ghost btn-sm border" title="[[topic:open-composer]]"><i class="fa fa-expand"></i></button>
19
20
  <button type="submit" component="topic/quickreply/button" class="btn btn-sm btn-primary">[[topic:post-quick-reply]]</button>
20
21
  </div>
21
22
  </div>