diff --git a/src/components/ha-fab.ts b/src/components/ha-fab.ts index a477cea80fd2..fed289b2da9e 100644 --- a/src/components/ha-fab.ts +++ b/src/components/ha-fab.ts @@ -20,7 +20,8 @@ export class HaFab extends FabBase { direction: var(--direction); } :disabled { - opacity: var(--light-disabled-opacity); + --mdc-theme-secondary: var(--disabled-text-color); + pointer-events: none; } `, // safari workaround - must be explicit diff --git a/src/panels/config/backup/ha-config-backup-backups.ts b/src/panels/config/backup/ha-config-backup-backups.ts index 04ee5413d0d5..62203b7e0114 100644 --- a/src/panels/config/backup/ha-config-backup-backups.ts +++ b/src/panels/config/backup/ha-config-backup-backups.ts @@ -7,9 +7,8 @@ import { mdiUpload, } from "@mdi/js"; import type { CSSResultGroup, TemplateResult } from "lit"; -import { css, html, LitElement, nothing } from "lit"; +import { html, LitElement, nothing } from "lit"; import { customElement, property, query, state } from "lit/decorators"; -import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; import { relativeTime } from "../../../common/datetime/relative_time"; import { storage } from "../../../common/decorators/storage"; @@ -346,39 +345,27 @@ class HaConfigBackupBackups extends SubscribeMixin(LitElement) { - ${this._selected.length - ? html`
-

- ${this._selected.length} backups selected -

-
- ${!this.narrow - ? html` - - Delete selected - - ` - : html` - - - Delete selected - - `} -
-
` - : nothing} +
+ ${!this.narrow + ? html` + + Delete selected + + ` + : html` + + + Delete selected + + `} +
+ id !== backup.backup_id); + } fireEvent(this, "ha-refresh-backup-info"); } @@ -533,69 +523,7 @@ class HaConfigBackupBackups extends SubscribeMixin(LitElement) { } static get styles(): CSSResultGroup { - return [ - haStyle, - css` - .header { - padding: 16px 16px 0 16px; - display: flex; - flex-direction: row; - gap: 16px; - background-color: var(--primary-background-color); - } - @media (max-width: 1000px) { - .header { - flex-direction: column; - } - } - .header > * { - flex: 1; - min-width: 0; - } - - ha-fab[disabled] { - --mdc-theme-secondary: var(--disabled-text-color) !important; - } - - .table-header { - display: flex; - justify-content: space-between; - align-items: center; - height: var(--header-height); - box-sizing: border-box; - } - .header-toolbar { - display: flex; - justify-content: space-between; - align-items: center; - color: var(--secondary-text-color); - position: relative; - top: -4px; - } - .selected-txt { - font-weight: bold; - padding-left: 16px; - padding-inline-start: 16px; - padding-inline-end: initial; - color: var(--primary-text-color); - } - .table-header .selected-txt { - margin-top: 20px; - } - .header-toolbar .selected-txt { - font-size: 16px; - } - .header-toolbar .header-btns { - margin-right: -12px; - margin-inline-end: -12px; - margin-inline-start: initial; - } - .header-btns > ha-button, - .header-btns > ha-icon-button { - margin: 8px; - } - `, - ]; + return haStyle; } } diff --git a/src/panels/config/backup/ha-config-backup-details.ts b/src/panels/config/backup/ha-config-backup-details.ts index 5e0e3db81484..002f6a0e7e22 100644 --- a/src/panels/config/backup/ha-config-backup-details.ts +++ b/src/panels/config/backup/ha-config-backup-details.ts @@ -338,6 +338,7 @@ class HaConfigBackupDetails extends LitElement { margin: 0 auto; gap: 24px; display: grid; + margin-bottom: 24px; } .card-content { padding: 0 20px 8px 20px; diff --git a/src/panels/config/backup/ha-config-backup-overview.ts b/src/panels/config/backup/ha-config-backup-overview.ts index 45cdf544853f..b7621ab9f7f1 100644 --- a/src/panels/config/backup/ha-config-backup-overview.ts +++ b/src/panels/config/backup/ha-config-backup-overview.ts @@ -258,10 +258,6 @@ class HaConfigBackupOverview extends LitElement { padding-left: 0; padding-right: 0; } - ha-fab[disabled] { - --mdc-theme-secondary: var(--disabled-text-color) !important; - pointer-events: none; - } `, ]; }