nodebb-theme-harmony 1.0.24 → 1.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.
@@ -0,0 +1 @@
1
+ {}
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) {
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-harmony",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.0.0"
6
6
  },
package/plugin.json CHANGED
@@ -21,5 +21,6 @@
21
21
  "staticDirs": {
22
22
  "inter": "node_modules/@fontsource/inter/files",
23
23
  "poppins": "node_modules/@fontsource/poppins/files"
24
- }
24
+ },
25
+ "languages": "languages"
25
26
  }
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 = false;
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
  }
@@ -42,6 +42,13 @@
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 -->
@@ -32,6 +32,12 @@
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>
@@ -33,7 +33,7 @@
33
33
 
34
34
  <div class="d-flex flex-column flex-md-row mt-1 justify-content-between w-100 gap-2">
35
35
  <div class="d-flex flex-grow-1 flex-row gap-2">
36
- <div class="d-flex flex-column">
36
+ <div class="d-flex flex-column gap-1">
37
37
  <h2 class="fullname fw-semibold fs-2 tracking-tight mb-0">{{{ if fullname }}}{fullname}{{{ else }}}{username}{{{ end }}}</h2>
38
38
  <div class="d-flex flex-wrap gap-1 text-sm align-items-center">
39
39
  <span class="username fw-bold">{{{ if !banned }}}@{username}{{{ else }}}[[user:banned]]{{{ end }}}</span>
@@ -47,7 +47,7 @@
47
47
  {{{ end }}}
48
48
  </div>
49
49
  </div>
50
-
50
+ <div class="d-flex gap-2" component="user/badges"></div>
51
51
  {{{ if isAdminOrGlobalModeratorOrModerator }}}
52
52
  {{{ if banned }}}
53
53
  <div class="text-xm text-muted">
@@ -1,5 +1,5 @@
1
1
  <div class="dropdown">
2
- <button class="btn btn-outline align-text-top" data-bs-toggle="dropdown" component="chat/controlsToggle">
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">