From 3a0bf97401b6e275920a8246351008f7bcf2e992 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Thu, 11 Jan 2024 19:20:27 +0100 Subject: [PATCH] DEV: Minor cleanup of navbar components (#25222) Convert components to template-only where applicable. --- .../components/chat/navbar/actions.gjs | 41 +++++++++---------- .../components/chat/navbar/channel-title.gjs | 27 ++++++------ .../components/chat/navbar/index.gjs | 41 +++++++++---------- .../components/chat/navbar/sub-title.gjs | 22 +++++----- .../components/chat/navbar/title.gjs | 33 +++++++-------- 5 files changed, 77 insertions(+), 87 deletions(-) diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/navbar/actions.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/navbar/actions.gjs index c46ad3b7a8f..791dc986bb7 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat/navbar/actions.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat/navbar/actions.gjs @@ -1,4 +1,3 @@ -import Component from "@glimmer/component"; import { hash } from "@ember/helper"; import CloseDrawerButton from "./close-drawer-button"; import CloseThreadButton from "./close-thread-button"; @@ -11,23 +10,23 @@ import ThreadTrackingDropdown from "./thread-tracking-dropdown"; import ThreadsListButton from "./threads-list-button"; import ToggleDrawerButton from "./toggle-drawer-button"; -export default class ChatNavbarActions extends Component { - -} +const ChatNavbarActions = ; + +export default ChatNavbarActions; diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/navbar/channel-title.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/navbar/channel-title.gjs index 056e21743a1..b99092b97d4 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat/navbar/channel-title.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat/navbar/channel-title.gjs @@ -1,17 +1,16 @@ -import Component from "@glimmer/component"; import { LinkTo } from "@ember/routing"; import ChannelTitle from "discourse/plugins/chat/discourse/components/channel-title"; -export default class ChatNavbarChannelTitle extends Component { - -} +const ChatNavbarChannelTitle = ; + +export default ChatNavbarChannelTitle; diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/navbar/index.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/navbar/index.gjs index 791311a42b5..4d39054073b 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat/navbar/index.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat/navbar/index.gjs @@ -1,4 +1,3 @@ -import Component from "@glimmer/component"; import { hash } from "@ember/helper"; import { on } from "@ember/modifier"; import concatClass from "discourse/helpers/concat-class"; @@ -8,23 +7,23 @@ import BackButton from "./back-button"; import ChannelTitle from "./channel-title"; import Title from "./title"; -export default class ChatNavbar extends Component { - -} +const ChatNavbar = ; + +export default ChatNavbar; diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/navbar/sub-title.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/navbar/sub-title.gjs index 985000915a9..bce87f2086e 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat/navbar/sub-title.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat/navbar/sub-title.gjs @@ -1,13 +1,11 @@ -import Component from "@glimmer/component"; +const ChatNavbarSubTitle = ; -export default class ChatNavbarSubTitle extends Component { - -} +export default ChatNavbarSubTitle; diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/navbar/title.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/navbar/title.gjs index b021bf86ae0..3030e6cc6b3 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat/navbar/title.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat/navbar/title.gjs @@ -1,23 +1,18 @@ -import Component from "@glimmer/component"; import { hash } from "@ember/helper"; import icon from "discourse-common/helpers/d-icon"; import SubTitle from "./sub-title"; -export default class ChatNavbarTitle extends Component { - -} +const ChatNavbarTitle = ; + +export default ChatNavbarTitle;