'
+ '⏱'
@@ -18,4 +18,15 @@
}
});
+ // https://github.com/the-djmaze/snappymail/issues/349
+ let code;
+ addEventListener('sm-user-login', e => {
+ code = e.detail.get('totp_code');
+ });
+ addEventListener('sm-user-login-response', e => {
+ if (e.detail && !e.detail.error && rl.settings.get('RequireTwoFactor') && !code) {
+ document.location.hash = '#/settings/two-factor-auth';
+ }
+ });
+
})(window.rl);
diff --git a/plugins/two-factor-auth/js/TwoFactorAuthSettings.js b/plugins/two-factor-auth/js/TwoFactorAuthSettings.js
index 8f043fd79..e83014407 100644
--- a/plugins/two-factor-auth/js/TwoFactorAuthSettings.js
+++ b/plugins/two-factor-auth/js/TwoFactorAuthSettings.js
@@ -70,12 +70,12 @@ class TwoFactorAuthSettings
// translatorTrigger();
return this.twoFactorTested() || this.viewEnable_()
? ''
- : rl.i18n('POPUPS_TWO_FACTOR_CFG/TWO_FACTOR_SECRET_TEST_BEFORE_DESC');
+ : rl.i18n('PLUGIN_2FA/TWO_FACTOR_SECRET_TEST_BEFORE_DESC');
},
viewTwoFactorStatus: () => {
// translatorTrigger();
- return rl.i18n('POPUPS_TWO_FACTOR_CFG/TWO_FACTOR_SECRET_'
+ return rl.i18n('PLUGIN_2FA/TWO_FACTOR_SECRET_'
+ (this.twoFactorStatus() ? '' : 'NOT_')
+ 'CONFIGURED_DESC'
);
@@ -202,7 +202,7 @@ class TwoFactorAuthTestPopupView extends rl.pluginPopupView {
rl.addSettingsViewModel(
TwoFactorAuthSettings,
'TwoFactorAuthSettings',
- 'POPUPS_TWO_FACTOR_CFG/LEGEND_TWO_FACTOR_AUTH',
+ 'PLUGIN_2FA/LEGEND_TWO_FACTOR_AUTH',
'two-factor-auth'
);
diff --git a/plugins/two-factor-auth/langs/cs-CZ.ini b/plugins/two-factor-auth/langs/cs-CZ.ini
new file mode 100644
index 000000000..bcffceb9c
--- /dev/null
+++ b/plugins/two-factor-auth/langs/cs-CZ.ini
@@ -0,0 +1,20 @@
+[PLUGIN_2FA]
+LEGEND_TWO_FACTOR_AUTH = "Dvoufázové ověření"
+LABEL_ENABLE_TWO_FACTOR = "Povolit dvoufázové ověření"
+LABEL_TWO_FACTOR_USER = "Uživatel"
+LABEL_TWO_FACTOR_STATUS = "Stav"
+LABEL_TWO_FACTOR_SECRET = "Tajný klíč"
+LABEL_TWO_FACTOR_BACKUP_CODES = "Backup codes"
+BUTTON_CREATE = "Create a secret"
+BUTTON_ACTIVATE = "Activate"
+LINK_TEST = "test"
+BUTTON_SHOW_SECRET = "Show Secret"
+BUTTON_HIDE_SECRET = "Hide Secret"
+TWO_FACTOR_SECRET_CONFIGURED_DESC = "Configured"
+TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC = "Not configured"
+TWO_FACTOR_SECRET_DESC = "Import this info into your Google Authenticator client (or other TOTP client) using the provided QR code below or by entering the code manually.\n"
+TWO_FACTOR_BACKUP_CODES_DESC = "If you can't receive codes via Google Authenticator (or other TOTP client), you can use backup codes to sign in. After you’ve used a backup code to sign in, it will become inactive.\n"
+TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "You can't change this setting before test."
+TITLE_TEST_CODE = "2-Step verification test"
+LABEL_CODE = "Code"
+LABEL_TWO_FACTOR_CODE = "Verification Code"
diff --git a/plugins/two-factor-auth/langs/de_DE.ini b/plugins/two-factor-auth/langs/de_DE.ini
index 9e050e280..90ad5d35c 100644
--- a/plugins/two-factor-auth/langs/de_DE.ini
+++ b/plugins/two-factor-auth/langs/de_DE.ini
@@ -1,4 +1,4 @@
-[POPUPS_TWO_FACTOR_CFG]
+[PLUGIN_2FA]
LEGEND_TWO_FACTOR_AUTH = "Zwei-Faktor-Authentifizierung"
LABEL_ENABLE_TWO_FACTOR = "Zwei-Faktor-Authentifizierung aktivieren"
LABEL_TWO_FACTOR_USER = "Benutzer"
@@ -15,8 +15,6 @@ TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC = "Nicht konfiguriert"
TWO_FACTOR_SECRET_DESC = "Importieren Sie diese Information in Ihre Google-Authenticator-Anwendung (oder andere TOTP-Anwendung), indem Sie den unten bereitgestellten QR-Code verwenden oder den Code manuell eingeben."
TWO_FACTOR_BACKUP_CODES_DESC = "Sollten Sie keine Codes über den Google Authenticator erhalten, können Sie einen Sicherungscode zur Anmeldung verwenden. Der Sicherungscode wird inaktiv, sobald Sie ihn zur Anmeldung verwendet haben."
TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "Sie können diese Einstellung nicht ohne vorherigen Test verändern."
-[POPUPS_TWO_FACTOR_TEST]
TITLE_TEST_CODE = "Zwei-Faktor-Authentifizierung"
LABEL_CODE = "Code"
-[LOGIN]
LABEL_TWO_FACTOR_CODE = "Verifizierungscode"
diff --git a/plugins/two-factor-auth/langs/en.ini b/plugins/two-factor-auth/langs/en.ini
index 4133b4fdb..fb94a5e56 100644
--- a/plugins/two-factor-auth/langs/en.ini
+++ b/plugins/two-factor-auth/langs/en.ini
@@ -1,7 +1,4 @@
-[POPUPS_TWO_FACTOR_TEST]
-TITLE_TEST_CODE = "2-Step verification test"
-LABEL_CODE = "Code"
-[POPUPS_TWO_FACTOR_CFG]
+[PLUGIN_2FA]
LEGEND_TWO_FACTOR_AUTH = "2-Step Verification (TOTP)"
LABEL_ENABLE_TWO_FACTOR = "Enable 2-Step verification"
LABEL_TWO_FACTOR_USER = "User"
@@ -18,5 +15,6 @@ TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC = "Not configured"
TWO_FACTOR_SECRET_DESC = "Import this info into your Google Authenticator client (or other TOTP client) using the provided QR code below or by entering the code manually.\n"
TWO_FACTOR_BACKUP_CODES_DESC = "If you can't receive codes via Google Authenticator (or other TOTP client), you can use backup codes to sign in. After you’ve used a backup code to sign in, it will become inactive.\n"
TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "You can't change this setting before test."
-[LOGIN]
+TITLE_TEST_CODE = "2-Step verification test"
+LABEL_CODE = "Code"
LABEL_TWO_FACTOR_CODE = "Verification Code"
diff --git a/plugins/two-factor-auth/langs/es_ES.ini b/plugins/two-factor-auth/langs/es_ES.ini
index e57238d9d..85fe09191 100644
--- a/plugins/two-factor-auth/langs/es_ES.ini
+++ b/plugins/two-factor-auth/langs/es_ES.ini
@@ -1,7 +1,4 @@
-[POPUPS_TWO_FACTOR_TEST]
-TITLE_TEST_CODE = "Prueba de verificación de 2 pasos"
-LABEL_CODE = "Código"
-[POPUPS_TWO_FACTOR_CFG]
+[PLUGIN_2FA]
LEGEND_TWO_FACTOR_AUTH = "Verificación de 2 Pasos"
LABEL_ENABLE_TWO_FACTOR = "Activar la verificación de 2 pasos"
LABEL_TWO_FACTOR_USER = "Usuario"
@@ -18,5 +15,6 @@ TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC = "No configurado"
TWO_FACTOR_SECRET_DESC = "Importar esta información en su cliente Google Authenticator (u otro cliente TOTP) utilizando el código QR se indica debajo o introduciendo el código manualmente."
TWO_FACTOR_BACKUP_CODES_DESC = "Si usted no puede recibir los códigos a través de Google Authenticator, puede utilizar códigos de copia de seguridad para firmar pulg Después de que usted ha utilizado un código de copia de seguridad para iniciar sesión, se convertirá en inactiva."
TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "You can't change this setting before test."
-[LOGIN]
+TITLE_TEST_CODE = "Prueba de verificación de 2 pasos"
+LABEL_CODE = "Código"
LABEL_TWO_FACTOR_CODE = "Código de verificación"
diff --git a/plugins/two-factor-auth/langs/fr_FR.ini b/plugins/two-factor-auth/langs/fr_FR.ini
index 4e816a027..82cbd64dc 100644
--- a/plugins/two-factor-auth/langs/fr_FR.ini
+++ b/plugins/two-factor-auth/langs/fr_FR.ini
@@ -1,4 +1,4 @@
-[POPUPS_TWO_FACTOR_CFG]
+[PLUGIN_2FA]
LEGEND_TWO_FACTOR_AUTH = "Authentification en deux étapes"
LABEL_ENABLE_TWO_FACTOR = "Activer l'authentification en deux étapes"
LABEL_TWO_FACTOR_USER = "Utilisateur"
@@ -15,8 +15,6 @@ TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC = "Non configuré"
TWO_FACTOR_SECRET_DESC = "Importez ces informations dans votre client Google Authenticator (ou un autre client TOTP) en utilisant le code QR fourni ci-dessous ou en entrant les valeurs manuellement."
TWO_FACTOR_BACKUP_CODES_DESC = "Si vous ne pouvez pas recevoir les codes par Google Authenticator, vous pouvez utiliser les codes de sauvegarde pour vous connecter. Après avoir fait cela, il deviendra inactif."
TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "Vous ne pouvez pas modifier ce paramètre avant de l'avoir essayé."
-[POPUPS_TWO_FACTOR_TEST]
TITLE_TEST_CODE = "Test d'authentification en deux étapes"
LABEL_CODE = "Code"
-[LOGIN]
LABEL_TWO_FACTOR_CODE = "Code de vérification"
diff --git a/plugins/two-factor-auth/langs/hu-HU.ini b/plugins/two-factor-auth/langs/hu-HU.ini
index 62c83aa2c..c97b8b192 100644
--- a/plugins/two-factor-auth/langs/hu-HU.ini
+++ b/plugins/two-factor-auth/langs/hu-HU.ini
@@ -1,4 +1,4 @@
-[POPUPS_TWO_FACTOR_CFG]
+[PLUGIN_2FA]
LEGEND_TWO_FACTOR_AUTH = "2 lépcsős hitelesítés"
LABEL_ENABLE_TWO_FACTOR = "2 lépcsős hitelesítés engedélyezése"
LABEL_TWO_FACTOR_USER = "Felhasználó"
@@ -15,8 +15,6 @@ TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC = "Nincs beállítva"
TWO_FACTOR_SECRET_DESC = "Importáld ezt az infót a Google Authenticator kliensedbe (vagy más TOTP kliensbe) az alábbi QR kód használatával vagy a kód manuális megadatásával.\n"
TWO_FACTOR_BACKUP_CODES_DESC = "Ha nem kapod meg a kódokat a Google Authenticator kliensből (vagy más TOTP kliensből), akkor a bejelentkezéshez használhatod a biztonsági kódot. A biztonsági kód használata után inaktívvá válik.\n"
TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "Tesztelés nélkül nem lehet megváltoztatni ezt a beállítást."
-[POPUPS_TWO_FACTOR_TEST]
TITLE_TEST_CODE = "2-lépéses hitelesítés teszt"
LABEL_CODE = "Kód"
-[LOGIN]
LABEL_TWO_FACTOR_CODE = "Megerősítő kód"
diff --git a/plugins/two-factor-auth/langs/it_IT.ini b/plugins/two-factor-auth/langs/it_IT.ini
index a8252fedc..1b1faccac 100644
--- a/plugins/two-factor-auth/langs/it_IT.ini
+++ b/plugins/two-factor-auth/langs/it_IT.ini
@@ -1,7 +1,4 @@
-[POPUPS_TWO_FACTOR_TEST]
-TITLE_TEST_CODE = "Test di verifica a 2 fattori"
-LABEL_CODE = "Codice"
-[POPUPS_TWO_FACTOR_CFG]
+[PLUGIN_2FA]
LEGEND_TWO_FACTOR_AUTH = "Verifica a 2 Fattori"
LABEL_ENABLE_TWO_FACTOR = "Abilita la verifica a 2 fattori"
LABEL_TWO_FACTOR_USER = "Utente"
@@ -18,5 +15,6 @@ TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC = "Non configurato"
TWO_FACTOR_SECRET_DESC = "Importa queste informazioni nella tua app Google Authenticator (o un altro programma per l'autenticazione a due fattori) utilizzando il codice QR fornito qui sotto o inserendo il codice manualmente.\n"
TWO_FACTOR_BACKUP_CODES_DESC = "Se non riesci a ricevere i codici tramite Google Authenticator (o un altro programma per l'autenticazione a due fattori), puoi utilizzare i codici di backup per accedere. Dopo che hai utilizzato un codice di backup per accedere, diventerà inattivo.\n"
TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "Non puoi modificare questa impostazione prima del test."
-[LOGIN]
+TITLE_TEST_CODE = "Test di verifica a 2 fattori"
+LABEL_CODE = "Codice"
LABEL_TWO_FACTOR_CODE = "Codice di Verifica"
diff --git a/plugins/two-factor-auth/langs/nl_NL.ini b/plugins/two-factor-auth/langs/nl_NL.ini
index d48c636d7..ee6b67cf8 100644
--- a/plugins/two-factor-auth/langs/nl_NL.ini
+++ b/plugins/two-factor-auth/langs/nl_NL.ini
@@ -1,4 +1,4 @@
-[POPUPS_TWO_FACTOR_CFG]
+[PLUGIN_2FA]
LEGEND_TWO_FACTOR_AUTH = "2-Stap verificatie"
LABEL_ENABLE_TWO_FACTOR = "Gebruik 2-Stap verificatie"
LABEL_TWO_FACTOR_USER = "Gebruikersnaam"
@@ -15,8 +15,6 @@ TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC = "Niet geconfigureerd"
TWO_FACTOR_SECRET_DESC = "Importeer deze informatie in uw Google Authenticator-client (of andere TOTP-client) door gebruik te maken van de QR code hier beneden of door de code handmatig in te voeren."
TWO_FACTOR_BACKUP_CODES_DESC = "Als u geen codes ontvangt via de Google Authenticator kunt u de backup codes gebruiken om in te loggen. Na gebruik van de backup code wordt deze inactief."
TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "U kunt 2-stap verificatie niet activeren voordat u het succesvol getest heeft."
-[POPUPS_TWO_FACTOR_TEST]
TITLE_TEST_CODE = "2-Stap verificatie test"
LABEL_CODE = "Code"
-[LOGIN]
LABEL_TWO_FACTOR_CODE = "Verificatie Code"
diff --git a/plugins/two-factor-auth/langs/sv-SE.ini b/plugins/two-factor-auth/langs/sv-SE.ini
index 479151159..7ffd23f21 100644
--- a/plugins/two-factor-auth/langs/sv-SE.ini
+++ b/plugins/two-factor-auth/langs/sv-SE.ini
@@ -1,4 +1,4 @@
-[POPUPS_TWO_FACTOR_CFG]
+[PLUGIN_2FA]
LEGEND_TWO_FACTOR_AUTH = "Tvåstegsverifiering (TOTP)"
LABEL_ENABLE_TWO_FACTOR = "Aktivera tvåstegsverifiering"
LABEL_TWO_FACTOR_USER = "Användare"
@@ -15,8 +15,6 @@ TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC = "Inte konfigurarad"
TWO_FACTOR_SECRET_DESC = "Importera denna information till din Google Authenticator klient (eller annan TOTP klient) med denna QR kod eller manuellt med koden här nedan."
TWO_FACTOR_BACKUP_CODES_DESC = "Om du inte kan ta emot koderna med Google Authenticator, så använd backupkoderna för att logga in. När du använt backupkoderna för att logga in så blir dom inaktiva."
TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "Du kan inte ändra denna inställning innan test."
-[POPUPS_TWO_FACTOR_TEST]
TITLE_TEST_CODE = "Tvåstegsverifieringstest"
LABEL_CODE = "Kod"
-[LOGIN]
LABEL_TWO_FACTOR_CODE = "Verifikationskod"
diff --git a/plugins/two-factor-auth/langs/zh_CN.ini b/plugins/two-factor-auth/langs/zh_CN.ini
index 948a6d886..56091d914 100644
--- a/plugins/two-factor-auth/langs/zh_CN.ini
+++ b/plugins/two-factor-auth/langs/zh_CN.ini
@@ -1,4 +1,4 @@
-[POPUPS_TWO_FACTOR_CFG]
+[PLUGIN_2FA]
LEGEND_TWO_FACTOR_AUTH = "两步验证 (TOTP)"
LABEL_ENABLE_TWO_FACTOR = "启用两步验证"
LABEL_TWO_FACTOR_USER = "用户"
@@ -15,8 +15,6 @@ TWO_FACTOR_SECRET_NOT_CONFIGURED_DESC = "未设置"
TWO_FACTOR_SECRET_DESC = "将下面的信息导入 Google Authenticator (或其他 TOTP 客户端)。 扫描下面的二维码或手动输入密钥。\n"
TWO_FACTOR_BACKUP_CODES_DESC = "如果你无法从验证器获取验证码,你可以使用备用代码登录。 当你使用过某一个备用代码后,它将会失效。\n"
TWO_FACTOR_SECRET_TEST_BEFORE_DESC = "完成测试前你无法更改此设置。"
-[POPUPS_TWO_FACTOR_TEST]
TITLE_TEST_CODE = "两步验证测试"
LABEL_CODE = "代码"
-[LOGIN]
LABEL_TWO_FACTOR_CODE = "验证码"
diff --git a/plugins/two-factor-auth/templates/PopupsTwoFactorAuthTest.html b/plugins/two-factor-auth/templates/PopupsTwoFactorAuthTest.html
index 556a324ef..f6242c74d 100644
--- a/plugins/two-factor-auth/templates/PopupsTwoFactorAuthTest.html
+++ b/plugins/two-factor-auth/templates/PopupsTwoFactorAuthTest.html
@@ -1,10 +1,10 @@
×
-
+