diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index cfbec5a0b..5310dc8ae 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -87,8 +87,8 @@ "indexTitle": "Home", "authorsTitle": "Authors", "staffTitle": "Staff", - "login": "Login", - "signup": "Signup", + "login": "Log in", + "signup": "Sign up", "user": { "profile": "Profile", "notifications": "Notifications", @@ -939,6 +939,23 @@ } }, "auth": { + "login": { + "main": { + "title": "Log in to Hangar" + }, + "sudo": { + "title": "Verify your identity", + "info": "You need to authenticate again to perform this action." + }, + "twoFactor": { + "title": "Two-factor authentication", + "info": "Your account uses two-factor authentication. Use one of your saved methods to continue.", + "webauthn": { + "button": "Use passkey", + "genericError": "Passkey authentication failed. Try again, or use another method." + } + } + }, "settings": { "profile": { "header": "Profile", @@ -955,14 +972,21 @@ }, "security": { "header": "Security", - "authApp": "Authenticator App", + "authApp": { + "name": "Authenticator App", + "none": "Set up a mobile authenticator app to generate one-time passcodes as a two-factor authentication method.", + "active": "You have set up an authenticator app as a two-factor method." + }, "devices": "Devices", "button": { "setupAuthApp": "Setup 2FA via authenticator app", "setupSecurityKey": "Setup 2FA via security key", "linkGithub": "Link a GitHub account", + "linkGoogle": "Link a Google account", + "linkMicrosoft": "Link a Microsoft account", "linkOther": "Link {0} account", - "unlinkAccount": "Unlink {0} account {1}" + "unlinkAccount": "Unlink {0} account {1}", + "unlinkTotp": "Remove authenticator app" }, "authAppSetup": { "scan": "Scan the QR code on the right using your favorite authenticator app", @@ -974,16 +998,19 @@ "name": "Security Keys", "keyName": "Name", "unregister": "Unregister", - "rename": "Rename" + "rename": "Rename", + "registerTitle": "Register a new security key", + "none": "You have no security keys registered. You can add a trusted device to your account as a two-factor authentication method." }, "backupCodes": { "name": "Backup Codes", + "info": "If you lose access to your other two-factor methods, you can use a backup code to log in.", "generateNew": "Generate new codes", "modal": { - "title": "Confirm backup codes", - "needConfigure": "You need to configure backup codes before you can activate 2fa. Please save these codes securely!", - "confirm": "Confirm that you saved the backup codes by entering one of them below", - "backupCode": "Backup Code" + "title": "Save your backup codes", + "needConfigure": "If you ever lose access to your main two-factor authentication methods, you can use these backup codes to log in. Store these somewhere safe.", + "confirm": "To finish setting up two-factor authentication, confirm that you saved the backup codes by entering one of them below:", + "backupCode": "Enter a backup code" } }, "unlinkOAuth": { diff --git a/frontend/src/pages/auth/login.vue b/frontend/src/pages/auth/login.vue index e6bed88c2..926ddc65a 100644 --- a/frontend/src/pages/auth/login.vue +++ b/frontend/src/pages/auth/login.vue @@ -30,6 +30,26 @@ if (privileged) { loading.value = false; } +const dialogTitle = computed(() => { + if (privileged) { + return i18n.t("auth.login.sudo.title"); + } + if (supportedMethods.value.length > 0) { + return i18n.t("auth.login.twoFactor.title"); + } + return i18n.t("auth.login.main.title"); +}) + +const dialogInfo = computed(() => { + if (privileged) { + return i18n.t("auth.login.sudo.info"); + } + if (supportedMethods.value.length > 0) { + return i18n.t("auth.login.twoFactor.info"); + } + return null; +}) + async function loginPassword() { if (!(await v.value.$validate())) return; loading.value = true; @@ -125,9 +145,9 @@ useHead(useSeo("Login", null, route, null));