diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 339952e9d..2ad7cb905 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1084,9 +1084,13 @@ "description": "Title of the Message TTL setting" }, "messageTTLSettingDescription": { - "message": "Time to live in hours (min: 12, max: 96)", + "message": "Time to live (how long the recipient will have to collect their messages)", "description": "Description of the time to live setting" }, + "messageTTLSettingWarning": { + "message": "Warning! Lowering the TTL could result in messages being lost if the recipient doesn't collect them in time!", + "description": "Warning for the time to live setting" + }, "notificationSettingsDialog": { "message": "When messages arrive, display notifications that reveal:", "description": "Explain the purpose of the notification settings" diff --git a/js/views/settings_view.js b/js/views/settings_view.js index ee7e09783..323ebba89 100644 --- a/js/views/settings_view.js +++ b/js/views/settings_view.js @@ -58,12 +58,17 @@ }, events: { change: 'change', + input: 'input', }, change(e) { this.value = e.target.value; this.setFn(this.value); window.log.info('message-ttl-setting changed to', this.value); }, + input(e) { + this.value = e.target.value; + this.$('label').html(`${this.value} Hours`); + }, populate() { this.$('input').val(this.value); }, @@ -202,6 +207,7 @@ readReceiptSettingDescription: i18n('readReceiptSettingDescription'), messageTTL: i18n('messageTTL'), messageTTLSettingDescription: i18n('messageTTLSettingDescription'), + messageTTLSettingWarning: i18n('messageTTLSettingWarning'), spellCheckHeader: i18n('spellCheck'), spellCheckDescription: i18n('spellCheckDescription'), blockedHeader: 'Blocked Users', diff --git a/settings.html b/settings.html index 1c6866d3e..209b180fa 100644 --- a/settings.html +++ b/settings.html @@ -114,8 +114,38 @@

{{ messageTTL }}

- - +
{{ messageTTLSettingDescription }}
+
{{ messageTTLSettingWarning }}
+
+ + + + +

diff --git a/stylesheets/_settings.scss b/stylesheets/_settings.scss index 973b7f90b..f8d55493a 100644 --- a/stylesheets/_settings.scss +++ b/stylesheets/_settings.scss @@ -90,4 +90,20 @@ color: white; } } + + .message-ttl-setting { + .inputs { + display: flex; + padding-top: 18px; + } + + #warning { + padding-top: 12px; + font-weight: 300; + color: red; + } + + input { flex: 1; } + label { padding-left: 12px; } + } }