web/admin: fix token edit button

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-02-06 21:13:43 +01:00
parent 61b06eff06
commit 0bbe74e2bf
No known key found for this signature in database
1 changed files with 10 additions and 12 deletions

View File

@ -118,18 +118,16 @@ export class TokenListPage extends TablePage<Token> {
html`${item.expiring ? item.expires?.toLocaleString() : t`-`}`, html`${item.expiring ? item.expires?.toLocaleString() : t`-`}`,
html`${IntentToLabel(item.intent || IntentEnum.Api)}`, html`${IntentToLabel(item.intent || IntentEnum.Api)}`,
html` html`
<ak-forms-modal> ${!item.managed
<span slot="submit"> ${t`Update`} </span> ? html`<ak-forms-modal>
<span slot="header"> ${t`Update Token`} </span> <span slot="submit"> ${t`Update`} </span>
<ak-token-form slot="form" .instancePk=${item.identifier}></ak-token-form> <span slot="header"> ${t`Update Token`} </span>
<button <ak-token-form slot="form" .instancePk=${item.identifier}></ak-token-form>
?disabled=${item.managed !== null} <button slot="trigger" class="pf-c-button pf-m-plain">
slot="trigger" <i class="fas fa-edit"></i>
class="pf-c-button pf-m-plain" </button>
> </ak-forms-modal>`
<i class="fas fa-edit"></i> : html``}
</button>
</ak-forms-modal>
<ak-token-copy-button <ak-token-copy-button
class="pf-c-button pf-m-plain" class="pf-c-button pf-m-plain"
identifier="${item.identifier}" identifier="${item.identifier}"