DEV: removes chat-channel-settings-row (#19650)

This is dead code which should have been removed when `chat-settings-settings-modal` has been removed.
This commit is contained in:
Joffrey JAFFEUX
2022-12-29 13:50:01 +01:00
committed by GitHub
parent 4ba4959a26
commit 2644a4d303
5 changed files with 0 additions and 201 deletions

View File

@ -1,52 +0,0 @@
<div
class="{{this.chatChannelClass}}
chat-channel-settings-row chat-channel-settings-row-{{this.channel.id}}"
>
<div class="chat-channel-info">
<div class="channel-title-container">
<LinkTo
@route="chat.channel"
@models={{array this.channel.id this.channel.title}}
class="channel-title"
>
<ChatChannelTitle @channel={{this.channel}} />
</LinkTo>
</div>
<div class="chat-channel-data">
{{#if this.channel.isFollowing}}
{{d-icon "check"}}
<p class="channel-joined">
{{i18n "chat.settings.followed"}}
</p>
{{/if}}
{{#if (and this.channel.description this.categoryChannel)}}
<div class="chat-channel-description">
{{this.channel.description}}
</div>
{{/if}}
<ChatChannelStatus @channel={{this.channel}} @format="short" />
</div>
</div>
<div class="btn-container">
{{#unless this.channel.isFollowing}}
<DButton
@class="chat-channel-preview"
@action={{action "previewChannel"}}
@disabled={{this.loading}}
@label="chat.settings.preview"
/>
{{/unless}}
<ToggleChannelMembershipButton
@channel={{this.channel}}
@options={{hash
joinClass="btn-primary"
leaveClass="btn-danger"
labelType="short"
}}
/>
</div>
</div>

View File

@ -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);
},
});