This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/plugins/chat/assets/javascripts/discourse/templates/preferences/chat.hbs
2022-11-26 15:17:43 +01:00

48 lines
2.1 KiB
Handlebars

<label class="control-label">{{i18n "chat.title_capitalized"}}</label>
<div class="control-group chat-setting">
<label class="controls">
<Input id="user_chat_enabled" @type="checkbox" @checked={{this.model.user_option.chat_enabled}} />
{{i18n "chat.enable"}}
</label>
</div>
<div class="control-group chat-setting">
<label class="controls">
<Input id="user_chat_only_push_notifications" @type="checkbox" @checked={{this.model.user_option.only_chat_push_notifications}} />
{{i18n "chat.only_chat_push_notifications.title"}}
</label>
<span class="control-instructions">
{{i18n "chat.only_chat_push_notifications.description"}}
</span>
</div>
<div class="control-group chat-setting">
<label class="controls">
<Input id="user_chat_ignore_channel_wide_mention" @type="checkbox" @checked={{this.model.user_option.ignore_channel_wide_mention}} />
{{i18n "chat.ignore_channel_wide_mention.title"}}
</label>
<span class="control-instructions">
{{i18n "chat.ignore_channel_wide_mention.description"}}
</span>
</div>
<div class="control-group chat-setting controls-dropdown">
<label for="user_chat_sounds">{{i18n "chat.sound.title"}}</label>
<ComboBox @options={{hash none="chat.sounds.none"}} @valueProperty="value" @content={{this.chatSounds}} @value={{this.model.user_option.chat_sound}} @id="user_chat_sounds" @onChange={{action "onChangeChatSound"}} />
</div>
<div class="control-group chat-setting controls-dropdown">
<label for="user_chat_email_frequency">
{{i18n "chat.email_frequency.title"}}
</label>
<ComboBox @valueProperty="value" @content={{this.emailFrequencyOptions}} @value={{this.model.user_option.chat_email_frequency}} @id="user_chat_email_frequency" @onChange={{action (mut this.model.user_option.chat_email_frequency)}} />
{{#if (eq this.model.user_option.chat_email_frequency "when_away")}}
<div class="control-instructions">
{{i18n "chat.email_frequency.description"}}
</div>
{{/if}}
</div>
<SaveControls @id="user_chat_preference_save" @model={{this.model}} @action={{action "save"}} @saved={{this.saved}} />