87 lines
4.4 KiB
Handlebars
87 lines
4.4 KiB
Handlebars
<div class="chat-form__section">
|
|
<div class="chat-form__field">
|
|
<label class="chat-form__label">
|
|
<span>{{i18n "chat.settings.mute"}}</span>
|
|
</label>
|
|
<div class="chat-form__control">
|
|
<ComboBox @content={{this.mutedOptions}} @value={{this.channel.current_user_membership.muted}} @valueProperty="value" @class="channel-settings-view__muted-selector" @onChange={{action (fn this.saveNotificationSettings "muted")}} />
|
|
{{#if this.savedMuted}}
|
|
<span class="channel-settings-view__saved" role="status" aria-label={{i18n "chat.channel_settings.save_label.mute_channel"}}>
|
|
{{d-icon "check"}} {{i18n "saved"}}
|
|
</span>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
{{#unless this.channel.current_user_membership.muted}}
|
|
<div class="chat-form__field">
|
|
<label class="chat-form__label">
|
|
<span>{{i18n "chat.settings.desktop_notification_level"}}</span>
|
|
</label>
|
|
<div class="chat-form__control">
|
|
<ComboBox @content={{this.notificationLevels}} @value={{this.channel.current_user_membership.desktop_notification_level}} @valueProperty="value" @class="channel-settings-view__desktop-notification-level-selector" @onChange={{action (fn this.saveNotificationSettings "desktop_notification_level")}} />
|
|
{{#if this.savedDesktopNotificationLevel}}
|
|
<span class="channel-settings-view__saved" role="status" aria-label={{i18n "chat.channel_settings.save_label.desktop_notification"}}>
|
|
{{d-icon "check"}} {{i18n "saved"}}
|
|
</span>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="chat-form__field">
|
|
<label class="chat-form__label">
|
|
<span>{{i18n "chat.settings.mobile_notification_level"}}</span>
|
|
</label>
|
|
<div class="chat-form__control">
|
|
<ComboBox @content={{this.notificationLevels}} @value={{this.channel.current_user_membership.mobile_notification_level}} @valueProperty="value" @class="channel-settings-view__mobile-notification-level-selector" @onChange={{action (fn this.saveNotificationSettings "mobile_notification_level")}} />
|
|
{{#if this.savedMobileNotificationLevel}}
|
|
<span class="channel-settings-view__saved" role="status" aria-label={{i18n "chat.channel_settings.save_label.mobile_notification"}}>
|
|
{{d-icon "check"}} {{i18n "saved"}}
|
|
</span>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
{{/unless}}
|
|
<div class="chat-retention-info">{{d-icon "info-circle"}}{{i18n "chat.settings.retention_info" days=this.siteSettings.chat_channel_retention_days}}</div>
|
|
</div>
|
|
|
|
{{#if (chat-guardian "can-edit-chat-channel")}}
|
|
<h3 class="chat-form__section-admin-title">{{i18n "chat.settings.admin_title"}}</h3>
|
|
{{#if this.autoJoinAvailable}}
|
|
<div class="chat-form__section">
|
|
<div class="chat-form__field">
|
|
<label class="chat-form__label">
|
|
<span>{{i18n "chat.settings.auto_join_users_label"}}</span>
|
|
</label>
|
|
<ComboBox @content={{this.autoAddUsersOptions}} @value={{this.channel.auto_join_users}} @valueProperty="value" @class="channel-settings-view__auto-join-selector" @onChange={{action (fn this.onToggleAutoJoinUsers this.channel.auto_join_users)}} />
|
|
<div class="chat-form__description -autojoin">{{i18n "chat.settings.auto_join_users_info" category=this.channel.chatable.name}}</div>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
|
|
{{#unless this.channel.isDirectMessageChannel}}
|
|
<div class="chat-form__section">
|
|
{{#if (chat-guardian "can-edit-chat-channel")}}
|
|
{{#if (chat-guardian "can-archive-channel" this.channel)}}
|
|
<div class="chat-form__field">
|
|
<DButton @action={{action "onArchiveChannel"}} @label="chat.channel_settings.archive_channel" @class="archive-btn chat-form__btn btn-flat" @icon="archive" />
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if this.channel.isClosed}}
|
|
<div class="chat-form__field">
|
|
<DButton @action={{action "onToggleChannelState"}} @label="chat.channel_settings.open_channel" @class="open-btn chat-form__btn btn-flat" @icon="unlock" />
|
|
</div>
|
|
{{else}}
|
|
<div class="chat-form__field">
|
|
<DButton @action={{action "onToggleChannelState"}} @label="chat.channel_settings.close_channel" @class="close-btn chat-form__btn btn-flat" @icon="lock" />
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="chat-form__field">
|
|
<DButton @action={{action "onDeleteChannel"}} @label="chat.channel_settings.delete_channel" @class="delete-btn chat-form__btn btn-flat" @icon="trash-alt" />
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/unless}}
|