web/admin: make token list more consistent

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-09-14 09:57:36 +02:00
parent 3a700a449a
commit 56d40bddd0
2 changed files with 12 additions and 11 deletions

View File

@ -4,7 +4,6 @@
"embeddedLanguageFormatting": "auto",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 100,
"proseWrap": "preserve",

View File

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