Remove some debugging info, fix a misspelling.

This commit is contained in:
Ken Sternberg 2024-01-12 13:55:14 -08:00
parent 9dfb0424a4
commit b7c82ed126
2 changed files with 4 additions and 4 deletions

View File

@ -9,14 +9,14 @@ import { customElement, property } from "lit/decorators.js";
@customElement("ak-license-notice") @customElement("ak-license-notice")
export class AkLicenceNotice extends WithLicenseSummary(AKElement) { export class AkLicenceNotice extends WithLicenseSummary(AKElement) {
@property() @property()
message = msg("This feature requires an enterprise license."); notice = msg("This feature requires an enterprise license.");
render() { render() {
return this.hasEnterpriseLicense return this.hasEnterpriseLicense
? nothing ? nothing
: html` : html`
<ak-alert class="pf-c-radio__description" inline> <ak-alert class="pf-c-radio__description" inline>
${this.message} ${this.notice}
<a href="#/enterprise/licenses">${msg("Learn more")}</a> <a href="#/enterprise/licenses">${msg("Learn more")}</a>
</ak-alert> </ak-alert>
`; `;

View File

@ -10,14 +10,14 @@ type Constructor<T = object> = abstract new (...args: any[]) => T;
export function WithLicenseSummary<T extends Constructor<LitElement>>( export function WithLicenseSummary<T extends Constructor<LitElement>>(
superclass: T, superclass: T,
subscribe = true subscribe = true,
) { ) {
abstract class WithEnterpriseProvider extends superclass { abstract class WithEnterpriseProvider extends superclass {
@consume({ context: authentikEnterpriseContext, subscribe }) @consume({ context: authentikEnterpriseContext, subscribe })
public licenseSummary!: LicenseSummary; public licenseSummary!: LicenseSummary;
get hasEnterpriseLicense() { get hasEnterpriseLicense() {
return false; return this.licenseSummary?.hasLicense;
} }
} }