web: use ak-label for boolean values

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-11-28 21:12:53 +01:00
parent 235d283def
commit 109283b189
15 changed files with 62 additions and 34 deletions

View File

@ -44,7 +44,7 @@ export class Label extends LitElement {
<span class="pf-c-label__content">
<span class="pf-c-label__icon">
<i
class="fas fa-fw${this.icon || this.getDefaultIcon()}"
class="fas fa-fw ${this.icon || this.getDefaultIcon()}"
aria-hidden="true"
></i>
</span>

View File

@ -10,6 +10,7 @@ import { ExpiringBaseGrantModel, Oauth2Api, RefreshTokenModel } from "@goauthent
import { AKResponse } from "../../api/Client";
import { DEFAULT_CONFIG } from "../../api/Config";
import { uiConfig } from "../../common/config";
import { PFColor } from "../Label";
import "../forms/DeleteBulkForm";
import { Table, TableColumn } from "../table/Table";
@ -85,7 +86,9 @@ export class UserOAuthRefreshList extends Table<RefreshTokenModel> {
row(item: RefreshTokenModel): TemplateResult[] {
return [
html`<a href="#/core/providers/${item.provider?.pk}"> ${item.provider?.name} </a>`,
html`${item.revoked ? t`Yes` : t`No`}`,
html`<ak-label color=${item.revoked ? PFColor.Orange : PFColor.Green}>
${item.revoked ? t`Yes` : t`No`}
</ak-label>`,
html`${item.expires?.toLocaleString()}`,
html`${item.scope.join(", ")}`,
];