diff --git a/src/panels/config/apps/app-view/info/supervisor-app-info.ts b/src/panels/config/apps/app-view/info/supervisor-app-info.ts index 036af25b20..062d7175c1 100644 --- a/src/panels/config/apps/app-view/info/supervisor-app-info.ts +++ b/src/panels/config/apps/app-view/info/supervisor-app-info.ts @@ -3,6 +3,7 @@ import { mdiChip, mdiCircleOffOutline, mdiCursorDefaultClickOutline, + mdiDelete, mdiDocker, mdiDotsVertical, mdiExclamationThick, @@ -231,69 +232,74 @@ class SupervisorAppInfo extends LitElement { .path=${mdiCircleOffOutline} > `} - ${this._computeIsRunning || this.addon.build - ? html` - - + + ${this._computeIsRunning + ? html` + + + ${this.hass.localize( + "ui.panel.config.apps.dashboard.stop" )} - > - ${this._computeIsRunning - ? html` - - - ${this.hass.localize( - "ui.panel.config.apps.dashboard.stop" - )} - - - - ${this.hass.localize( - "ui.panel.config.apps.dashboard.restart" - )} - - ` - : nothing} - ${this.addon.build - ? html` - - - ${this.hass.localize( - "ui.panel.config.apps.dashboard.rebuild" - )} - - ` - : nothing} - - ` - : nothing} + + + + ${this.hass.localize( + "ui.panel.config.apps.dashboard.restart" + )} + + ` + : nothing} + ${this.addon.build + ? html` + + + ${this.hass.localize( + "ui.panel.config.apps.dashboard.rebuild" + )} + + ` + : nothing} + + + ${this.hass.localize( + "ui.panel.config.apps.dashboard.uninstall" + )} + + ` : html` ${this.addon.version_latest} `} @@ -725,22 +731,7 @@ class SupervisorAppInfo extends LitElement { : nothing}
-
- ${this.addon.version - ? html` - - ${this.hass.localize( - "ui.panel.config.apps.dashboard.uninstall" - )} - - ` - : nothing} -
+
${this.addon.version ? this._computeIsRunning @@ -1230,13 +1221,11 @@ class SupervisorAppInfo extends LitElement { navigate(`/config/app/${this.addon.slug}/config`); } - private async _uninstallClicked(ev: CustomEvent): Promise { + private async _uninstallClicked(): Promise { if (this._isSystemManaged(this.addon) && !this.controlEnabled) { return; } - const button = ev.currentTarget as any; - button.progress = true; let removeData = false; const _removeDataToggled = (e: Event) => { removeData = (e.target as HaSwitch).checked; @@ -1272,7 +1261,6 @@ class SupervisorAppInfo extends LitElement { }); if (!confirmed) { - button.progress = false; return; } @@ -1285,7 +1273,6 @@ class SupervisorAppInfo extends LitElement { path: "uninstall", }; fireEvent(this, "hass-api-called", eventdata); - button.actionSuccess(); } catch (err: any) { showAlertDialog(this, { title: this.hass.localize( @@ -1293,9 +1280,7 @@ class SupervisorAppInfo extends LitElement { ), text: extractApiErrorMessage(err), }); - button.actionError(); } - button.progress = false; } private _isSystemManaged = memoizeOne(