diff --git a/plugins/chat/assets/javascripts/discourse/components/channels-list.gjs b/plugins/chat/assets/javascripts/discourse/components/channels-list.gjs
index 315b79f8625..7f7bea1227d 100644
--- a/plugins/chat/assets/javascripts/discourse/components/channels-list.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/channels-list.gjs
@@ -1,10 +1,24 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
+import { fn, hash } from "@ember/helper";
+import { on } from "@ember/modifier";
import { action } from "@ember/object";
+import didInsert from "@ember/render-modifiers/modifiers/did-insert";
+import { LinkTo } from "@ember/routing";
import { schedule } from "@ember/runloop";
import { inject as service } from "@ember/service";
+import DButton from "discourse/components/d-button";
+import PluginOutlet from "discourse/components/plugin-outlet";
+import concatClass from "discourse/helpers/concat-class";
+import noop from "discourse/helpers/noop";
+import dIcon from "discourse-common/helpers/d-icon";
+import i18n from "discourse-common/helpers/i18n";
import { bind } from "discourse-common/utils/decorators";
+import and from "truth-helpers/helpers/and";
+import not from "truth-helpers/helpers/not";
import ChatModalNewMessage from "discourse/plugins/chat/discourse/components/chat/modal/new-message";
+import onResize from "../modifiers/chat/on-resize";
+import ChatChannelRow from "./chat-channel-row";
export default class ChannelsList extends Component {
@service chat;
@@ -119,4 +133,147 @@ export default class ChannelsList extends Component {
const scroller = document.querySelector(".channels-list");
scroller.scrollTo(0, position);
}
+
+
+ {{#if this.showMobileDirectMessageButton}}
+
+ {{/if}}
+
+
+ {{#if this.displayPublicChannels}}
+
+ {{#if this.inSidebar}}
+
+ {{dIcon "angle-up"}}
+
+ {{/if}}
+ {{i18n "chat.chat_channels"}}
+
+
+ {{dIcon "pencil-alt"}}
+
+
+
+
+ {{#if this.publicChannelsEmpty}}
+
+ {{i18n
+ "chat.no_public_channels"
+ }}
+
+ {{i18n "chat.click_to_join"}}
+
+
+ {{else}}
+ {{#each
+ this.chatChannelsManager.publicMessageChannels
+ as |channel|
+ }}
+
+ {{/each}}
+ {{/if}}
+
+
+ {{/if}}
+
+
+
+ {{#if this.showDirectMessageChannels}}
+
+ {{#if this.inSidebar}}
+
+ {{dIcon "angle-up"}}
+
+ {{/if}}
+ {{i18n
+ "chat.direct_messages.title"
+ }}
+
+ {{#if
+ (and
+ this.canCreateDirectMessageChannel
+ (not this.showMobileDirectMessageButton)
+ )
+ }}
+
+ {{/if}}
+
+ {{/if}}
+
+
+ {{#each
+ this.chatChannelsManager.truncatedDirectMessageChannels
+ as |channel|
+ }}
+
+ {{/each}}
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/channels-list.hbs b/plugins/chat/assets/javascripts/discourse/components/channels-list.hbs
deleted file mode 100644
index 628d53c9c59..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/channels-list.hbs
+++ /dev/null
@@ -1,122 +0,0 @@
-{{#if this.showMobileDirectMessageButton}}
-
-{{/if}}
-
-
- {{#if this.displayPublicChannels}}
-
- {{#if this.inSidebar}}
-
- {{d-icon "angle-up"}}
-
- {{/if}}
- {{i18n "chat.chat_channels"}}
-
-
- {{d-icon "pencil-alt"}}
-
-
-
-
- {{#if this.publicChannelsEmpty}}
-
- {{i18n "chat.no_public_channels"}}
-
- {{i18n "chat.click_to_join"}}
-
-
- {{else}}
- {{#each this.chatChannelsManager.publicMessageChannels as |channel|}}
-
- {{/each}}
- {{/if}}
-
-
- {{/if}}
-
-
-
- {{#if this.showDirectMessageChannels}}
-
- {{#if this.inSidebar}}
-
- {{d-icon "angle-up"}}
-
- {{/if}}
- {{i18n "chat.direct_messages.title"}}
-
- {{#if
- (and
- this.canCreateDirectMessageChannel
- (not this.showMobileDirectMessageButton)
- )
- }}
-
- {{/if}}
-
- {{/if}}
-
-
- {{#each
- this.chatChannelsManager.truncatedDirectMessageChannels
- as |channel|
- }}
-
- {{/each}}
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-archive-status.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-archive-status.gjs
index f89567a0300..718fe5e190d 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-archive-status.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-archive-status.gjs
@@ -3,6 +3,8 @@ import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import { isPresent } from "@ember/utils";
+import DButton from "discourse/components/d-button";
+import concatClass from "discourse/helpers/concat-class";
import { popupAjaxError } from "discourse/lib/ajax-error";
import getURL from "discourse-common/lib/get-url";
import I18n from "discourse-i18n";
@@ -50,4 +52,34 @@ export default class ChatChannelArchiveStatus extends Component {
}
return getURL(`/t/-/${this.args.channel.archive.topicId}`);
}
+
+
+ {{#if this.shouldRender}}
+ {{#if @channel.archive.failed}}
+
+
+ {{this.channelArchiveFailedMessage}}
+
+
+
+
+
+
+ {{else if @channel.archive.completed}}
+
+ {{this.channelArchiveCompletedMessage}}
+
+ {{/if}}
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-archive-status.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-archive-status.hbs
deleted file mode 100644
index 745fb8907b6..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-archive-status.hbs
+++ /dev/null
@@ -1,25 +0,0 @@
-{{#if this.shouldRender}}
- {{#if @channel.archive.failed}}
-
-
- {{this.channelArchiveFailedMessage}}
-
-
-
-
-
-
- {{else if @channel.archive.completed}}
-
- {{this.channelArchiveCompletedMessage}}
-
- {{/if}}
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-card.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-card.gjs
index 36a8f64e98b..ec718389fd0 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-card.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-card.gjs
@@ -1,6 +1,112 @@
import Component from "@glimmer/component";
+import { hash } from "@ember/helper";
+import { LinkTo } from "@ember/routing";
import { inject as service } from "@ember/service";
+import borderColor from "discourse/helpers/border-color";
+import concatClass from "discourse/helpers/concat-class";
+import replaceEmoji from "discourse/helpers/replace-emoji";
+import dIcon from "discourse-common/helpers/d-icon";
+import i18n from "discourse-common/helpers/i18n";
+import gt from "truth-helpers/helpers/gt";
+import ToggleChannelMembershipButton from "./toggle-channel-membership-button";
export default class ChatChannelCard extends Component {
@service chat;
+
+
+ {{#if @channel}}
+
+
+
+ {{#if @channel.description}}
+
+ {{replaceEmoji @channel.description}}
+
+ {{/if}}
+
+
+ {{#if @channel.isFollowing}}
+
+
+ {{i18n "chat.joined"}}
+
+
+
+
+ {{else if @channel.isJoinable}}
+
+ {{/if}}
+
+ {{#if (gt @channel.membershipsCount 0)}}
+
+ {{i18n
+ "chat.channel.memberships_count"
+ count=@channel.membershipsCount
+ }}
+
+ {{/if}}
+
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-card.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-card.hbs
deleted file mode 100644
index 9b4d077b090..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-card.hbs
+++ /dev/null
@@ -1,94 +0,0 @@
-{{#if @channel}}
-
-
-
- {{#if @channel.description}}
-
- {{replace-emoji @channel.description}}
-
- {{/if}}
-
-
- {{#if @channel.isFollowing}}
-
-
- {{i18n "chat.joined"}}
-
-
-
-
- {{else if @channel.isJoinable}}
-
- {{/if}}
-
- {{#if (gt @channel.membershipsCount 0)}}
-
- {{i18n
- "chat.channel.memberships_count"
- count=@channel.membershipsCount
- }}
-
- {{/if}}
-
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-leave-btn.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-leave-btn.gjs
index b585b366355..00ab545eb3d 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-leave-btn.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-leave-btn.gjs
@@ -1,6 +1,7 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
import { isPresent } from "@ember/utils";
+import DButton from "discourse/components/d-button";
export default class ChatChannelLeaveBtn extends Component {
@service chat;
@service site;
@@ -16,4 +17,15 @@ export default class ChatChannelLeaveBtn extends Component {
return "chat.leave";
}
}
+
+
+ {{#if this.shouldRender}}
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-leave-btn.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-leave-btn.hbs
deleted file mode 100644
index 781596d96df..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-leave-btn.hbs
+++ /dev/null
@@ -1,8 +0,0 @@
-{{#if this.shouldRender}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.gjs
index 1ddaa3c5688..7fd591fbe5f 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.gjs
@@ -1,4 +1,5 @@
import Component from "@glimmer/component";
+import ChatChannelUnreadIndicator from "./chat-channel-unread-indicator";
export default class ChatChannelMetadata extends Component {
get unreadIndicator() {
@@ -15,4 +16,18 @@ export default class ChatChannelMetadata extends Component {
sameElse: "l",
});
}
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.hbs
deleted file mode 100644
index eaaa128bd70..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-metadata.hbs
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-preview-card.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-preview-card.gjs
index b1b4d6bfa87..b07f0d41f1b 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-preview-card.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-preview-card.gjs
@@ -1,6 +1,12 @@
import Component from "@glimmer/component";
+import { hash } from "@ember/helper";
+import { LinkTo } from "@ember/routing";
import { inject as service } from "@ember/service";
import { isEmpty } from "@ember/utils";
+import concatClass from "discourse/helpers/concat-class";
+import i18n from "discourse-common/helpers/i18n";
+import ChatChannelTitle from "./chat-channel-title";
+import ToggleChannelMembershipButton from "./toggle-channel-membership-button";
export default class ChatChannelPreviewCard extends Component {
@service chat;
@@ -12,4 +18,33 @@ export default class ChatChannelPreviewCard extends Component {
get hasDescription() {
return !isEmpty(this.args.channel?.description);
}
+
+
+
+
+ {{#if this.hasDescription}}
+
+ {{@channel.description}}
+
+ {{/if}}
+ {{#if this.showJoinButton}}
+
+ {{/if}}
+
+ {{i18n "chat.browse_all_channels"}}
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-preview-card.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-preview-card.hbs
deleted file mode 100644
index 8832bd3befd..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-preview-card.hbs
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- {{#if this.hasDescription}}
-
- {{@channel.description}}
-
- {{/if}}
- {{#if this.showJoinButton}}
-
- {{/if}}
-
- {{i18n "chat.browse_all_channels"}}
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-status.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-status.gjs
index cb59dbd034d..c417904049a 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-status.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-status.gjs
@@ -1,9 +1,11 @@
import Component from "@glimmer/component";
+import dIcon from "discourse-common/helpers/d-icon";
import I18n from "discourse-i18n";
import {
CHANNEL_STATUSES,
channelStatusIcon,
} from "discourse/plugins/chat/discourse/models/chat-channel";
+import ChatChannelArchiveStatus from "./chat-channel-archive-status";
export default class ChatChannelStatus extends Component {
LONG_FORMAT = "long";
@@ -60,4 +62,14 @@ export default class ChatChannelStatus extends Component {
return I18n.t("chat.channel_status.read_only_header");
}
}
+
+
+ {{#if this.shouldRender}}
+
+ {{dIcon this.channelStatusIcon}}
+ {{this.channelStatusMessage}}
+
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-status.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-status.hbs
deleted file mode 100644
index fd17ea850fd..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-status.hbs
+++ /dev/null
@@ -1,7 +0,0 @@
-{{#if this.shouldRender}}
-
- {{d-icon this.channelStatusIcon}}
- {{this.channelStatusMessage}}
-
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-unread-indicator.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-unread-indicator.gjs
index 1e77fbca2d6..55e331cca17 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-unread-indicator.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-unread-indicator.gjs
@@ -1,5 +1,6 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
+import concatClass from "discourse/helpers/concat-class";
import { hasChatIndicator } from "../lib/chat-user-preferences";
export default class ChatChannelUnreadIndicator extends Component {
@@ -47,4 +48,19 @@ export default class ChatChannelUnreadIndicator extends Component {
#onlyMentions() {
return hasChatIndicator(this.currentUser).ONLY_MENTIONS;
}
+
+
+ {{#if this.showUnreadIndicator}}
+
+
{{#if
+ this.showUnreadCount
+ }}{{this.unreadCount}}{{else}} {{/if}}
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-unread-indicator.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-unread-indicator.hbs
deleted file mode 100644
index b9a7506b474..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-unread-indicator.hbs
+++ /dev/null
@@ -1,12 +0,0 @@
-{{#if this.showUnreadIndicator}}
-
-
{{#if
- this.showUnreadCount
- }}{{this.unreadCount}}{{else}} {{/if}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.gjs
index 94059e2ad32..57f9426e24c 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.gjs
@@ -1,5 +1,10 @@
import Component from "@glimmer/component";
+import { array, fn } from "@ember/helper";
import { action } from "@ember/object";
+import DButton from "discourse/components/d-button";
+import concatClass from "discourse/helpers/concat-class";
+import i18n from "discourse-common/helpers/i18n";
+import DMenu from "float-kit/components/d-menu";
export default class ChatComposerDropdown extends Component {
@action
@@ -7,4 +12,39 @@ export default class ChatComposerDropdown extends Component {
closeFn();
button.action();
}
+
+
+ {{#if @buttons.length}}
+
+
+ {{#each @buttons as |button|}}
+
+
+
+ {{/each}}
+
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.hbs
deleted file mode 100644
index e9b8c74727e..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-composer-dropdown.hbs
+++ /dev/null
@@ -1,32 +0,0 @@
-{{#if @buttons.length}}
-
-
- {{#each @buttons as |button|}}
-
-
-
- {{/each}}
-
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-composer-message-details.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-composer-message-details.gjs
index dc169dc4936..9fcc24066d5 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-composer-message-details.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-composer-message-details.gjs
@@ -1,3 +1,32 @@
import Component from "@glimmer/component";
+import DButton from "discourse/components/d-button";
+import replaceEmoji from "discourse/helpers/replace-emoji";
+import dIcon from "discourse-common/helpers/d-icon";
+import htmlSafe from "discourse-common/helpers/html-safe";
+import ChatUserAvatar from "./chat-user-avatar";
-export default class ChatComposerMessageDetails extends Component {}
+export default class ChatComposerMessageDetails extends Component {
+
+
+
+ {{dIcon (if @message.editing "pencil-alt" "reply")}}
+
+ {{@message.user.username}}
+
+ {{replaceEmoji (htmlSafe @message.excerpt)}}
+
+
+
+
+
+
+}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-composer-message-details.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-composer-message-details.hbs
deleted file mode 100644
index 3415ca32d0f..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-composer-message-details.hbs
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
- {{d-icon (if @message.editing "pencil-alt" "reply")}}
-
- {{@message.user.username}}
-
- {{replace-emoji (html-safe @message.excerpt)}}
-
-
-
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-composer-upload.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-composer-upload.gjs
index ca2280cf67a..05be9c194cc 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-composer-upload.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-composer-upload.gjs
@@ -1,5 +1,9 @@
import Component from "@glimmer/component";
+import DButton from "discourse/components/d-button";
+import concatClass from "discourse/helpers/concat-class";
import { isImage } from "discourse/lib/uploads";
+import dIcon from "discourse-common/helpers/d-icon";
+import i18n from "discourse-common/helpers/i18n";
export default class ChatComposerUpload extends Component {
get isImage() {
@@ -13,4 +17,64 @@ export default class ChatComposerUpload extends Component {
? this.args.upload.original_filename
: this.args.upload.fileName;
}
+
+
+ {{#if @upload}}
+
+
+ {{#if this.isImage}}
+ {{#if @isDone}}
+
+ {{else}}
+ {{dIcon "far-image"}}
+ {{/if}}
+ {{else}}
+ {{dIcon "file-alt"}}
+ {{/if}}
+
+
+
+ {{#unless this.isImage}}
+
+ {{this.fileName}}
+
+ {{/unless}}
+
+
+ {{#if @isDone}}
+ {{#unless this.isImage}}
+
{{@upload.extension}}
+ {{/unless}}
+ {{else}}
+ {{#if @upload.processing}}
+
{{i18n "processing"}}
+ {{else}}
+
{{i18n "uploading"}}
+ {{/if}}
+
+
+ {{/if}}
+
+
+
+
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-composer-upload.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-composer-upload.hbs
deleted file mode 100644
index 9cb66e6e1ec..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-composer-upload.hbs
+++ /dev/null
@@ -1,57 +0,0 @@
-{{#if @upload}}
-
-
- {{#if this.isImage}}
- {{#if @isDone}}
-
- {{else}}
- {{d-icon "far-image"}}
- {{/if}}
- {{else}}
- {{d-icon "file-alt"}}
- {{/if}}
-
-
-
- {{#unless this.isImage}}
-
- {{this.fileName}}
-
- {{/unless}}
-
-
- {{#if @isDone}}
- {{#unless this.isImage}}
-
{{@upload.extension}}
- {{/unless}}
- {{else}}
- {{#if @upload.processing}}
-
{{i18n "processing"}}
- {{else}}
-
{{i18n "uploading"}}
- {{/if}}
-
-
- {{/if}}
-
-
-
-
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/channel.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/channel.gjs
index f85a9b5180b..e76f9eff8b7 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/channel.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/channel.gjs
@@ -1,6 +1,14 @@
import Component from "@glimmer/component";
+import { array } from "@ember/helper";
import { action } from "@ember/object";
+import didInsert from "@ember/render-modifiers/modifiers/did-insert";
+import didUpdate from "@ember/render-modifiers/modifiers/did-update";
import { inject as service } from "@ember/service";
+import ChatChannel from "../chat-channel";
+import Header from "./header";
+import ChannelTitle from "./header/channel-title";
+import LeftActions from "./header/left-actions";
+import RightActions from "./header/right-actions";
export default class ChatDrawerChannel extends Component {
@service appEvents;
@@ -20,4 +28,36 @@ export default class ChatDrawerChannel extends Component {
this.chat.activeChannel = channel;
});
}
+
+
+
+
+ {{#if this.chatStateManager.isDrawerExpanded}}
+
+ {{#if this.chat.activeChannel}}
+ {{#each (array this.chat.activeChannel) as |channel|}}
+ {{#if channel}}
+
+ {{/if}}
+ {{/each}}
+ {{/if}}
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/channel.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/channel.hbs
deleted file mode 100644
index ffaf3231c6f..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/channel.hbs
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-{{#if this.chatStateManager.isDrawerExpanded}}
-
- {{#if this.chat.activeChannel}}
- {{#each (array this.chat.activeChannel) as |channel|}}
- {{#if channel}}
-
- {{/if}}
- {{/each}}
- {{/if}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header.gjs
index f38df7fe6e0..edd1cb0a2f5 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header.gjs
@@ -1,6 +1,25 @@
import Component from "@glimmer/component";
+import { on } from "@ember/modifier";
import { inject as service } from "@ember/service";
+import i18n from "discourse-common/helpers/i18n";
export default class ChatDrawerHeader extends Component {
@service chatStateManager;
+
+
+ {{! template-lint-disable no-invalid-interactive }}
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header.hbs
deleted file mode 100644
index 416b6e5616c..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header.hbs
+++ /dev/null
@@ -1,14 +0,0 @@
-{{! template-lint-disable no-invalid-interactive }}
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/back-link.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/back-link.gjs
index d8fe6a60067..b7eb916c6ca 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/back-link.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/back-link.gjs
@@ -1,6 +1,21 @@
import Component from "@glimmer/component";
+import { array } from "@ember/helper";
+import { LinkTo } from "@ember/routing";
import { inject as service } from "@ember/service";
+import dIcon from "discourse-common/helpers/d-icon";
+import or from "truth-helpers/helpers/or";
export default class ChatDrawerHeaderBackLink extends Component {
@service chatStateManager;
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/back-link.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/back-link.hbs
deleted file mode 100644
index 2d2c0243581..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/back-link.hbs
+++ /dev/null
@@ -1,8 +0,0 @@
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/channel-title.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/channel-title.gjs
index f7c3c5152d6..9c8afafa725 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/channel-title.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/channel-title.gjs
@@ -1,6 +1,45 @@
import Component from "@glimmer/component";
+import { on } from "@ember/modifier";
+import { LinkTo } from "@ember/routing";
import { inject as service } from "@ember/service";
+import ChatChannelTitle from "../../chat-channel-title";
export default class ChatDrawerChannelHeaderTitle extends Component {
@service chatStateManager;
+
+
+ {{#if @channel}}
+ {{#if this.chatStateManager.isDrawerExpanded}}
+
+ {{else}}
+
+ {{/if}}
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/channel-title.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/channel-title.hbs
deleted file mode 100644
index 876e4f87358..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/channel-title.hbs
+++ /dev/null
@@ -1,33 +0,0 @@
-{{#if @channel}}
- {{#if this.chatStateManager.isDrawerExpanded}}
-
- {{else}}
-
- {{/if}}
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/close-button.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/close-button.gjs
index 65a8729cd1e..43906e1a46e 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/close-button.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/close-button.gjs
@@ -1,4 +1,13 @@
import Component from "@glimmer/component";
+import DButton from "discourse/components/d-button";
export default class extends Component {
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/close-button.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/close-button.hbs
deleted file mode 100644
index 934fe4dcb68..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/close-button.hbs
+++ /dev/null
@@ -1,6 +0,0 @@
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/full-page-button.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/full-page-button.gjs
index 99ad4c2927d..b29bf6a3881 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/full-page-button.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/full-page-button.gjs
@@ -1,6 +1,18 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
+import DButton from "discourse/components/d-button";
export default class ChatDrawerHeaderFullPageButton extends Component {
@service chatStateManager;
+
+
+ {{#if this.chatStateManager.isDrawerExpanded}}
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/full-page-button.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/full-page-button.hbs
deleted file mode 100644
index 26c389fe002..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/full-page-button.hbs
+++ /dev/null
@@ -1,8 +0,0 @@
-{{#if this.chatStateManager.isDrawerExpanded}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/left-actions.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/left-actions.gjs
index 13f45c7507f..32175e9acd4 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/left-actions.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/left-actions.gjs
@@ -1,6 +1,18 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
+import i18n from "discourse-common/helpers/i18n";
+import BackLink from "./back-link";
export default class ChatDrawerHeaderLeftActions extends Component {
@service chatStateManager;
+
+
+ {{#if this.chatStateManager.isDrawerExpanded}}
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/left-actions.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/left-actions.hbs
deleted file mode 100644
index 93917adec23..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/left-actions.hbs
+++ /dev/null
@@ -1,10 +0,0 @@
-{{#if this.chatStateManager.isDrawerExpanded}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/right-actions.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/right-actions.gjs
index 48e034e6d94..5eb030a5980 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/right-actions.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/right-actions.gjs
@@ -1,5 +1,9 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
+import ThreadsListButton from "../../chat/thread/threads-list-button";
+import CloseButton from "./close-button";
+import FullPageButton from "./full-page-button";
+import ToggleExpandButton from "./toggle-expand-button";
export default class ChatDrawerHeaderRightActions extends Component {
@service chat;
@@ -7,4 +11,20 @@ export default class ChatDrawerHeaderRightActions extends Component {
get showThreadsListButton() {
return this.chat.activeChannel?.threadingEnabled;
}
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/right-actions.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/right-actions.hbs
deleted file mode 100644
index dd13664d459..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/right-actions.hbs
+++ /dev/null
@@ -1,17 +0,0 @@
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/toggle-expand-button.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/toggle-expand-button.gjs
index 39a19c11777..264a0a02a40 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/toggle-expand-button.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/toggle-expand-button.gjs
@@ -1,6 +1,24 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
+import DButton from "discourse/components/d-button";
export default class ChatDrawerHeaderToggleExpandButton extends Component {
@service chatStateManager;
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/toggle-expand-button.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/toggle-expand-button.hbs
deleted file mode 100644
index 42b97632284..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/header/toggle-expand-button.hbs
+++ /dev/null
@@ -1,14 +0,0 @@
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/index.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/index.gjs
index c6cab84947a..98bf7d16ac0 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/index.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/index.gjs
@@ -1,6 +1,28 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
+import i18n from "discourse-common/helpers/i18n";
+import ChannelsList from "../channels-list";
+import Header from "./header";
+import RightActions from "./header/right-actions";
export default class ChatDrawerIndex extends Component {
@service chatStateManager;
+
+
+
+
+ {{#if this.chatStateManager.isDrawerExpanded}}
+
+
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/index.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-drawer/index.hbs
deleted file mode 100644
index 080e5ab4ea5..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-drawer/index.hbs
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-{{#if this.chatStateManager.isDrawerExpanded}}
-
-
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-emoji-avatar.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-emoji-avatar.gjs
index 65a8729cd1e..22ecda3329d 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-emoji-avatar.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-emoji-avatar.gjs
@@ -1,4 +1,12 @@
import Component from "@glimmer/component";
+import replaceEmoji from "discourse/helpers/replace-emoji";
export default class extends Component {
+
+
+
+ {{replaceEmoji @emoji}}
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-emoji-avatar.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-emoji-avatar.hbs
deleted file mode 100644
index 0b28990e811..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-emoji-avatar.hbs
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- {{replace-emoji @emoji}}
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-mention-warnings.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-mention-warnings.gjs
index 5dcbca60073..55a59feb127 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-mention-warnings.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-mention-warnings.gjs
@@ -1,6 +1,8 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
import { htmlSafe } from "@ember/template";
+import dIcon from "discourse-common/helpers/d-icon";
+import i18n from "discourse-common/helpers/i18n";
import getURL from "discourse-common/lib/get-url";
import I18n from "discourse-i18n";
@@ -145,4 +147,36 @@ export default class ChatMentionWarnings extends Component {
})
);
}
+
+
+ {{#if this.show}}
+
+
+ {{dIcon "exclamation-triangle"}}
+
+
+
+
+ {{#if this.hasTooManyMentions}}
+ {{this.tooManyMentionsBody}}
+ {{else}}
+ {{#if this.channelWideMentionDisallowed}}
+ {{i18n
+ "chat.mention_warning.channel_wide_mentions_disallowed"
+ }}
+ {{/if}}
+ {{#if this.hasUnreachableGroupMentions}}
+ {{this.unreachableBody}}
+ {{/if}}
+ {{#if this.hasOverMembersLimitGroupMentions}}
+ {{this.overMembersLimitBody}}
+ {{/if}}
+ {{/if}}
+
+
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-mention-warnings.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-mention-warnings.hbs
deleted file mode 100644
index 52a17d19235..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-mention-warnings.hbs
+++ /dev/null
@@ -1,29 +0,0 @@
-{{#if this.show}}
-
-
- {{d-icon "exclamation-triangle"}}
-
-
-
-
- {{#if this.hasTooManyMentions}}
- {{this.tooManyMentionsBody}}
- {{else}}
- {{#if this.channelWideMentionDisallowed}}
- {{i18n
- "chat.mention_warning.channel_wide_mentions_disallowed"
- }}
- {{/if}}
- {{#if this.hasUnreachableGroupMentions}}
- {{this.unreachableBody}}
- {{/if}}
- {{#if this.hasOverMembersLimitGroupMentions}}
- {{this.overMembersLimitBody}}
- {{/if}}
- {{/if}}
-
-
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-in-reply-to-indicator.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-message-in-reply-to-indicator.gjs
index 75f2a714c41..45f755fb201 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-in-reply-to-indicator.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-in-reply-to-indicator.gjs
@@ -1,5 +1,11 @@
import Component from "@glimmer/component";
+import { LinkTo } from "@ember/routing";
import { inject as service } from "@ember/service";
+import replaceEmoji from "discourse/helpers/replace-emoji";
+import dIcon from "discourse-common/helpers/d-icon";
+import htmlSafe from "discourse-common/helpers/html-safe";
+import ChatEmojiAvatar from "./chat-emoji-avatar";
+import ChatUserAvatar from "./chat-user-avatar";
export default class ChatMessageInReplyToIndicator extends Component {
@service router;
@@ -32,4 +38,28 @@ export default class ChatMessageInReplyToIndicator extends Component {
this.args.message?.thread?.id
);
}
+
+
+ {{#if @message.inReplyTo}}
+
+ {{dIcon "share" title="chat.in_reply_to"}}
+
+ {{#if @message.inReplyTo.chatWebhookEvent.emoji}}
+
+ {{else}}
+
+ {{/if}}
+
+
+ {{replaceEmoji (htmlSafe @message.inReplyTo.excerpt)}}
+
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-in-reply-to-indicator.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-message-in-reply-to-indicator.hbs
deleted file mode 100644
index d414a05390d..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-in-reply-to-indicator.hbs
+++ /dev/null
@@ -1,19 +0,0 @@
-{{#if @message.inReplyTo}}
-
- {{d-icon "share" title="chat.in_reply_to"}}
-
- {{#if @message.inReplyTo.chatWebhookEvent.emoji}}
-
- {{else}}
-
- {{/if}}
-
-
- {{replace-emoji (html-safe @message.inReplyTo.excerpt)}}
-
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-date.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-date.gjs
index 411dfcdaecb..1850c39b817 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-date.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-date.gjs
@@ -1,5 +1,9 @@
import Component from "@glimmer/component";
+import { on } from "@ember/modifier";
import { action } from "@ember/object";
+import concatClass from "discourse/helpers/concat-class";
+import i18n from "discourse-common/helpers/i18n";
+import trackMessageSeparatorDate from "../modifiers/chat/track-message-separator-date";
export default class ChatMessageSeparatorDate extends Component {
@action
@@ -8,4 +12,39 @@ export default class ChatMessageSeparatorDate extends Component {
this.args.message.firstMessageOfTheDayAt
);
}
+
+
+ {{#if @message.formattedFirstMessageDate}}
+
+
+
+ {{@message.formattedFirstMessageDate}}
+
+ {{#if @message.newest}}
+
+ -
+ {{i18n "chat.last_visit"}}
+
+ {{/if}}
+
+
+
+
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-date.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-date.hbs
deleted file mode 100644
index 9b5361dcd2c..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-date.hbs
+++ /dev/null
@@ -1,30 +0,0 @@
-{{#if @message.formattedFirstMessageDate}}
-
-
-
- {{@message.formattedFirstMessageDate}}
-
- {{#if @message.newest}}
-
- -
- {{i18n "chat.last_visit"}}
-
- {{/if}}
-
-
-
-
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-new.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-new.gjs
index 65a8729cd1e..b0314f4b0a9 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-new.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-new.gjs
@@ -1,4 +1,22 @@
import Component from "@glimmer/component";
+import i18n from "discourse-common/helpers/i18n";
+import and from "truth-helpers/helpers/and";
+import not from "truth-helpers/helpers/not";
export default class extends Component {
+
+ {{#if (and @message.newest (not @message.formattedFirstMessageDate))}}
+
+
+
+ {{i18n "chat.last_visit"}}
+
+
+
+
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-new.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-new.hbs
deleted file mode 100644
index 7aaba0ccb65..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-separator-new.hbs
+++ /dev/null
@@ -1,13 +0,0 @@
-{{#if (and @message.newest (not @message.formattedFirstMessageDate))}}
-
-
-
- {{i18n "chat.last_visit"}}
-
-
-
-
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-text.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-message-text.gjs
index 042d774ba61..d18e3feb91d 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-text.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-text.gjs
@@ -1,5 +1,8 @@
import Component from "@glimmer/component";
+import htmlSafe from "discourse-common/helpers/html-safe";
+import i18n from "discourse-common/helpers/i18n";
import { isCollapsible } from "discourse/plugins/chat/discourse/components/chat-message-collapser";
+import ChatMessageCollapser from "./chat-message-collapser";
export default class ChatMessageText extends Component {
get isEdited() {
@@ -9,4 +12,24 @@ export default class ChatMessageText extends Component {
get isCollapsible() {
return isCollapsible(this.args.cooked, this.args.uploads);
}
+
+
+
+ {{#if this.isCollapsible}}
+
+ {{else}}
+ {{htmlSafe @cooked}}
+ {{/if}}
+
+ {{#if this.isEdited}}
+ ({{i18n "chat.edited"}})
+ {{/if}}
+
+ {{yield}}
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-text.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-message-text.hbs
deleted file mode 100644
index e6f8059e3fb..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-text.hbs
+++ /dev/null
@@ -1,17 +0,0 @@
-
- {{#if this.isCollapsible}}
-
- {{else}}
- {{html-safe @cooked}}
- {{/if}}
-
- {{#if this.isEdited}}
- ({{i18n "chat.edited"}})
- {{/if}}
-
- {{yield}}
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-thread-indicator.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-message-thread-indicator.gjs
index fc1eee5a5c5..ab361c5a9c0 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-thread-indicator.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-thread-indicator.gjs
@@ -1,8 +1,17 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
+import didInsert from "@ember/render-modifiers/modifiers/did-insert";
+import willDestroy from "@ember/render-modifiers/modifiers/will-destroy";
import { inject as service } from "@ember/service";
+import concatClass from "discourse/helpers/concat-class";
+import formatDate from "discourse/helpers/format-date";
+import replaceEmoji from "discourse/helpers/replace-emoji";
+import htmlSafe from "discourse-common/helpers/html-safe";
+import i18n from "discourse-common/helpers/i18n";
import { bind } from "discourse-common/utils/decorators";
+import ChatThreadParticipants from "./chat-thread-participants";
+import ChatUserAvatar from "./chat-user-avatar";
export default class ChatMessageThreadIndicator extends Component {
@service capabilities;
@@ -83,4 +92,44 @@ export default class ChatMessageThreadIndicator extends Component {
...this.args.message.thread.routeModels
);
}
+
+
+
+
+
+
+
+
+
+
+ {{@message.thread.preview.lastReplyUser.username}}
+
+
+ {{formatDate
+ @message.thread.preview.lastReplyCreatedAt
+ leaveAgo="true"
+ }}
+
+
+
+ {{i18n "chat.thread.replies" count=@message.thread.preview.replyCount}}
+
+
+
+ {{replaceEmoji (htmlSafe @message.thread.preview.lastReplyExcerpt)}}
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-thread-indicator.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-message-thread-indicator.hbs
deleted file mode 100644
index 77508ae58d0..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-thread-indicator.hbs
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
- {{@message.thread.preview.lastReplyUser.username}}
-
-
- {{format-date @message.thread.preview.lastReplyCreatedAt leaveAgo="true"}}
-
-
-
- {{i18n "chat.thread.replies" count=@message.thread.preview.replyCount}}
-
-
-
- {{replace-emoji (html-safe @message.thread.preview.lastReplyExcerpt)}}
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-notice.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-notice.gjs
index e5db96f91f9..4601eb0a0e5 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-notice.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-notice.gjs
@@ -1,6 +1,7 @@
import Component from "@glimmer/component";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
+import DButton from "discourse/components/d-button";
import MentionWithoutMembership from "discourse/plugins/chat/discourse/components/chat/notices/mention_without_membership";
const COMPONENT_DICT = {
@@ -18,4 +19,27 @@ export default class ChatNotices extends Component {
get component() {
return COMPONENT_DICT[this.args.notice.type];
}
+
+
+
+
+ {{#if @notice.textContent}}
+
+ {{@notice.textContent}}
+
+ {{else}}
+
+ {{/if}}
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-notice.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-notice.hbs
deleted file mode 100644
index 07b0e408374..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-notice.hbs
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
- {{#if @notice.textContent}}
-
- {{@notice.textContent}}
-
- {{else}}
-
- {{/if}}
-
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-notices.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-notices.gjs
index d1c58356659..bf65d2133e8 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-notices.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-notices.gjs
@@ -1,5 +1,7 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
+import ChatNotice from "./chat-notice";
+import ChatRetentionReminder from "./chat-retention-reminder";
export default class ChatNotices extends Component {
@service("chat-channel-notices-manager") noticesManager;
@@ -9,4 +11,14 @@ export default class ChatNotices extends Component {
(notice) => notice.channelId === this.args.channel.id
);
}
+
+
+
+
+
+ {{#each this.noticesForChannel as |notice|}}
+
+ {{/each}}
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-notices.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-notices.hbs
deleted file mode 100644
index 4da9bfd28b2..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-notices.hbs
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
- {{#each this.noticesForChannel as |notice|}}
-
- {{/each}}
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-replying-indicator.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-replying-indicator.gjs
index 2e56ee8b604..0f4961ebfaf 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-replying-indicator.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-replying-indicator.gjs
@@ -1,8 +1,12 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
+import didInsert from "@ember/render-modifiers/modifiers/did-insert";
+import didUpdate from "@ember/render-modifiers/modifiers/did-update";
+import willDestroy from "@ember/render-modifiers/modifiers/will-destroy";
import { inject as service } from "@ember/service";
import { isPresent } from "@ember/utils";
+import concatClass from "discourse/helpers/concat-class";
import I18n from "discourse-i18n";
export default class ChatReplyingIndicator extends Component {
@@ -74,4 +78,27 @@ export default class ChatReplyingIndicator extends Component {
get shouldRender() {
return isPresent(this.usernames);
}
+
+
+ {{#if @presenceChannelName}}
+
+ {{#if this.shouldRender}}
+ {{this.text}}
+
+ .
+ .
+ .
+
+ {{/if}}
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-replying-indicator.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-replying-indicator.hbs
deleted file mode 100644
index e145bb0630e..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-replying-indicator.hbs
+++ /dev/null
@@ -1,20 +0,0 @@
-{{#if @presenceChannelName}}
-
- {{#if this.shouldRender}}
- {{this.text}}
-
- .
- .
- .
-
- {{/if}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-side-panel-resizer.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-side-panel-resizer.gjs
index 65a8729cd1e..141b263786e 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-side-panel-resizer.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-side-panel-resizer.gjs
@@ -1,4 +1,7 @@
import Component from "@glimmer/component";
export default class extends Component {
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-side-panel-resizer.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-side-panel-resizer.hbs
deleted file mode 100644
index a717e52b509..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-side-panel-resizer.hbs
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-side-panel.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-side-panel.gjs
index d3f8d525e31..31848363d4d 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-side-panel.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-side-panel.gjs
@@ -1,8 +1,13 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
+import { hash } from "@ember/helper";
import { action } from "@ember/object";
+import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import { inject as service } from "@ember/service";
import { htmlSafe } from "@ember/template";
+import and from "truth-helpers/helpers/and";
+import resizableNode from "../modifiers/chat/resizable-node";
+import ChatSidePanelResizer from "./chat-side-panel-resizer";
const MIN_CHAT_CHANNEL_WIDTH = 250;
@@ -38,4 +43,30 @@ export default class ChatSidePanel extends Component {
const parentWidth = element.parentElement.getBoundingClientRect().width;
return parentWidth - MIN_CHAT_CHANNEL_WIDTH;
}
+
+
+ {{#if this.chatStateManager.isSidePanelExpanded}}
+
+ {{yield}}
+
+ {{#if this.site.desktopView}}
+
+ {{/if}}
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-side-panel.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-side-panel.hbs
deleted file mode 100644
index 739938530d1..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-side-panel.hbs
+++ /dev/null
@@ -1,21 +0,0 @@
-{{#if this.chatStateManager.isSidePanelExpanded}}
-
- {{yield}}
-
- {{#if this.site.desktopView}}
-
- {{/if}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-skeleton.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-skeleton.gjs
index 6af83cf2e41..3f9080b6903 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-skeleton.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-skeleton.gjs
@@ -17,4 +17,36 @@ export default class ChatSkeleton extends Component {
#randomIntFromInterval(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
+
+
+
+ {{#each this.placeholders as |placeholder|}}
+
+
+
+
+
+ {{#if placeholder.image}}
+
+ {{/if}}
+
+
+ {{#each placeholder.rows as |row|}}
+
+ {{/each}}
+
+
+ {{#if placeholder.reactions}}
+
+ {{#each placeholder.reactions}}
+
+ {{/each}}
+
+ {{/if}}
+
+
+
+ {{/each}}
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-skeleton.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-skeleton.hbs
deleted file mode 100644
index 719aa260777..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-skeleton.hbs
+++ /dev/null
@@ -1,29 +0,0 @@
-
- {{#each this.placeholders as |placeholder|}}
-
-
-
-
-
- {{#if placeholder.image}}
-
- {{/if}}
-
-
- {{#each placeholder.rows as |row|}}
-
- {{/each}}
-
-
- {{#if placeholder.reactions}}
-
- {{#each placeholder.reactions}}
-
- {{/each}}
-
- {{/if}}
-
-
-
- {{/each}}
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-upload-drop-zone.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-upload-drop-zone.gjs
index f799112a1d4..71f4ee2a22b 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-upload-drop-zone.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-upload-drop-zone.gjs
@@ -16,4 +16,72 @@ export default class ChatUploadDropZone extends Component {
#isThread() {
return this.args.model instanceof ChatThread;
}
+
+
+
+
+
+
+
+
+ {{this.title}}
+
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-upload-drop-zone.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-upload-drop-zone.hbs
deleted file mode 100644
index 08980dba7aa..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-upload-drop-zone.hbs
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
- {{this.title}}
-
-
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-upload.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-upload.gjs
index a76b2e3ae4c..131b3bc8573 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-upload.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-upload.gjs
@@ -1,9 +1,11 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
+import { on } from "@ember/modifier";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import { isAudio, isImage, isVideo } from "discourse/lib/uploads";
+import eq from "truth-helpers/helpers/eq";
export default class extends Component {
@service siteSettings;
@@ -52,4 +54,37 @@ export default class extends Component {
imageLoaded() {
this.loaded = true;
}
+
+
+ {{#if (eq this.type this.IMAGE_TYPE)}}
+
+ {{else if (eq this.type this.VIDEO_TYPE)}}
+
+
+
+ {{else if (eq this.type this.AUDIO_TYPE)}}
+
+
+
+ {{else}}
+
+ {{@upload.original_filename}}
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-upload.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-upload.hbs
deleted file mode 100644
index 24939311a5c..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-upload.hbs
+++ /dev/null
@@ -1,30 +0,0 @@
-{{#if (eq this.type this.IMAGE_TYPE)}}
-
-{{else if (eq this.type this.VIDEO_TYPE)}}
-
-
-
-{{else if (eq this.type this.AUDIO_TYPE)}}
-
-
-
-{{else}}
-
- {{@upload.original_filename}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-user-display-name.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-user-display-name.gjs
index f95ca1ab650..af764831332 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-user-display-name.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-user-display-name.gjs
@@ -1,5 +1,6 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
+import concatClass from "discourse/helpers/concat-class";
import { formatUsername } from "discourse/lib/utilities";
export default class ChatUserDisplayName extends Component {
@@ -24,4 +25,27 @@ export default class ChatUserDisplayName extends Component {
get shouldShowNameLast() {
return !this.shouldPrioritizeNameInUx && this.hasValidName;
}
+
+
+
+ {{#if this.shouldShowNameFirst}}
+ {{@user.name}}
+ —
+ {{/if}}
+
+
+ {{this.formattedUsername}}
+
+
+ {{#if this.shouldShowNameLast}}
+ —
+ {{@user.name}}
+ {{/if}}
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-user-display-name.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-user-display-name.hbs
deleted file mode 100644
index a68732864ab..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat-user-display-name.hbs
+++ /dev/null
@@ -1,20 +0,0 @@
-
- {{#if this.shouldShowNameFirst}}
- {{@user.name}}
- —
- {{/if}}
-
-
- {{this.formattedUsername}}
-
-
- {{#if this.shouldShowNameLast}}
- —
- {{@user.name}}
- {{/if}}
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/admin/export-messages.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/admin/export-messages.gjs
index 8e33e26a75f..d65b3345dfc 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/admin/export-messages.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/admin/export-messages.gjs
@@ -1,7 +1,9 @@
import Component from "@glimmer/component";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
+import DButton from "discourse/components/d-button";
import { popupAjaxError } from "discourse/lib/ajax-error";
+import i18n from "discourse-common/helpers/i18n";
import I18n from "discourse-i18n";
export default class ChatAdminExportMessages extends Component {
@@ -19,4 +21,17 @@ export default class ChatAdminExportMessages extends Component {
popupAjaxError(error);
}
}
+
+
+
+ {{i18n "chat.admin.export_messages.title"}}
+ {{i18n "chat.admin.export_messages.description"}}
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/admin/export-messages.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/admin/export-messages.hbs
deleted file mode 100644
index a199a709b77..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/admin/export-messages.hbs
+++ /dev/null
@@ -1,10 +0,0 @@
-
- {{i18n "chat.admin.export_messages.title"}}
- {{i18n "chat.admin.export_messages.description"}}
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/composer/button.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/composer/button.gjs
index f91ff5d29be..a4505d04220 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/composer/button.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/composer/button.gjs
@@ -1,3 +1,12 @@
import Component from "@glimmer/component";
+import dIcon from "discourse-common/helpers/d-icon";
-export default class ChatComposerButton extends Component {}
+export default class ChatComposerButton extends Component {
+
+
+
+ {{dIcon @icon}}
+
+
+
+}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/composer/button.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/composer/button.hbs
deleted file mode 100644
index 4e12924ce77..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/composer/button.hbs
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- {{d-icon @icon}}
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/composer/separator.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/composer/separator.gjs
index 47b899f4625..1c1639ef80f 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/composer/separator.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/composer/separator.gjs
@@ -1,3 +1,7 @@
import Component from "@glimmer/component";
-export default class ChatComposerSeparator extends Component {}
+export default class ChatComposerSeparator extends Component {
+
+
+
+}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/composer/separator.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/composer/separator.hbs
deleted file mode 100644
index 5991a7287e9..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/composer/separator.hbs
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/message/avatar.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/message/avatar.gjs
index 65a8729cd1e..956e07d8caa 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/message/avatar.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/message/avatar.gjs
@@ -1,4 +1,15 @@
import Component from "@glimmer/component";
+import ChatEmojiAvatar from "../../chat-emoji-avatar";
+import ChatUserAvatar from "../../chat-user-avatar";
export default class extends Component {
+
+
+ {{#if @message.chatWebhookEvent.emoji}}
+
+ {{else}}
+
+ {{/if}}
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/message/avatar.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/message/avatar.hbs
deleted file mode 100644
index 1d2e9676fbf..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/message/avatar.hbs
+++ /dev/null
@@ -1,7 +0,0 @@
-
- {{#if @message.chatWebhookEvent.emoji}}
-
- {{else}}
-
- {{/if}}
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/message/error.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/message/error.gjs
index 65a8729cd1e..3b5fac8dc95 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/message/error.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/message/error.gjs
@@ -1,4 +1,30 @@
import Component from "@glimmer/component";
+import { fn } from "@ember/helper";
+import DButton from "discourse/components/d-button";
+import i18n from "discourse-common/helpers/i18n";
+import eq from "truth-helpers/helpers/eq";
export default class extends Component {
+
+ {{#if @message.error}}
+
+ {{#if (eq @message.error "network_error")}}
+
+
+ {{i18n "chat.retry_staged_message.title"}}
+
+
+ {{i18n "chat.retry_staged_message.action"}}
+
+
+ {{else}}
+ {{@message.error}}
+ {{/if}}
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/message/error.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/message/error.hbs
deleted file mode 100644
index dc9ca63b24a..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/message/error.hbs
+++ /dev/null
@@ -1,20 +0,0 @@
-{{#if @message.error}}
-
- {{#if (eq @message.error "network_error")}}
-
-
- {{i18n "chat.retry_staged_message.title"}}
-
-
- {{i18n "chat.retry_staged_message.action"}}
-
-
- {{else}}
- {{@message.error}}
- {{/if}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/message/info.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/message/info.gjs
index e8654fcc4f0..70d6917cc9e 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/message/info.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/message/info.gjs
@@ -1,7 +1,16 @@
import Component from "@glimmer/component";
+import didInsert from "@ember/render-modifiers/modifiers/did-insert";
+import willDestroy from "@ember/render-modifiers/modifiers/will-destroy";
+import { LinkTo } from "@ember/routing";
import { inject as service } from "@ember/service";
+import BookmarkIcon from "discourse/components/bookmark-icon";
+import UserStatusMessage from "discourse/components/user-status-message";
+import concatClass from "discourse/helpers/concat-class";
import { prioritizeNameInUx } from "discourse/lib/settings";
+import dIcon from "discourse-common/helpers/d-icon";
+import i18n from "discourse-common/helpers/i18n";
import { bind } from "discourse-common/utils/decorators";
+import formatChatDate from "../../../helpers/format-chat-date";
export default class ChatMessageInfo extends Component {
@service siteSettings;
@@ -69,4 +78,70 @@ export default class ChatMessageInfo extends Component {
get #message() {
return this.args.message;
}
+
+
+ {{#if @show}}
+
+ {{#if @message.chatWebhookEvent}}
+ {{#if @message.chatWebhookEvent.username}}
+
+ {{@message.chatWebhookEvent.username}}
+
+ {{/if}}
+
+
+ {{i18n "chat.bot"}}
+
+ {{else}}
+
+ {{this.name}}
+ {{#if this.showStatus}}
+
+
+
+ {{/if}}
+
+ {{/if}}
+
+
+ {{formatChatDate @message}}
+
+
+ {{#if @message.bookmark}}
+
+
+
+ {{/if}}
+
+ {{#if this.isFlagged}}
+
+ {{#if @message.reviewableId}}
+
+ {{dIcon "flag" title="chat.flagged"}}
+
+ {{else}}
+ {{dIcon "flag" title="chat.you_flagged"}}
+ {{/if}}
+
+ {{/if}}
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/message/info.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/message/info.hbs
deleted file mode 100644
index 3ccf1f6adb5..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/message/info.hbs
+++ /dev/null
@@ -1,63 +0,0 @@
-{{#if @show}}
-
- {{#if @message.chatWebhookEvent}}
- {{#if @message.chatWebhookEvent.username}}
-
- {{@message.chatWebhookEvent.username}}
-
- {{/if}}
-
-
- {{i18n "chat.bot"}}
-
- {{else}}
-
- {{this.name}}
- {{#if this.showStatus}}
-
-
-
- {{/if}}
-
- {{/if}}
-
-
- {{format-chat-date @message}}
-
-
- {{#if @message.bookmark}}
-
-
-
- {{/if}}
-
- {{#if this.isFlagged}}
-
- {{#if @message.reviewableId}}
-
- {{d-icon "flag" title="chat.flagged"}}
-
- {{else}}
- {{d-icon "flag" title="chat.you_flagged"}}
- {{/if}}
-
- {{/if}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/message/left-gutter.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/message/left-gutter.gjs
index b60adf92b89..36f7fdf7e55 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/message/left-gutter.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/message/left-gutter.gjs
@@ -1,6 +1,38 @@
import Component from "@glimmer/component";
+import { LinkTo } from "@ember/routing";
import { inject as service } from "@ember/service";
+import BookmarkIcon from "discourse/components/bookmark-icon";
+import dIcon from "discourse-common/helpers/d-icon";
+import eq from "truth-helpers/helpers/eq";
+import formatChatDate from "../../../helpers/format-chat-date";
export default class ChatMessageLeftGutter extends Component {
@service site;
+
+
+
+ {{#if @message.reviewableId}}
+
+ {{dIcon "flag" title="chat.flagged"}}
+
+ {{else if (eq @message.userFlagStatus 0)}}
+
+ {{dIcon "flag" title="chat.you_flagged"}}
+
+ {{else if this.site.desktopView}}
+
+ {{formatChatDate @message "tiny"}}
+
+ {{/if}}
+ {{#if @message.bookmark}}
+
+
+
+ {{/if}}
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/message/left-gutter.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/message/left-gutter.hbs
deleted file mode 100644
index d83658b4b1f..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/message/left-gutter.hbs
+++ /dev/null
@@ -1,24 +0,0 @@
-
- {{#if @message.reviewableId}}
-
- {{d-icon "flag" title="chat.flagged"}}
-
- {{else if (eq @message.userFlagStatus 0)}}
-
- {{d-icon "flag" title="chat.you_flagged"}}
-
- {{else if this.site.desktopView}}
-
- {{format-chat-date @message "tiny"}}
-
- {{/if}}
- {{#if @message.bookmark}}
-
-
-
- {{/if}}
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/archive-channel.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/archive-channel.gjs
index 9cc7c54473a..5ecb6cfaa04 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/archive-channel.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/modal/archive-channel.gjs
@@ -4,7 +4,10 @@ import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import { isEmpty } from "@ember/utils";
+import DButton from "discourse/components/d-button";
+import DModal from "discourse/components/d-modal";
import { popupAjaxError } from "discourse/lib/ajax-error";
+import i18n from "discourse-common/helpers/i18n";
import discourseLater from "discourse-common/lib/later";
import I18n from "discourse-i18n";
import {
@@ -12,6 +15,7 @@ import {
NEW_TOPIC_SELECTION,
} from "discourse/plugins/chat/discourse/components/chat-to-topic-selector";
import { CHANNEL_STATUSES } from "discourse/plugins/chat/discourse/models/chat-channel";
+import ChatToTopicSelector from "../../chat-to-topic-selector";
export default class ChatModalArchiveChannel extends Component {
@service chatApi;
@@ -109,4 +113,39 @@ export default class ChatModalArchiveChannel extends Component {
}
return data;
}
+
+
+
+ <:body>
+
+ {{this.instructionsText}}
+
+
+
+ <:footer>
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/archive-channel.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/archive-channel.hbs
deleted file mode 100644
index 905c3f03d77..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/archive-channel.hbs
+++ /dev/null
@@ -1,32 +0,0 @@
-
- <:body>
-
- {{this.instructionsText}}
-
-
-
- <:footer>
-
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/channel-summary.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/channel-summary.gjs
index 6bd3cd4b941..3172c47a842 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/channel-summary.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/modal/channel-summary.gjs
@@ -2,8 +2,13 @@ import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
+import ConditionalLoadingSection from "discourse/components/conditional-loading-section";
+import DModal from "discourse/components/d-modal";
+import DModalCancel from "discourse/components/d-modal-cancel";
import { popupAjaxError } from "discourse/lib/ajax-error";
+import i18n from "discourse-common/helpers/i18n";
import I18n from "discourse-i18n";
+import ComboBox from "select-kit/components/combo-box";
export default class ChatModalChannelSummary extends Component {
@service chatApi;
@@ -45,4 +50,29 @@ export default class ChatModalChannelSummary extends Component {
.catch(popupAjaxError)
.finally(() => (this.loading = false));
}
+
+
+
+ <:body>
+ {{i18n "chat.summarization.description"}}
+
+
+ {{this.summary}}
+
+
+ <:footer>
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/channel-summary.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/channel-summary.hbs
deleted file mode 100644
index 0e16015ae21..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/channel-summary.hbs
+++ /dev/null
@@ -1,22 +0,0 @@
-
- <:body>
- {{i18n "chat.summarization.description"}}
-
-
- {{this.summary}}
-
-
- <:footer>
-
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/delete-channel.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/delete-channel.gjs
index 25fb9b16a73..8ede6eaaf52 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/delete-channel.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/modal/delete-channel.gjs
@@ -4,7 +4,11 @@ import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import { isEmpty } from "@ember/utils";
+import DButton from "discourse/components/d-button";
+import DModal from "discourse/components/d-modal";
+import TextField from "discourse/components/text-field";
import { popupAjaxError } from "discourse/lib/ajax-error";
+import i18n from "discourse-common/helpers/i18n";
import discourseLater from "discourse-common/lib/later";
import I18n from "discourse-i18n";
@@ -65,4 +69,39 @@ export default class ChatModalDeleteChannel extends Component {
.catch(popupAjaxError)
.finally(() => (this.deleting = false));
}
+
+
+
+ <:body>
+
+ {{this.instructionsText}}
+
+
+
+
+ <:footer>
+
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/delete-channel.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/delete-channel.hbs
deleted file mode 100644
index ca1838a559c..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/delete-channel.hbs
+++ /dev/null
@@ -1,32 +0,0 @@
-
- <:body>
-
- {{this.instructionsText}}
-
-
-
-
- <:footer>
-
-
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/edit-channel-name.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/edit-channel-name.gjs
index 3f5e71ce55b..9f3b1517ce2 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/edit-channel-name.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/modal/edit-channel-name.gjs
@@ -1,11 +1,18 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
+import { Input } from "@ember/component";
+import { on } from "@ember/modifier";
import { action } from "@ember/object";
import { cancel } from "@ember/runloop";
import { inject as service } from "@ember/service";
+import DButton from "discourse/components/d-button";
+import DModal from "discourse/components/d-modal";
+import DModalCancel from "discourse/components/d-modal-cancel";
import { ajax } from "discourse/lib/ajax";
import { extractError } from "discourse/lib/ajax-error";
+import i18n from "discourse-common/helpers/i18n";
import discourseDebounce from "discourse-common/lib/debounce";
+import DTooltip from "float-kit/components/d-tooltip";
import slugifyChannel from "discourse/plugins/chat/discourse/lib/slugify-channel";
const SLUG_MAX_LENGTH = 100;
@@ -96,4 +103,61 @@ export default class ChatModalEditChannelName extends Component {
console.log(error);
}
}
+
+
+
+ <:body>
+
+
+ {{i18n "chat.channel_edit_name_slug_modal.name"}}
+
+
+
+
+
+
+ {{i18n "chat.channel_edit_name_slug_modal.slug"}}
+
+
+
+
+
+ <:footer>
+
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/edit-channel-name.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/edit-channel-name.hbs
deleted file mode 100644
index b06c6caf96b..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/edit-channel-name.hbs
+++ /dev/null
@@ -1,52 +0,0 @@
-
- <:body>
-
-
- {{i18n "chat.channel_edit_name_slug_modal.name"}}
-
-
-
-
-
-
- {{i18n "chat.channel_edit_name_slug_modal.slug"}}
-
-
-
-
-
- <:footer>
-
-
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/move-message-to-channel.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/move-message-to-channel.gjs
index 012bcf21a90..e44a323bb34 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/move-message-to-channel.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/modal/move-message-to-channel.gjs
@@ -4,8 +4,12 @@ import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import { isBlank } from "@ember/utils";
+import DButton from "discourse/components/d-button";
+import DModal from "discourse/components/d-modal";
import { popupAjaxError } from "discourse/lib/ajax-error";
+import i18n from "discourse-common/helpers/i18n";
import I18n from "discourse-i18n";
+import ChatChannelChooser from "../../chat-channel-chooser";
export default class ChatModalMoveMessageToChannel extends Component {
@service chat;
@@ -65,4 +69,36 @@ export default class ChatModalMoveMessageToChannel extends Component {
})
.catch(popupAjaxError);
}
+
+
+
+ <:body>
+ {{#if this.selectedMessageCount}}
+ {{this.instructionsText}}
+ {{/if}}
+
+
+
+ <:footer>
+
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/move-message-to-channel.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/move-message-to-channel.hbs
deleted file mode 100644
index 17448ccf585..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/move-message-to-channel.hbs
+++ /dev/null
@@ -1,29 +0,0 @@
-
- <:body>
- {{#if this.selectedMessageCount}}
- {{this.instructionsText}}
- {{/if}}
-
-
-
- <:footer>
-
-
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/thread-settings.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/thread-settings.gjs
index dec187d3fa6..c122c15963f 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/thread-settings.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/modal/thread-settings.gjs
@@ -1,8 +1,12 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
+import { Input } from "@ember/component";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
+import DButton from "discourse/components/d-button";
+import DModal from "discourse/components/d-modal";
import { popupAjaxError } from "discourse/lib/ajax-error";
+import i18n from "discourse-common/helpers/i18n";
export default class ChatModalThreadSettings extends Component {
@service chatApi;
@@ -35,4 +39,33 @@ export default class ChatModalThreadSettings extends Component {
this.saving = false;
});
}
+
+
+
+ <:body>
+
+ {{i18n "chat.thread.title"}}
+
+
+
+ <:footer>
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/thread-settings.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/thread-settings.hbs
deleted file mode 100644
index 3a7815255b5..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/thread-settings.hbs
+++ /dev/null
@@ -1,26 +0,0 @@
-
- <:body>
-
- {{i18n "chat.thread.title"}}
-
-
-
- <:footer>
-
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/toggle-channel-status.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/toggle-channel-status.gjs
index 657d065ef08..79334bbb48e 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/toggle-channel-status.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/modal/toggle-channel-status.gjs
@@ -2,7 +2,10 @@ import Component from "@glimmer/component";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { htmlSafe } from "@ember/template";
+import DButton from "discourse/components/d-button";
+import DModal from "discourse/components/d-modal";
import { popupAjaxError } from "discourse/lib/ajax-error";
+import i18n from "discourse-common/helpers/i18n";
import I18n from "discourse-i18n";
import { CHANNEL_STATUSES } from "discourse/plugins/chat/discourse/models/chat-channel";
@@ -52,4 +55,27 @@ export default class ChatModalToggleChannelStatus extends Component {
})
.catch(popupAjaxError);
}
+
+
+
+ <:body>
+ {{this.instructions}}
+
+ <:footer>
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/toggle-channel-status.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/toggle-channel-status.hbs
deleted file mode 100644
index cc6ab68e9ed..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/toggle-channel-status.hbs
+++ /dev/null
@@ -1,20 +0,0 @@
-
- <:body>
- {{this.instructions}}
-
- <:footer>
-
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/notices/mention_without_membership.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/notices/mention_without_membership.gjs
index 7a811ee1a2d..b0a78142365 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/notices/mention_without_membership.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/notices/mention_without_membership.gjs
@@ -1,8 +1,12 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
+import { on } from "@ember/modifier";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { popupAjaxError } from "discourse/lib/ajax-error";
+import dIcon from "discourse-common/helpers/d-icon";
+import i18n from "discourse-common/helpers/i18n";
+import laterFn from "../../../modifiers/chat/later-fn";
export default class MentionWithoutMembership extends Component {
@service("chat-api") chatApi;
@@ -28,4 +32,36 @@ export default class MentionWithoutMembership extends Component {
popupAjaxError(error);
}
}
+
+
+
+ {{#if this.invitationsSent}}
+
+ {{dIcon "check"}}
+
+ {{i18n
+ "chat.mention_warning.invitations_sent"
+ count=this.userIds.length
+ }}
+
+
+ {{else}}
+
+ {{@notice.data.text}}
+
+ {{i18n "chat.mention_warning.invite"}}
+
+
+ {{/if}}
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/notices/mention_without_membership.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/notices/mention_without_membership.hbs
deleted file mode 100644
index 56f7ce5a912..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/notices/mention_without_membership.hbs
+++ /dev/null
@@ -1,29 +0,0 @@
-
- {{#if this.invitationsSent}}
-
- {{d-icon "check"}}
-
- {{i18n
- "chat.mention_warning.invitations_sent"
- count=this.userIds.length
- }}
-
-
- {{else}}
-
- {{@notice.data.text}}
-
- {{i18n "chat.mention_warning.invite"}}
-
-
- {{/if}}
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/scroll-to-bottom-arrow.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/scroll-to-bottom-arrow.gjs
index 65a8729cd1e..741ba93af27 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/scroll-to-bottom-arrow.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/scroll-to-bottom-arrow.gjs
@@ -1,4 +1,23 @@
import Component from "@glimmer/component";
+import DButton from "discourse/components/d-button";
+import concatClass from "discourse/helpers/concat-class";
+import dIcon from "discourse-common/helpers/d-icon";
export default class extends Component {
+
+
+
+
+ {{dIcon "arrow-down"}}
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/scroll-to-bottom-arrow.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/scroll-to-bottom-arrow.hbs
deleted file mode 100644
index 93d5f270a2d..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/scroll-to-bottom-arrow.hbs
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- {{d-icon "arrow-down"}}
-
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item.gjs
index ce39fa1f464..b768193ffbe 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item.gjs
@@ -1,6 +1,16 @@
import Component from "@glimmer/component";
+import { fn } from "@ember/helper";
+import { on } from "@ember/modifier";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
+import concatClass from "discourse/helpers/concat-class";
+import formatDate from "discourse/helpers/format-date";
+import replaceEmoji from "discourse/helpers/replace-emoji";
+import i18n from "discourse-common/helpers/i18n";
+import gt from "truth-helpers/helpers/gt";
+import ChatThreadParticipants from "../../chat-thread-participants";
+import ChatUserAvatar from "../../chat-user-avatar";
+import UnreadIndicator from "./item/unread-indicator";
export default class ChatThreadListItem extends Component {
@service router;
@@ -9,4 +19,63 @@ export default class ChatThreadListItem extends Component {
openThread(thread) {
this.router.transitionTo("chat.channel.thread", ...thread.routeModels);
}
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item.hbs
deleted file mode 100644
index 5dec5aaaf25..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item.hbs
+++ /dev/null
@@ -1,53 +0,0 @@
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item/unread-indicator.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item/unread-indicator.gjs
index 7dce93ea2ed..3d1d87943e7 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item/unread-indicator.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item/unread-indicator.gjs
@@ -12,4 +12,14 @@ export default class ChatThreadListItemUnreadIndicator extends Component {
get unreadCountLabel() {
return this.unreadCount > 99 ? "99+" : this.unreadCount;
}
+
+
+ {{#if this.showUnreadIndicator}}
+
+
+ {{this.unreadCountLabel}}
+
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item/unread-indicator.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item/unread-indicator.hbs
deleted file mode 100644
index 8f389b8db14..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/thread-list/item/unread-indicator.hbs
+++ /dev/null
@@ -1,7 +0,0 @@
-{{#if this.showUnreadIndicator}}
-
-
- {{this.unreadCountLabel}}
-
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/user-card-button.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/user-card-button.gjs
index c8466370943..813a6c69a1f 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/user-card-button.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/user-card-button.gjs
@@ -1,6 +1,7 @@
import Component from "@glimmer/component";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
+import DButton from "discourse/components/d-button";
export default class ChatUserCardButton extends Component {
@service chat;
@@ -20,4 +21,15 @@ export default class ChatUserCardButton extends Component {
this.appEvents.trigger("card:close");
});
}
+
+
+ {{#if this.shouldRender}}
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/user-card-button.hbs b/plugins/chat/assets/javascripts/discourse/components/chat/user-card-button.hbs
deleted file mode 100644
index fb1198a0a01..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/chat/user-card-button.hbs
+++ /dev/null
@@ -1,8 +0,0 @@
-{{#if this.shouldRender}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/full-page-chat.gjs b/plugins/chat/assets/javascripts/discourse/components/full-page-chat.gjs
index 94d9c7039f7..f91542b5b80 100644
--- a/plugins/chat/assets/javascripts/discourse/components/full-page-chat.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/full-page-chat.gjs
@@ -1,6 +1,14 @@
import Component from "@glimmer/component";
+import { array } from "@ember/helper";
import { inject as service } from "@ember/service";
+import ChatChannel from "./chat-channel";
export default class FullPageChat extends Component {
@service chat;
+
+
+ {{#each (array @channel) as |channel|}}
+
+ {{/each}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/full-page-chat.hbs b/plugins/chat/assets/javascripts/discourse/components/full-page-chat.hbs
deleted file mode 100644
index 74acc331eb5..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/full-page-chat.hbs
+++ /dev/null
@@ -1,3 +0,0 @@
-{{#each (array @channel) as |channel|}}
-
-{{/each}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.gjs b/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.gjs
index 5d42f15189b..d7b1e5dde19 100644
--- a/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.gjs
@@ -1,7 +1,15 @@
import Component from "@glimmer/component";
import { cached } from "@glimmer/tracking";
+import { array } from "@ember/helper";
+import { LinkTo } from "@ember/routing";
import { inject as service } from "@ember/service";
+import ReviewableCreatedBy from "discourse/components/reviewable-created-by";
+import ReviewablePostHeader from "discourse/components/reviewable-post-header";
+import htmlSafe from "discourse-common/helpers/html-safe";
+import i18n from "discourse-common/helpers/i18n";
+import or from "truth-helpers/helpers/or";
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
+import ChatChannelTitle from "./chat-channel-title";
export default class ReviewableChatMessage extends Component {
@service store;
@@ -11,4 +19,53 @@ export default class ReviewableChatMessage extends Component {
get chatChannel() {
return ChatChannel.create(this.args.reviewable.chat_channel);
}
+
+
+
+
+
+
+
+
+
+
+ {{htmlSafe
+ (or @reviewable.payload.message_cooked @reviewable.cooked)
+ }}
+
+
+ {{#if @reviewable.payload.transcript_topic_id}}
+
+
+ {{i18n "review.transcript.view"}}
+
+
+ {{/if}}
+
+ {{yield}}
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.hbs b/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.hbs
deleted file mode 100644
index 8401719457d..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.hbs
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
- {{html-safe (or @reviewable.payload.message_cooked @reviewable.cooked)}}
-
-
- {{#if @reviewable.payload.transcript_topic_id}}
-
-
- {{i18n "review.transcript.view"}}
-
-
- {{/if}}
-
- {{yield}}
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/styleguide/organisms/chat.gjs b/plugins/chat/assets/javascripts/discourse/components/styleguide/organisms/chat.gjs
index 65a8729cd1e..608cd25ee7a 100644
--- a/plugins/chat/assets/javascripts/discourse/components/styleguide/organisms/chat.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/styleguide/organisms/chat.gjs
@@ -1,4 +1,39 @@
import Component from "@glimmer/component";
+import ChatComposer from "../chat-composer";
+import ChatComposerMessageDetails from "../chat-composer-message-details";
+import ChatHeaderIcon from "../chat-header-icon";
+import ChatMessage from "../chat-message";
+import ChatModalArchiveChannel from "../chat-modal-archive-channel";
+import ChatModalChannelSummary from "../chat-modal-channel-summary";
+import ChatModalCreateChannel from "../chat-modal-create-channel";
+import ChatModalDeleteChannel from "../chat-modal-delete-channel";
+import ChatModalEditChannelDescription from "../chat-modal-edit-channel-description";
+import ChatModalEditChannelName from "../chat-modal-edit-channel-name";
+import ChatModalMoveMessageToChannel from "../chat-modal-move-message-to-channel";
+import ChatModalNewMessage from "../chat-modal-new-message";
+import ChatModalThreadSettings from "../chat-modal-thread-settings";
+import ChatModalToggleChannelStatus from "../chat-modal-toggle-channel-status";
+import ChatThreadListItem from "../chat-thread-list-item";
export default class extends Component {
+
+
+
+
+
+
+
+ Modals
+
+
+
+
+
+
+
+
+
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/styleguide/organisms/chat.hbs b/plugins/chat/assets/javascripts/discourse/components/styleguide/organisms/chat.hbs
deleted file mode 100644
index 692feffd8fa..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/styleguide/organisms/chat.hbs
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-Modals
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/components/toggle-channel-membership-button.gjs b/plugins/chat/assets/javascripts/discourse/components/toggle-channel-membership-button.gjs
index e963d7f2017..0043a73d04f 100644
--- a/plugins/chat/assets/javascripts/discourse/components/toggle-channel-membership-button.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/toggle-channel-membership-button.gjs
@@ -2,6 +2,8 @@ import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
+import DButton from "discourse/components/d-button";
+import concatClass from "discourse/helpers/concat-class";
import { popupAjaxError } from "discourse/lib/ajax-error";
import I18n from "discourse-i18n";
export default class ToggleChannelMembershipButton extends Component {
@@ -82,4 +84,32 @@ export default class ToggleChannelMembershipButton extends Component {
this.isLoading = false;
});
}
+
+
+ {{#if @channel.currentUserMembership.following}}
+
+ {{else}}
+
+ {{/if}}
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/components/toggle-channel-membership-button.hbs b/plugins/chat/assets/javascripts/discourse/components/toggle-channel-membership-button.hbs
deleted file mode 100644
index a4017c71e3b..00000000000
--- a/plugins/chat/assets/javascripts/discourse/components/toggle-channel-membership-button.hbs
+++ /dev/null
@@ -1,25 +0,0 @@
-{{#if @channel.currentUserMembership.following}}
-
-{{else}}
-
-{{/if}}
\ No newline at end of file
diff --git a/plugins/chat/assets/javascripts/discourse/connectors/user-preferences-nav/chat-preferences.gjs b/plugins/chat/assets/javascripts/discourse/connectors/user-preferences-nav/chat-preferences.gjs
index 58a82ac40ce..662c88f60f1 100644
--- a/plugins/chat/assets/javascripts/discourse/connectors/user-preferences-nav/chat-preferences.gjs
+++ b/plugins/chat/assets/javascripts/discourse/connectors/user-preferences-nav/chat-preferences.gjs
@@ -1,7 +1,19 @@
import Component from "@glimmer/component";
+import { LinkTo } from "@ember/routing";
+import dIcon from "discourse-common/helpers/d-icon";
+import i18n from "discourse-common/helpers/i18n";
export default class ChatPreferences extends Component {
static shouldRender({ model }, { siteSettings, currentUser }) {
return siteSettings.chat_enabled && (model.can_chat || currentUser?.admin);
}
+
+
+
+
+ {{dIcon "d-chat"}}
+ {{i18n "chat.title_capitalized"}}
+
+
+
}
diff --git a/plugins/chat/assets/javascripts/discourse/connectors/user-preferences-nav/chat-preferences.hbs b/plugins/chat/assets/javascripts/discourse/connectors/user-preferences-nav/chat-preferences.hbs
deleted file mode 100644
index 197fef79067..00000000000
--- a/plugins/chat/assets/javascripts/discourse/connectors/user-preferences-nav/chat-preferences.hbs
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- {{d-icon "d-chat"}}
- {{i18n "chat.title_capitalized"}}
-
-
\ No newline at end of file