A platform for community discussion. Free, open, simple.
UX: chat leave info (#24645)
chapoi1b022457ade8
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-channel-settings.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-channel-settings.gjsindex 03e20868cd8..e7326283ebc 100644--- a/plugins/chat/assets/javascripts/discourse/components/chat-channel-settings.gjs+++ b/plugins/chat/assets/javascripts/discourse/components/chat-channel-settings.gjs@@ -9,6 +9,8 @@ import DToggleSwitch from "discourse/components/d-toggle-switch";import categoryBadge from "discourse/helpers/category-badge";import replaceEmoji from "discourse/helpers/replace-emoji";import { popupAjaxError } from "discourse/lib/ajax-error";+import icon from "discourse-common/helpers/d-icon";+import i18n from "discourse-common/helpers/i18n";import I18n from "discourse-i18n";import ComboBox from "select-kit/components/combo-box";import ChatForm from "discourse/plugins/chat/discourse/components/chat/form";@@ -591,7 +593,14 @@ export default class ChatAboutScreen extends Component {/></:action></section.row>+ {{#unless @channel.isCategoryChannel}}+ <div class="chat-channel-settings__leave-info">+ {{icon "exclamation-triangle"}}+ {{i18n "chat.channel_settings.leave_groupchat_info"}}+ </div>+ {{/unless}}</form.section>+</ChatForm></div></template>diff --git a/plugins/chat/assets/stylesheets/common/chat-channel-settings.scss b/plugins/chat/assets/stylesheets/common/chat-channel-settings.scssindex 3ac338fa7e7..b9268c74ea0 100644--- a/plugins/chat/assets/stylesheets/common/chat-channel-settings.scss+++ b/plugins/chat/assets/stylesheets/common/chat-channel-settings.scss@@ -9,4 +9,17 @@.chat-retention-reminder-text {color: var(--primary-medium);}++ &__leave-info {+ font-size: var(--font-down-1-rem);+ color: var(--primary-medium);++ .d-icon {+ color: var(--danger);+ }+ }++ .chat-form__section-content:has(.chat-channel-settings__leave-info) {+ gap: 0.25rem;+ }}diff --git a/plugins/chat/config/locales/client.en.yml b/plugins/chat/config/locales/client.en.ymlindex 6eddf0a4533..474396d7c8b 100644--- a/plugins/chat/config/locales/client.en.yml+++ b/plugins/chat/config/locales/client.en.yml@@ -62,6 +62,7 @@ en:delete_channel: "Delete channel"join_channel: "Join channel"leave_channel: "Leave channel"+ leave_groupchat_info: "By leaving this group chat, you will no longer have access to it and won’t receive notifications related to it. To rejoin, you will need to be re-invited by a member of the group chat."join: "Join"leave: "Leave"save_label: