nodebb-theme-harmony 1.0.11 → 1.0.13

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": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.0.0"
6
6
  },
package/public/harmony.js CHANGED
@@ -27,10 +27,12 @@ $(document).ready(function () {
27
27
 
28
28
  require(['hooks'], function (hooks) {
29
29
  $(window).on('action:composer.resize action:sidebar.toggle', function () {
30
- $('[component="composer"]').css({
31
- left: $('.sidebar-left').outerWidth(true),
30
+ const isRtl = $('html').attr('data-dir') === 'rtl';
31
+ const css = {
32
32
  width: $('#panel').width(),
33
- });
33
+ };
34
+ css[isRtl ? 'right' : 'left'] = $('.sidebar-left').outerWidth(true);
35
+ $('[component="composer"]').css(css);
34
36
  });
35
37
 
36
38
  hooks.on('filter:chat.openChat', function (hookData) {
@@ -0,0 +1,25 @@
1
+ <div class="dropdown bottom-sheet">
2
+ <button type="button" class="btn-ghost-sm dropdown-toggle" data-bs-toggle="dropdown">
3
+ {{{ if selectedGroup }}}
4
+ <span class="fw-semibold">{selectedGroup.displayName}</span>
5
+ {{{ else }}}
6
+ <span class="fw-semibold">[[groups:all-groups]]</span>
7
+ {{{ end }}} <span class="caret"></span>
8
+ </button>
9
+ <ul class="dropdown-menu p-1 text-sm" role="menu">
10
+ <li role="presentation" class="user {{{ if !selectedGroup}}}selected{{{end}}}">
11
+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menu-item" href="{config.relative_path}/{allGroupsUrl}">
12
+ <div class="flex-grow-1">[[groups:all-groups]]</div>
13
+ <i class="flex-shrink-0 fa fa-fw {{{ if !selectedGroup }}}fa-check{{{ end }}}"></i>
14
+ </a>
15
+ </li>
16
+ {{{ each groups }}}
17
+ <li role="presentation" class="user {{{ if ./selected}}}selected{{{end}}}">
18
+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menu-item" href="{config.relative_path}/{./url}">
19
+ <div class="flex-grow-1 d-inline-flex gap-1 align-items-center">{./displayName}</div>
20
+ <i class="flex-shrink-0 fa fa-fw {{{ if ./selected }}}fa-check{{{ end }}}"></i>
21
+ </a>
22
+ </li>
23
+ {{{end}}}
24
+ </ul>
25
+ </div>