From a69fcbca9aca9ab046e1e33e6980c0010bd978f8 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 5 Oct 2021 11:08:14 +0200 Subject: [PATCH] web: fix rendering of token copy button in dark mode closes #1528 Signed-off-by: Jens Langhammer # Conflicts: # web/src/locales/fr_FR.po --- web/src/locales/en.po | 10 +++++++--- web/src/locales/pseudo-LOCALE.po | 10 +++++++--- web/src/pages/tokens/TokenListPage.ts | 10 ++++++++-- web/src/user/user-settings/tokens/UserTokenList.ts | 7 +++++-- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/web/src/locales/en.po b/web/src/locales/en.po index 483387081..d5eebc79d 100644 --- a/web/src/locales/en.po +++ b/web/src/locales/en.po @@ -978,9 +978,9 @@ msgstr "Cookie domain" msgid "Copy" msgstr "Copy" -#: src/user/user-settings/tokens/UserTokenList.ts -msgid "Copy Key" -msgstr "Copy Key" +#: +#~ msgid "Copy Key" +#~ msgstr "Copy Key" #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Copy download URL" @@ -4630,6 +4630,10 @@ msgstr "Token count" msgid "Token expiry" msgstr "Token expiry" +#: src/pages/tokens/TokenListPage.ts +msgid "Token is managed by authentik." +msgstr "Token is managed by authentik." + #: src/pages/providers/oauth2/OAuth2ProviderForm.ts #: src/pages/providers/proxy/ProxyProviderForm.ts msgid "Token validity" diff --git a/web/src/locales/pseudo-LOCALE.po b/web/src/locales/pseudo-LOCALE.po index de14a6654..6abcd2de5 100644 --- a/web/src/locales/pseudo-LOCALE.po +++ b/web/src/locales/pseudo-LOCALE.po @@ -972,9 +972,9 @@ msgstr "" msgid "Copy" msgstr "" -#: src/user/user-settings/tokens/UserTokenList.ts -msgid "Copy Key" -msgstr "" +#: +#~ msgid "Copy Key" +#~ msgstr "" #: src/pages/providers/saml/SAMLProviderViewPage.ts msgid "Copy download URL" @@ -4615,6 +4615,10 @@ msgstr "" msgid "Token expiry" msgstr "" +#: src/pages/tokens/TokenListPage.ts +msgid "Token is managed by authentik." +msgstr "" + #: src/pages/providers/oauth2/OAuth2ProviderForm.ts #: src/pages/providers/proxy/ProxyProviderForm.ts msgid "Token validity" diff --git a/web/src/pages/tokens/TokenListPage.ts b/web/src/pages/tokens/TokenListPage.ts index c585b27a7..8a658f93d 100644 --- a/web/src/pages/tokens/TokenListPage.ts +++ b/web/src/pages/tokens/TokenListPage.ts @@ -105,7 +105,10 @@ export class TokenListPage extends TablePage { row(item: Token): TemplateResult[] { return [ - html`${item.identifier}`, + html`
+
${item.identifier}
+ ${item.managed ? html`${t`Token is managed by authentik.`}` : html``} +
`, html`${item.userObj?.username}`, html`${item.expiring ? t`Yes` : t`No`}`, html`${item.expiring ? item.expires?.toLocaleString() : t`-`}`, @@ -123,7 +126,10 @@ export class TokenListPage extends TablePage { - + `, diff --git a/web/src/user/user-settings/tokens/UserTokenList.ts b/web/src/user/user-settings/tokens/UserTokenList.ts index 6571ed7ed..69274be45 100644 --- a/web/src/user/user-settings/tokens/UserTokenList.ts +++ b/web/src/user/user-settings/tokens/UserTokenList.ts @@ -151,8 +151,11 @@ export class UserTokenList extends Table { - - ${t`Copy Key`} + + `, ];