web/elements: use <slot> in ak-label instead of attribute
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -10,6 +10,7 @@ import { CertificateKeyPair, CryptoApi } from "@goauthentik/api";
|
||||
import { AKResponse } from "../../api/Client";
|
||||
import { DEFAULT_CONFIG } from "../../api/Config";
|
||||
import { uiConfig } from "../../common/config";
|
||||
import { PFColor } from "../../elements/Label";
|
||||
import "../../elements/buttons/SpinnerButton";
|
||||
import "../../elements/forms/DeleteBulkForm";
|
||||
import "../../elements/forms/ModalForm";
|
||||
@ -92,9 +93,13 @@ export class CertificateKeyPairListPage extends TablePage<CertificateKeyPair> {
|
||||
row(item: CertificateKeyPair): TemplateResult[] {
|
||||
return [
|
||||
html`${item.name}`,
|
||||
html`${item.privateKeyAvailable ? t`Yes` : t`No`}`,
|
||||
html`${item.certExpiry?.toLocaleString()}`,
|
||||
html` <ak-forms-modal>
|
||||
html` <ak-label color=${item.privateKeyAvailable ? PFColor.Green : PFColor.Grey}>
|
||||
${item.privateKeyAvailable ? t`Yes` : t`No`}
|
||||
</ak-label>`,
|
||||
html` <ak-label color=${item.certExpiry > new Date() ? PFColor.Green : PFColor.Orange}>
|
||||
${item.certExpiry?.toLocaleString()}
|
||||
</ak-label>`,
|
||||
html`<ak-forms-modal>
|
||||
<span slot="submit"> ${t`Update`} </span>
|
||||
<span slot="header"> ${t`Update Certificate-Key Pair`} </span>
|
||||
<ak-crypto-certificate-form slot="form" .instancePk=${item.pk}>
|
||||
|
||||
Reference in New Issue
Block a user