admin: add use spinner button for admin lists
This commit is contained in:
		@ -16,6 +16,9 @@ export class SpinnerButton extends LitElement {
 | 
			
		||||
    @property()
 | 
			
		||||
    isRunning = false;
 | 
			
		||||
 | 
			
		||||
    @property()
 | 
			
		||||
    form?: string;
 | 
			
		||||
 | 
			
		||||
    static get styles() {
 | 
			
		||||
        return [
 | 
			
		||||
            GlobalsStyle,
 | 
			
		||||
@ -57,6 +60,11 @@ export class SpinnerButton extends LitElement {
 | 
			
		||||
        if (this.isRunning === true) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        if (this.form) {
 | 
			
		||||
            // Because safari we can't just extend HTMLButtonElement, hence I have to implement
 | 
			
		||||
            // these attributes by myself here, sigh...
 | 
			
		||||
            document.querySelector<HTMLFormElement>(`#${this.form}`)?.submit();
 | 
			
		||||
        }
 | 
			
		||||
        this.setLoading();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user