web/user: fix device type for static tokens

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-04 15:28:55 +01:00
parent 337677ad12
commit e0e4bf6972
4 changed files with 33 additions and 10 deletions

View File

@ -4218,9 +4218,9 @@ msgstr "Static Tokens"
msgid "Static authenticator"
msgstr "Static authenticator"
#:
#~ msgid "Static tokens"
#~ msgstr "Static tokens"
#: src/user/user-settings/mfa/MFADevicesPage.ts
msgid "Static tokens"
msgstr "Static tokens"
#: src/pages/stages/prompt/PromptForm.ts
msgid "Static: Static value, displayed as-is."
@ -4652,6 +4652,10 @@ msgstr "TLS Verification Certificate"
msgid "TOTP Authenticators"
msgstr "TOTP Authenticators"
#: src/user/user-settings/mfa/MFADevicesPage.ts
msgid "TOTP Device"
msgstr "TOTP Device"
#: src/user/user-settings/mfa/MFADevicesPage.ts
msgid "TOTP authenticator"
msgstr "TOTP authenticator"

View File

@ -4176,9 +4176,9 @@ msgstr "Jetons statiques"
msgid "Static authenticator"
msgstr ""
#:
#~ msgid "Static tokens"
#~ msgstr "Jetons statiques"
#: src/user/user-settings/mfa/MFADevicesPage.ts
msgid "Static tokens"
msgstr "Jetons statiques"
#: src/pages/stages/prompt/PromptForm.ts
msgid "Static: Static value, displayed as-is."
@ -4604,6 +4604,10 @@ msgstr "Certificat de vérification TLS"
msgid "TOTP Authenticators"
msgstr "Authentificateur TOTP"
#: src/user/user-settings/mfa/MFADevicesPage.ts
msgid "TOTP Device"
msgstr ""
#: src/user/user-settings/mfa/MFADevicesPage.ts
msgid "TOTP authenticator"
msgstr ""

View File

@ -4210,9 +4210,9 @@ msgstr ""
msgid "Static authenticator"
msgstr ""
#:
#~ msgid "Static tokens"
#~ msgstr ""
#: src/user/user-settings/mfa/MFADevicesPage.ts
msgid "Static tokens"
msgstr ""
#: src/pages/stages/prompt/PromptForm.ts
msgid "Static: Static value, displayed as-is."
@ -4644,6 +4644,10 @@ msgstr ""
msgid "TOTP Authenticators"
msgstr ""
#: src/user/user-settings/mfa/MFADevicesPage.ts
msgid "TOTP Device"
msgstr ""
#: src/user/user-settings/mfa/MFADevicesPage.ts
msgid "TOTP authenticator"
msgstr ""

View File

@ -138,10 +138,21 @@ export class MFADevicesPage extends Table<Device> {
</ak-forms-delete-bulk>`;
}
deviceTypeName(device: Device): string {
switch (device.type) {
case "otp_static.StaticDevice":
return t`Static tokens`;
case "otp_totp.TOTPDevice":
return t`TOTP Device`;
default:
return device.verboseName;
}
}
row(item: Device): TemplateResult[] {
return [
html`${item.name}`,
html`${item.verboseName}`,
html`${this.deviceTypeName(item)}`,
html`
<ak-forms-modal>
<span slot="submit">${t`Update`}</span>