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", "embeddedLanguageFormatting": "auto",
"htmlWhitespaceSensitivity": "css", "htmlWhitespaceSensitivity": "css",
"insertPragma": false, "insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false, "jsxSingleQuote": false,
"printWidth": 100, "printWidth": 100,
"proseWrap": "preserve", "proseWrap": "preserve",

View File

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