web: implement initial DeleteForm
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -15,7 +15,7 @@ export class ActionButton extends SpinnerButton {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
apiRequest: () => Promise<any> = () => { throw new Error(); };
|
||||
|
||||
callAction(): void {
|
||||
defaultCallAction(): void {
|
||||
if (this.isRunning === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -158,6 +158,10 @@ export class ModalButton extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
renderModalInner(): TemplateResult {
|
||||
return html`${unsafeHTML(this.modal)}`;
|
||||
}
|
||||
|
||||
renderModal(): TemplateResult {
|
||||
return html`<div class="pf-c-backdrop">
|
||||
<div class="pf-l-bullseye">
|
||||
@ -176,7 +180,7 @@ export class ModalButton extends LitElement {
|
||||
>
|
||||
<i class="fas fa-times" aria-hidden="true"></i>
|
||||
</button>
|
||||
${unsafeHTML(this.modal)}
|
||||
${this.renderModalInner()}
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
@ -13,6 +13,9 @@ export class SpinnerButton extends LitElement {
|
||||
@property()
|
||||
form?: string;
|
||||
|
||||
@property()
|
||||
callAction: () => void = this.defaultCallAction;
|
||||
|
||||
static get styles(): CSSResult[] {
|
||||
return [
|
||||
PFBase,
|
||||
@ -49,7 +52,7 @@ export class SpinnerButton extends LitElement {
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
callAction(): void {
|
||||
defaultCallAction(): void {
|
||||
if (this.isRunning === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user