From 53b3c5d6692ee94642fff27a9235befedb33ced9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 28 Feb 2024 11:41:18 -0500 Subject: [PATCH] feat: add chat widget areas, closes #12375 --- install/package.json | 2 +- src/views/chats.tpl | 95 ++++++++++++++++++++++++-------------------- src/widgets/index.js | 3 ++ 3 files changed, 56 insertions(+), 44 deletions(-) diff --git a/install/package.json b/install/package.json index 6be29ac657..5cb332cc70 100644 --- a/install/package.json +++ b/install/package.json @@ -103,7 +103,7 @@ "nodebb-plugin-ntfy": "1.7.3", "nodebb-plugin-spam-be-gone": "2.2.1", "nodebb-rewards-essentials": "1.0.0", - "nodebb-theme-harmony": "1.2.31", + "nodebb-theme-harmony": "1.2.32", "nodebb-theme-lavender": "7.1.7", "nodebb-theme-peace": "2.2.1", "nodebb-theme-persona": "13.3.10", diff --git a/src/views/chats.tpl b/src/views/chats.tpl index 23db9e49fc..06481d7642 100644 --- a/src/views/chats.tpl +++ b/src/views/chats.tpl @@ -1,54 +1,63 @@ -
-
+
+
+
+
-
- -
+
+ +
- {{{ if publicRooms.length }}} -
+ {{{ if publicRooms.length }}} +
-
-
- - -
-
-
- {{{ each publicRooms }}} -
-
{./roomName}
{./unreadCountText}
-
-
+
+
+ + +
+
+
+ {{{ each publicRooms }}} +
+
{./roomName}
{./unreadCountText}
+
+
+
+
+ {{{ end }}}
+
+ {{{ end }}} + +
+ +
+ {{{ if publicRooms.length }}} +
+ + +
{{{ end }}} + +
+ {{{ each rooms }}} + + {{{ end }}} +
+
+ +
+
[[topic:composer.drag-and-drop-images]]
+
+
+ {{{ each widgets.sidebar }}} + {{widgets.sidebar.html}} {{{ end }}} - -
- -
- {{{ if publicRooms.length }}} -
- - -
- {{{ end }}} - -
- {{{each rooms}}} - - {{{end}}} -
-
-
- -
-
[[topic:composer.drag-and-drop-images]]
-
\ No newline at end of file +
diff --git a/src/widgets/index.js b/src/widgets/index.js index 4302ac74c0..9f31e60805 100644 --- a/src/widgets/index.js +++ b/src/widgets/index.js @@ -196,6 +196,9 @@ widgets.getAvailableAreas = async function () { { name: 'Group Page (Left)', template: 'groups/details.tpl', location: 'left' }, { name: 'Group Page (Right)', template: 'groups/details.tpl', location: 'right' }, + + { name: 'Chat Header', template: 'chats.tpl', location: 'header' }, + { name: 'Chat Sidebar', template: 'chats.tpl', location: 'sidebar' }, ]; return await plugins.hooks.fire('filter:widgets.getAreas', defaultAreas);