mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-10 02:46:38 +00:00
Fix prettier that keeps messing with merging dev (#7412)
This commit is contained in:
parent
7e2dc04123
commit
fb9bd0eb7d
@ -21,11 +21,11 @@ import { fetchHassioStats, HassioStats } from "../../../src/data/hassio/common";
|
||||
import { HassioHostInfo } from "../../../src/data/hassio/host";
|
||||
import { haStyle } from "../../../src/resources/styles";
|
||||
import { HomeAssistant } from "../../../src/types";
|
||||
import { bytesToString } from "../../../src/util/bytes-to-string";
|
||||
import {
|
||||
getValueInPercentage,
|
||||
roundWithOneDecimal,
|
||||
} from "../../../src/util/calculate";
|
||||
import { bytesToString } from "../../../src/util/bytes-to-string";
|
||||
import { hassioStyle } from "../resources/hassio-style";
|
||||
|
||||
@customElement("hassio-system-metrics")
|
||||
@ -65,9 +65,7 @@ class HassioSystemMetrics extends LitElement {
|
||||
{
|
||||
description: "Used Space",
|
||||
value: this._getUsedSpace(this.hostInfo),
|
||||
tooltip: `${
|
||||
this.hostInfo.disk_used
|
||||
} GB/${this.hostInfo.disk_total} GB`,
|
||||
tooltip: `${this.hostInfo.disk_used} GB/${this.hostInfo.disk_total} GB`,
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -278,7 +278,7 @@ class HaChartBase extends mixinBehaviors(
|
||||
this.set(["tooltip", "title"], title);
|
||||
|
||||
if (tooltip.beforeBody) {
|
||||
this.set(["tooltip", "beforeBody"], tooltip.beforeBody.join("\n"));
|
||||
this.set(["tooltip", "beforeBody"], tooltip.beforeBody.join("\n"));
|
||||
}
|
||||
|
||||
const bodyLines = tooltip.body.map((n) => n.lines);
|
||||
|
@ -6,9 +6,9 @@ import {
|
||||
CSSResult,
|
||||
customElement,
|
||||
html,
|
||||
internalProperty,
|
||||
LitElement,
|
||||
property,
|
||||
internalProperty,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import { fireEvent } from "../common/dom/fire_event";
|
||||
@ -98,8 +98,7 @@ class HaMenuButton extends LitElement {
|
||||
return;
|
||||
}
|
||||
|
||||
this.style.display =
|
||||
newNarrow || this._alwaysVisible ? "initial" : "none";
|
||||
this.style.display = newNarrow || this._alwaysVisible ? "initial" : "none";
|
||||
|
||||
if (!newNarrow) {
|
||||
this._hasNotifications = false;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import "@material/mwc-fab";
|
||||
import { mdiPlus } from "@mdi/js";
|
||||
import "@polymer/paper-item/paper-icon-item";
|
||||
import "@polymer/paper-item/paper-item-body";
|
||||
import "@material/mwc-fab";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
@ -24,8 +24,8 @@ import {
|
||||
} from "../../../data/person";
|
||||
import { fetchUsers, User } from "../../../data/user";
|
||||
import {
|
||||
showConfirmationDialog,
|
||||
showAlertDialog,
|
||||
showConfirmationDialog,
|
||||
} from "../../../dialogs/generic/show-dialog-box";
|
||||
import "../../../layouts/hass-loading-screen";
|
||||
import "../../../layouts/hass-tabs-subpage";
|
||||
@ -87,22 +87,16 @@ class HaConfigPerson extends LitElement {
|
||||
</p>
|
||||
`
|
||||
: ""}
|
||||
|
||||
|
||||
<a
|
||||
href=${documentationUrl(
|
||||
this.hass,
|
||||
"/integrations/person/"
|
||||
)}
|
||||
href=${documentationUrl(this.hass, "/integrations/person/")}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.person.learn_more"
|
||||
)}
|
||||
${this.hass.localize("ui.panel.config.person.learn_more")}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
|
||||
<ha-card class="storage">
|
||||
${this._storageItems.map((entry) => {
|
||||
return html`
|
||||
|
@ -1,6 +1,12 @@
|
||||
import "@material/mwc-fab";
|
||||
import "@material/mwc-icon-button";
|
||||
import { mdiCog, mdiContentDuplicate, mdiPlus, mdiRobot, mdiHelpCircle } from "@mdi/js";
|
||||
import {
|
||||
mdiCog,
|
||||
mdiContentDuplicate,
|
||||
mdiHelpCircle,
|
||||
mdiPlus,
|
||||
mdiRobot,
|
||||
} from "@mdi/js";
|
||||
import {
|
||||
customElement,
|
||||
html,
|
||||
@ -24,15 +30,18 @@ import {
|
||||
updateTag,
|
||||
UpdateTagParams,
|
||||
} from "../../../data/tag";
|
||||
import { showConfirmationDialog, showAlertDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||
import {
|
||||
showAlertDialog,
|
||||
showConfirmationDialog,
|
||||
} from "../../../dialogs/generic/show-dialog-box";
|
||||
import { getExternalConfig } from "../../../external_app/external_config";
|
||||
import "../../../layouts/hass-tabs-subpage-data-table";
|
||||
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
||||
import { HomeAssistant, Route } from "../../../types";
|
||||
import { documentationUrl } from "../../../util/documentation-url";
|
||||
import { configSections } from "../ha-panel-config";
|
||||
import { showTagDetailDialog } from "./show-dialog-tag-detail";
|
||||
import "./tag-image";
|
||||
import { documentationUrl } from "../../../util/documentation-url";
|
||||
|
||||
export interface TagRowData extends Tag {
|
||||
last_scanned_datetime: Date | null;
|
||||
@ -214,18 +223,18 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
|
||||
title: this.hass.localize("ui.panel.config.tags.caption"),
|
||||
text: html`
|
||||
<p>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.tags.detail.usage",
|
||||
"companion_link",
|
||||
html`<a
|
||||
href="https://companion.home-assistant.io/"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>${this.hass!.localize(
|
||||
"ui.panel.config.tags.detail.companion_apps"
|
||||
)}</a
|
||||
>`
|
||||
)}
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.tags.detail.usage",
|
||||
"companion_link",
|
||||
html`<a
|
||||
href="https://companion.home-assistant.io/"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>${this.hass!.localize(
|
||||
"ui.panel.config.tags.detail.companion_apps"
|
||||
)}</a
|
||||
>`
|
||||
)}
|
||||
</p>
|
||||
<p>
|
||||
<a
|
||||
|
@ -29,12 +29,12 @@ const compareTokenLastUsedAt = (tokenA: RefreshToken, tokenB: RefreshToken) => {
|
||||
const timeB = tokenB.last_used_at ? new Date(tokenB.last_used_at) : 0;
|
||||
if (timeA < timeB) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (timeA > timeB) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
@customElement("ha-refresh-tokens-card")
|
||||
class HaRefreshTokens extends LitElement {
|
||||
@ -44,7 +44,9 @@ class HaRefreshTokens extends LitElement {
|
||||
|
||||
private _refreshTokens = memoizeOne(
|
||||
(refreshTokens: RefreshToken[]): RefreshToken[] =>
|
||||
refreshTokens?.filter((token) => token.type === "normal").sort(compareTokenLastUsedAt)
|
||||
refreshTokens
|
||||
?.filter((token) => token.type === "normal")
|
||||
.sort(compareTokenLastUsedAt)
|
||||
);
|
||||
|
||||
protected render(): TemplateResult {
|
||||
|
Loading…
x
Reference in New Issue
Block a user