diff --git a/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 index 9dc6083f15c..d8c54177d43 100644 --- a/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 @@ -40,6 +40,11 @@ export default Ember.Controller.extend(CanCheckEmails, PreferencesTabController, return !this.siteSettings.enable_sso && this.siteSettings.enable_local_logins; }, + @computed("model.second_factor_enabled") + secondFactorStatusClass(secondFactorEnabled) { + return secondFactorEnabled ? 'tip good' : 'tip bad'; + }, + actions: { save() { this.set('saved', false); diff --git a/app/assets/javascripts/discourse/templates/preferences/account.hbs b/app/assets/javascripts/discourse/templates/preferences/account.hbs index 225db632b9c..a9a367d3da1 100644 --- a/app/assets/javascripts/discourse/templates/preferences/account.hbs +++ b/app/assets/javascripts/discourse/templates/preferences/account.hbs @@ -69,21 +69,25 @@
-
- {{#link-to "preferences.second-factor" class="btn"}} - {{#if model.second_factor_enabled}} - {{d-icon "unlock-alt"}} - {{i18n 'user.second_factor.disable'}} - {{else}} - {{d-icon "lock"}} - {{i18n 'user.second_factor.enable'}} - {{/if}} - {{/link-to}} -
-
{{i18n 'user.second_factor.info_prompt'}}
+ +
+ + {{#if model.second_factor_enabled}} + {{i18n 'user.second_factor.enabled_status'}} + {{d-icon 'check'}} + {{else}} + {{i18n 'user.second_factor.disabled_status'}} + {{d-icon 'times'}} + {{/if}} + + + {{#link-to "preferences.second-factor" class="btn btn-small btn-icon pad-left no-text"}} + {{d-icon "pencil"}} + {{/link-to}} +
{{/if}} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 1f7d00b8059..877297c1981 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -710,8 +710,8 @@ en: second_factor: title: "Two Factor Authentication" - enable: "Enable Two Factor Authentication" - disable: "Disable Two Factor Authentication" + enabled_status: "Status: On" + disabled_status: "Status: Off" confirm_password_description: "Confirm your password to continue enabling Two Factor Authentication." enable_description: | To complete Two Factor Authentication setup, scan the following QR code