Skip to content

Commit

Permalink
Update icons for backups (#23351)
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya authored Dec 20, 2024
1 parent 65860a3 commit 49d9c7f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mdiDatabase } from "@mdi/js";
import { mdiHarddisk } from "@mdi/js";
import type { PropertyValues } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
Expand Down Expand Up @@ -64,7 +64,7 @@ class HaBackupConfigAgents extends LitElement {
<ha-md-list-item>
${isLocalAgent(agentId)
? html`
<ha-svg-icon .path=${mdiDatabase} slot="start">
<ha-svg-icon .path=${mdiHarddisk} slot="start">
</ha-svg-icon>
`
: html`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mdiDatabase } from "@mdi/js";
import { mdiHarddisk } from "@mdi/js";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import memoizeOne from "memoize-one";
Expand Down Expand Up @@ -61,7 +61,7 @@ class HaBackupAgentsPicker extends LitElement {
<span class="label" slot="label">
${isLocalAgent(agentId)
? html`
<ha-svg-icon .path=${mdiDatabase} slot="start"> </ha-svg-icon>
<ha-svg-icon .path=${mdiHarddisk} slot="start"> </ha-svg-icon>
`
: html`
<img
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mdiCalendar, mdiCog, mdiPuzzle, mdiUpload } from "@mdi/js";
import { mdiCalendar, mdiDatabase, mdiPuzzle, mdiUpload } from "@mdi/js";
import type { CSSResultGroup } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property } from "lit/decorators";
Expand Down Expand Up @@ -113,7 +113,7 @@ class HaBackupBackupsSummary extends LitElement {
</div>
</ha-md-list-item>
<ha-md-list-item>
<ha-svg-icon slot="start" .path=${mdiCog}></ha-svg-icon>
<ha-svg-icon slot="start" .path=${mdiDatabase}></ha-svg-icon>
<div slot="headline">
${this.config.create_backup.include_database
? "Settings and history"
Expand Down
4 changes: 2 additions & 2 deletions src/panels/config/backup/ha-config-backup-backups.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
mdiDatabase,
mdiDelete,
mdiDotsVertical,
mdiDownload,
mdiHarddisk,
mdiPlus,
mdiUpload,
} from "@mdi/js";
Expand Down Expand Up @@ -147,7 +147,7 @@ class HaConfigBackupBackups extends SubscribeMixin(LitElement) {
if (isLocalAgent(agentId)) {
return html`
<ha-svg-icon
.path=${mdiDatabase}
.path=${mdiHarddisk}
title=${name}
slot="graphic"
></ha-svg-icon>
Expand Down
4 changes: 2 additions & 2 deletions src/panels/config/backup/ha-config-backup-details.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ActionDetail } from "@material/mwc-list";
import { mdiDatabase, mdiDelete, mdiDotsVertical, mdiDownload } from "@mdi/js";
import { mdiDelete, mdiDotsVertical, mdiDownload, mdiHarddisk } from "@mdi/js";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { formatDateTime } from "../../../common/datetime/format_date_time";
Expand Down Expand Up @@ -177,7 +177,7 @@ class HaConfigBackupDetails extends LitElement {
${isLocalAgent(agentId)
? html`
<ha-svg-icon
.path=${mdiDatabase}
.path=${mdiHarddisk}
slot="start"
>
</ha-svg-icon>
Expand Down
10 changes: 5 additions & 5 deletions src/state/connection-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
notifyOnError = true,
returnResponse = false
) => {
if (__DEV__ || this.hass?.debugConnection) {
if (this.hass?.debugConnection) {
// eslint-disable-next-line no-console
console.log(
"Calling service",
Expand All @@ -115,7 +115,7 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
) {
return { context: { id: "" } };
}
if (__DEV__ || this.hass?.debugConnection) {
if (this.hass?.debugConnection) {
// eslint-disable-next-line no-console
console.error(
"Error calling service",
Expand Down Expand Up @@ -167,22 +167,22 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
) => fetchWithAuth(auth, `${auth.data.hassUrl}${path}`, init),
// For messages that do not get a response
sendWS: (msg) => {
if (__DEV__ || this.hass?.debugConnection) {
if (this.hass?.debugConnection) {
// eslint-disable-next-line no-console
console.log("Sending", msg);
}
conn.sendMessage(msg);
},
// For messages that expect a response
callWS: <R>(msg) => {
if (__DEV__ || this.hass?.debugConnection) {
if (this.hass?.debugConnection) {
// eslint-disable-next-line no-console
console.log("Sending", msg);
}

const resp = conn.sendMessagePromise<R>(msg);

if (__DEV__ || this.hass?.debugConnection) {
if (this.hass?.debugConnection) {
resp.then(
// eslint-disable-next-line no-console
(result) => console.log("Received", result),
Expand Down

0 comments on commit 49d9c7f

Please sign in to comment.