From 2644a4d3035f25c9fbdb6a4424153ba09512b931 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 29 Dec 2022 13:50:01 +0100 Subject: [PATCH] DEV: removes chat-channel-settings-row (#19650) This is dead code which should have been removed when `chat-settings-settings-modal` has been removed. --- .../components/chat-channel-settings-row.hbs | 52 -------------- .../components/chat-channel-settings-row.js | 40 ----------- .../assets/stylesheets/common/common.scss | 68 ------------------- .../assets/stylesheets/desktop/desktop.scss | 15 ---- .../assets/stylesheets/mobile/mobile.scss | 26 ------- 5 files changed, 201 deletions(-) delete mode 100644 plugins/chat/assets/javascripts/discourse/components/chat-channel-settings-row.hbs delete mode 100644 plugins/chat/assets/javascripts/discourse/components/chat-channel-settings-row.js diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-settings-row.hbs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-settings-row.hbs deleted file mode 100644 index b86e6ea223d..00000000000 --- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-settings-row.hbs +++ /dev/null @@ -1,52 +0,0 @@ -
-
-
- - - -
- -
- {{#if this.channel.isFollowing}} - {{d-icon "check"}} -

- {{i18n "chat.settings.followed"}} -

- {{/if}} - - {{#if (and this.channel.description this.categoryChannel)}} -
- • - {{this.channel.description}} -
- {{/if}} - -
-
- -
- {{#unless this.channel.isFollowing}} - - {{/unless}} - -
-
\ No newline at end of file diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-settings-row.js b/plugins/chat/assets/javascripts/discourse/components/chat-channel-settings-row.js deleted file mode 100644 index 9918af7a344..00000000000 --- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-settings-row.js +++ /dev/null @@ -1,40 +0,0 @@ -import Component from "@ember/component"; -import discourseComputed from "discourse-common/utils/decorators"; -import I18n from "I18n"; -import { action } from "@ember/object"; -import { inject as service } from "@ember/service"; - -const NOTIFICATION_LEVELS = [ - { name: I18n.t("chat.notification_levels.never"), value: "never" }, - { name: I18n.t("chat.notification_levels.mention"), value: "mention" }, - { name: I18n.t("chat.notification_levels.always"), value: "always" }, -]; - -const MUTED_OPTIONS = [ - { name: I18n.t("chat.settings.muted_on"), value: true }, - { name: I18n.t("chat.settings.muted_off"), value: false }, -]; - -export default Component.extend({ - channel: null, - loading: false, - showSaveSuccess: false, - notificationLevels: NOTIFICATION_LEVELS, - mutedOptions: MUTED_OPTIONS, - chat: service(), - router: service(), - - didInsertElement() { - this._super(...arguments); - }, - - @discourseComputed("channel.chatable_type") - chatChannelClass(channelType) { - return `${channelType.toLowerCase()}-chat-channel`; - }, - - @action - previewChannel() { - this.chat.openChannel(this.channel); - }, -}); diff --git a/plugins/chat/assets/stylesheets/common/common.scss b/plugins/chat/assets/stylesheets/common/common.scss index 2a390547ef5..4290dda4137 100644 --- a/plugins/chat/assets/stylesheets/common/common.scss +++ b/plugins/chat/assets/stylesheets/common/common.scss @@ -365,74 +365,6 @@ $float-height: 530px; } } -.chat-channel-settings-row { - display: flex; - padding: 0.5em; - align-items: center; - background: var(--secondary); - border-bottom: 1px solid var(--primary-low); - .chat-channel-info { - .channel-title-container { - position: relative; - .channel-title { - display: flex; - align-items: center; - font-weight: 500; - .edit-btn { - border: none; - background-color: var(--secondary); - &:hover { - .d-icon { - color: var(--primary-very-high); - } - } - .d-icon { - color: var(--primary-medium); - } - .select-kit-header { - background-color: var(--secondary); - } - } - } - } - .chat-channel-data { - display: flex; - align-items: center; - font-size: var(--font-down-1); - .d-icon-check { - font-size: var(--font-down-3); - margin-right: 0.5em; - color: var(--success); - } - .channel-joined { - margin: 0 0.5em 0 0; - font-weight: 500; - color: var(--success); - } - .chat-channel-description { - color: var(--primary-high); - } - } - } - .channel-name-edit { - display: flex; - align-items: center; - margin-bottom: 9px; - - .name-input { - margin: 0; - } - - .save-btn, - .cancel-btn { - margin-left: 0.25em; - } - } - .btn-container { - margin-left: auto; - } -} - body.has-sidebar-page.has-full-page-chat #main-outlet-wrapper { gap: 0; } diff --git a/plugins/chat/assets/stylesheets/desktop/desktop.scss b/plugins/chat/assets/stylesheets/desktop/desktop.scss index da4b054ce10..087736187b1 100644 --- a/plugins/chat/assets/stylesheets/desktop/desktop.scss +++ b/plugins/chat/assets/stylesheets/desktop/desktop.scss @@ -132,21 +132,6 @@ } } -.chat-browse .chat-channel-settings-row { - .edit-btn, - .btn-container { - opacity: 0; - transition: opacity 0.1s; - } - - &:hover { - .edit-btn, - .btn-container { - opacity: 1; - } - } -} - .chat-form { &__description.-autojoin, &__description.-channel-wide-mentions { diff --git a/plugins/chat/assets/stylesheets/mobile/mobile.scss b/plugins/chat/assets/stylesheets/mobile/mobile.scss index 98224a6849f..ff9c1b60b23 100644 --- a/plugins/chat/assets/stylesheets/mobile/mobile.scss +++ b/plugins/chat/assets/stylesheets/mobile/mobile.scss @@ -16,23 +16,6 @@ body.has-full-page-chat { } } -.chat-channel-settings-modal .modal-inner-container { - max-width: 90vw; - .chat-channel-settings-row { - max-width: 100%; - - .chat-channel-preview { - display: none; - } - .chat-channel-title { - max-width: 80%; - } - .controls.save-container { - justify-content: end; - } - } -} - .full-page-chat { grid-template-columns: 100%; overflow-x: hidden; @@ -82,15 +65,6 @@ body.has-full-page-chat { } } -.chat-browse { - .chat-channel-settings-row { - font-size: var(--font-down-1); - .chat-channel-title { - grid-template-columns: 15px 1fr; - } - } -} - .chat-full-page-header { .chat-channel-header-details { .chat-channel-retry-archive {