web: fix rendering of token copy button in dark mode

closes #1528

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-10-05 11:08:14 +02:00
parent 05b587ae44
commit 19247accd9
5 changed files with 697 additions and 1169 deletions

View File

@ -978,9 +978,9 @@ msgstr "Cookie domain"
msgid "Copy" msgid "Copy"
msgstr "Copy" msgstr "Copy"
#: src/user/user-settings/tokens/UserTokenList.ts #:
msgid "Copy Key" #~ msgid "Copy Key"
msgstr "Copy Key" #~ msgstr "Copy Key"
#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts
msgid "Copy download URL" msgid "Copy download URL"
@ -4685,6 +4685,10 @@ msgstr "Token count"
msgid "Token expiry" msgid "Token expiry"
msgstr "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/oauth2/OAuth2ProviderForm.ts
#: src/pages/providers/proxy/ProxyProviderForm.ts #: src/pages/providers/proxy/ProxyProviderForm.ts
msgid "Token validity" msgid "Token validity"

File diff suppressed because it is too large Load Diff

View File

@ -972,9 +972,9 @@ msgstr ""
msgid "Copy" msgid "Copy"
msgstr "" msgstr ""
#: src/user/user-settings/tokens/UserTokenList.ts #:
msgid "Copy Key" #~ msgid "Copy Key"
msgstr "" #~ msgstr ""
#: src/pages/providers/saml/SAMLProviderViewPage.ts #: src/pages/providers/saml/SAMLProviderViewPage.ts
msgid "Copy download URL" msgid "Copy download URL"
@ -4670,6 +4670,10 @@ msgstr ""
msgid "Token expiry" msgid "Token expiry"
msgstr "" msgstr ""
#: src/pages/tokens/TokenListPage.ts
msgid "Token is managed by authentik."
msgstr ""
#: src/pages/providers/oauth2/OAuth2ProviderForm.ts #: src/pages/providers/oauth2/OAuth2ProviderForm.ts
#: src/pages/providers/proxy/ProxyProviderForm.ts #: src/pages/providers/proxy/ProxyProviderForm.ts
msgid "Token validity" msgid "Token validity"

View File

@ -105,7 +105,10 @@ export class TokenListPage extends TablePage<Token> {
row(item: Token): TemplateResult[] { row(item: Token): TemplateResult[] {
return [ return [
html`${item.identifier}`, html`<div>
<div>${item.identifier}</div>
${item.managed ? html`<small>${t`Token is managed by authentik.`}</small>` : html``}
</div>`,
html`<a href="#/identity/users/${item.userObj?.pk}">${item.userObj?.username}</a>`, html`<a href="#/identity/users/${item.userObj?.pk}">${item.userObj?.username}</a>`,
html`${item.expiring ? t`Yes` : t`No`}`, html`${item.expiring ? t`Yes` : t`No`}`,
html`${item.expiring ? item.expires?.toLocaleString() : t`-`}`, html`${item.expiring ? item.expires?.toLocaleString() : t`-`}`,
@ -123,7 +126,10 @@ export class TokenListPage extends TablePage<Token> {
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
</button> </button>
</ak-forms-modal> </ak-forms-modal>
<ak-token-copy-button identifier="${item.identifier}"> <ak-token-copy-button
class="pf-c-button pf-m-plain"
identifier="${item.identifier}"
>
<i class="fas fa-copy"></i> <i class="fas fa-copy"></i>
</ak-token-copy-button> </ak-token-copy-button>
`, `,

View File

@ -151,8 +151,11 @@ export class UserTokenList extends Table<Token> {
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
</button> </button>
</ak-forms-modal> </ak-forms-modal>
<ak-token-copy-button identifier="${item.identifier}"> <ak-token-copy-button
${t`Copy Key`} class="pf-c-button pf-m-plain"
identifier="${item.identifier}"
>
<i class="fas fa-copy"></i>
</ak-token-copy-button> </ak-token-copy-button>
`, `,
]; ];