The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/packages/rocketchat-push-notifications/client/views/pushNotificationsFlexTab.html

115 lines
6.1 KiB

<template name="pushNotificationsFlexTab">
<div class="content">
<div class="list-view push-notifications">
<div class="title">
<h2>{{_ "Notifications"}}</h2>
</div>
<form>
<ul class="list clearfix">
<li>
<label>{{_ "Audio"}}</label>
<div>
{{#if editing 'audioNotification'}}
<label>
<select name="audioNotification" class="audio">
<option value="none" selected="{{$eq audioNotification 'none'}}">{{_ "None"}}</option>
<option value="" selected="{{$eq audioNotification ''}}">{{_ "Use_account_preference"}} ({{_ "Default"}})</option>
<option value="chime" selected="{{$eq audioNotification 'chime'}}">Chime</option>
{{#each audioAssets}}
<option value="{{_id}}" selected="{{$eq audioNotification _id}}">{{name}}</option>
{{/each}}
</select>
</label>
<button type="button" class="button cancel">{{_ "Cancel"}}</button>
<button type="button" class="button primary save">{{_ "Save"}}</button>
{{else}}
<span class="current-setting">{{audioValue}} <i class="icon-play-circled" data-play="{{audioNotification}}"></i> <i class="icon-pencil" data-edit="audioNotification"></i></span>
{{/if}}
</div>
</li>
<li>
<label>{{_ "Desktop"}}</label>
<div>
{{#if editing 'desktopNotifications'}}
<label><input type="radio" name="desktopNotifications" value="all" checked="{{$eq desktopNotifications 'all'}}" /> {{_ "All_messages"}}</label>
<label><input type="radio" name="desktopNotifications" value="mentions" checked="{{$eq desktopNotifications 'mentions'}}" /> {{_ "Mentions_default"}}</label>
<label><input type="radio" name="desktopNotifications" value="nothing" checked="{{$eq desktopNotifications 'nothing'}}" /> {{_ "Nothing"}}</label>
<br />
{{#if desktopNotificationDuration}}
<label>{{_ "Duration"}} ({{_ "seconds"}}) <input type="number" name="duration" min="0" value="{{desktopNotificationDuration}}" class="content-background-color"></label>
{{else}}
<label>{{_ "Duration"}} ({{_ "seconds"}}) <input type="number" name="duration" min="0" value="" placeholder="{{_ "Use_User_Preferences_or_Global_Settings"}}" class="content-background-color"></label>
{{/if}}
<button type="button" class="button cancel">{{_ "Cancel"}}</button>
<button type="button" class="button primary save">{{_ "Save"}}</button>
{{else}}
<span class="current-setting">{{subValue 'desktopNotifications'}} <i class="icon-pencil" data-edit="desktopNotifications"></i></span>
{{/if}}
</div>
</li>
{{#unless editing 'desktopNotifications'}}
<li>
<label>{{_ "Desktop_Notifications_Duration"}}</label>
<div>
<span class="current-setting">{{#if desktopNotificationDuration}}{{desktopNotificationDuration}} {{_"seconds"}}{{else}}{{_ "Use_User_Preferences_or_Global_Settings"}}{{/if}}</span>
</div>
</li>
{{/unless}}
<li>
<label>{{_ "Mobile"}}</label>
<div>
{{#if editing 'mobilePushNotifications'}}
<label><input type="radio" name="mobilePushNotifications" value="all" checked="{{$eq mobilePushNotifications 'all'}}" /> {{_ "All_messages"}}</label>
<label><input type="radio" name="mobilePushNotifications" value="mentions" checked="{{$eq mobilePushNotifications 'mentions'}}" /> {{_ "Mentions_default"}}</label>
<label><input type="radio" name="mobilePushNotifications" value="nothing" checked="{{$eq mobilePushNotifications 'nothing'}}" /> {{_ "Nothing"}}</label>
<button type="button" class="button cancel">{{_ "Cancel"}}</button>
<button type="button" class="button primary save">{{_ "Save"}}</button>
{{else}}
<span class="current-setting">{{subValue 'mobilePushNotifications'}} <i class="icon-pencil" data-edit="mobilePushNotifications"></i></span>
{{/if}}
</div>
</li>
<li>
<label>{{_ "Email"}}</label>
<div>
{{#if editing 'emailNotifications'}}
<label><input type="radio" name="emailNotifications" value="all" checked="{{$eq emailNotifications 'all'}}" /> {{_ "All_messages"}}</label>
{{#if showEmailMentions}}
<label><input type="radio" name="emailNotifications" value="mentions" checked="{{$eq emailNotifications 'mentions'}}" /> {{_ "Mentions"}}</label>
{{/if}}
<label><input type="radio" name="emailNotifications" value="nothing" checked="{{$eq emailNotifications 'nothing'}}" /> {{_ "Nothing"}}</label>
<label><input type="radio" name="emailNotifications" value="default" checked="{{$eq emailNotifications 'default'}}" /> {{_ "Use_account_preference"}}</label>
<button type="button" class="button cancel">{{_ "Cancel"}}</button>
<button type="button" class="button primary save">{{_ "Save"}}</button>
{{else}}
<span class="current-setting">{{subValue 'emailNotifications'}} <i class="icon-pencil" data-edit="emailNotifications"></i></span>
{{/if}}
</div>
</li>
{{#unless emailVerified}}
<li>
<div class="alert alert-warning pending-background pending-border">
{{_ "You_wont_receive_email_notifications_because_you_have_not_verified_your_email"}}
</div>
</li>
{{/unless}}
<li>
<label>{{_ "Unread_Alert"}}</label>
<div>
{{#if editing 'unreadAlert'}}
<label><input type="radio" name="unreadAlert" value="all" checked="{{$eq unreadAlert 'all'}}" /> {{_ "On"}}</label>
<label><input type="radio" name="unreadAlert" value="nothing" checked="{{$eq unreadAlert 'nothing'}}" /> {{_ "Off"}}</label>
<label><input type="radio" name="unreadAlert" value="default" checked="{{$eq unreadAlert 'default'}}" /> {{_ "Use_account_preference"}}</label>
<button type="button" class="button cancel">{{_ "Cancel"}}</button>
<button type="button" class="button primary save">{{_ "Save"}}</button>
{{else}}
<span class="current-setting">{{unreadAlertText}} <i class="icon-pencil" data-edit="unreadAlert"></i></span>
{{/if}}
</div>
</li>
</ul>
</form>
</div>
</div>
</template>