mirror of
https://github.com/home-assistant/frontend.git
synced 2025-09-30 15:29:43 +00:00
Compare commits
9 Commits
remove-tec
...
20250925.0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
431e533929 | ||
![]() |
02c845cbc6 | ||
![]() |
628111ed20 | ||
![]() |
e825a9c02f | ||
![]() |
7a35bddf36 | ||
![]() |
ad69270af8 | ||
![]() |
404edf9483 | ||
![]() |
a166b4e9b6 | ||
![]() |
7a285f11db |
4
.github/workflows/cast_deployment.yaml
vendored
4
.github/workflows/cast_deployment.yaml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
- name: Deploy to Netlify
|
||||
id: deploy
|
||||
run: |
|
||||
npx -y netlify-cli@23.7.3 deploy --dir=cast/dist --alias dev
|
||||
npx -y netlify-cli deploy --dir=cast/dist --alias dev
|
||||
env:
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_CAST_SITE_ID }}
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
- name: Deploy to Netlify
|
||||
id: deploy
|
||||
run: |
|
||||
npx -y netlify-cli@23.7.3 deploy --dir=cast/dist --prod
|
||||
npx -y netlify-cli deploy --dir=cast/dist --prod
|
||||
env:
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_CAST_SITE_ID }}
|
||||
|
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@@ -37,7 +37,7 @@ jobs:
|
||||
- name: Build resources
|
||||
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
|
||||
- name: Setup lint cache
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: |
|
||||
node_modules/.cache/prettier
|
||||
|
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -36,14 +36,14 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
|
||||
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
|
||||
uses: github/codeql-action/autobuild@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -57,4 +57,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
|
||||
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
|
||||
|
4
.github/workflows/demo_deployment.yaml
vendored
4
.github/workflows/demo_deployment.yaml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
- name: Deploy to Netlify
|
||||
id: deploy
|
||||
run: |
|
||||
npx -y netlify-cli@23.7.3 deploy --dir=demo/dist --prod
|
||||
npx -y netlify-cli deploy --dir=demo/dist --prod
|
||||
env:
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DEMO_DEV_SITE_ID }}
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
- name: Deploy to Netlify
|
||||
id: deploy
|
||||
run: |
|
||||
npx -y netlify-cli@23.7.3 deploy --dir=demo/dist --prod
|
||||
npx -y netlify-cli deploy --dir=demo/dist --prod
|
||||
env:
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DEMO_SITE_ID }}
|
||||
|
2
.github/workflows/design_deployment.yaml
vendored
2
.github/workflows/design_deployment.yaml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
- name: Deploy to Netlify
|
||||
id: deploy
|
||||
run: |
|
||||
npx -y netlify-cli@23.7.3 deploy --dir=gallery/dist --prod
|
||||
npx -y netlify-cli deploy --dir=gallery/dist --prod
|
||||
env:
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_GALLERY_SITE_ID }}
|
||||
|
2
.github/workflows/design_preview.yaml
vendored
2
.github/workflows/design_preview.yaml
vendored
@@ -40,7 +40,7 @@ jobs:
|
||||
- name: Deploy preview to Netlify
|
||||
id: deploy
|
||||
run: |
|
||||
npx -y netlify-cli@23.7.3 deploy --dir=gallery/dist --alias "deploy-preview-${{ github.event.number }}" \
|
||||
npx -y netlify-cli deploy --dir=gallery/dist --alias "deploy-preview-${{ github.event.number }}" \
|
||||
--json > deploy_output.json
|
||||
env:
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
|
File diff suppressed because one or more lines are too long
@@ -6,4 +6,4 @@ enableGlobalCache: false
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.10.3.cjs
|
||||
yarnPath: .yarn/releases/yarn-4.10.2.cjs
|
||||
|
@@ -5,17 +5,17 @@ const castContext = framework.CastReceiverContext.getInstance();
|
||||
const playerManager = castContext.getPlayerManager();
|
||||
|
||||
playerManager.setMessageInterceptor(
|
||||
framework.messages.MessageType.LOAD,
|
||||
"LOAD" as framework.messages.MessageType.LOAD,
|
||||
(loadRequestData) => {
|
||||
const media = loadRequestData.media;
|
||||
// Special handling if it came from Google Assistant
|
||||
if (media.entity) {
|
||||
media.contentId = media.entity;
|
||||
media.streamType = framework.messages.StreamType.LIVE;
|
||||
media.streamType = "LIVE" as framework.messages.StreamType.LIVE;
|
||||
media.contentType = "application/vnd.apple.mpegurl";
|
||||
// @ts-ignore
|
||||
media.hlsVideoSegmentFormat =
|
||||
framework.messages.HlsVideoSegmentFormat.FMP4;
|
||||
"fmp4" as framework.messages.HlsVideoSegmentFormat.FMP4;
|
||||
}
|
||||
return loadRequestData;
|
||||
}
|
||||
|
@@ -40,7 +40,8 @@ const playDummyMedia = (viewTitle?: string) => {
|
||||
loadRequestData.media.contentId =
|
||||
"https://cast.home-assistant.io/images/google-nest-hub.png";
|
||||
loadRequestData.media.contentType = "image/jpeg";
|
||||
loadRequestData.media.streamType = framework.messages.StreamType.NONE;
|
||||
loadRequestData.media.streamType =
|
||||
"NONE" as framework.messages.StreamType.NONE;
|
||||
const metadata = new framework.messages.GenericMediaMetadata();
|
||||
metadata.title = viewTitle;
|
||||
loadRequestData.media.metadata = metadata;
|
||||
@@ -89,7 +90,7 @@ const showMediaPlayer = () => {
|
||||
const options = new framework.CastReceiverOptions();
|
||||
options.disableIdleTimeout = true;
|
||||
options.customNamespaces = {
|
||||
[CAST_NS]: framework.system.MessageType.JSON,
|
||||
[CAST_NS]: "json" as framework.system.MessageType.JSON,
|
||||
};
|
||||
|
||||
castContext.addCustomMessageListener(
|
||||
@@ -97,9 +98,7 @@ castContext.addCustomMessageListener(
|
||||
// @ts-ignore
|
||||
(ev: ReceivedMessage<HassMessage>) => {
|
||||
// We received a show Lovelace command, stop media from playing, hide media player and show Lovelace controller
|
||||
if (
|
||||
playerManager.getPlayerState() !== framework.messages.PlayerState.IDLE
|
||||
) {
|
||||
if (playerManager.getPlayerState() !== "IDLE") {
|
||||
playerManager.stop();
|
||||
} else {
|
||||
showLovelaceController();
|
||||
@@ -113,7 +112,7 @@ castContext.addCustomMessageListener(
|
||||
const playerManager = castContext.getPlayerManager();
|
||||
|
||||
playerManager.setMessageInterceptor(
|
||||
framework.messages.MessageType.LOAD,
|
||||
"LOAD" as framework.messages.MessageType.LOAD,
|
||||
(loadRequestData) => {
|
||||
if (
|
||||
loadRequestData.media.contentId ===
|
||||
@@ -127,24 +126,23 @@ playerManager.setMessageInterceptor(
|
||||
// Special handling if it came from Google Assistant
|
||||
if (media.entity) {
|
||||
media.contentId = media.entity;
|
||||
media.streamType = framework.messages.StreamType.LIVE;
|
||||
media.streamType = "LIVE" as framework.messages.StreamType.LIVE;
|
||||
media.contentType = "application/vnd.apple.mpegurl";
|
||||
// @ts-ignore
|
||||
media.hlsVideoSegmentFormat =
|
||||
framework.messages.HlsVideoSegmentFormat.FMP4;
|
||||
"fmp4" as framework.messages.HlsVideoSegmentFormat.FMP4;
|
||||
}
|
||||
return loadRequestData;
|
||||
}
|
||||
);
|
||||
|
||||
playerManager.addEventListener(
|
||||
framework.events.EventType.MEDIA_STATUS,
|
||||
"MEDIA_STATUS" as framework.events.EventType.MEDIA_STATUS,
|
||||
(event) => {
|
||||
if (
|
||||
event.mediaStatus?.playerState === framework.messages.PlayerState.IDLE &&
|
||||
event.mediaStatus?.playerState === "IDLE" &&
|
||||
event.mediaStatus?.idleReason &&
|
||||
event.mediaStatus?.idleReason !==
|
||||
framework.messages.IdleReason.INTERRUPTED
|
||||
event.mediaStatus?.idleReason !== "INTERRUPTED"
|
||||
) {
|
||||
// media finished or stopped, return to default Lovelace
|
||||
showLovelaceController();
|
||||
|
@@ -117,7 +117,7 @@ export class DemoHaBadge extends LitElement {
|
||||
}
|
||||
.card-content {
|
||||
display: flex;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
@@ -155,11 +155,11 @@ export class DemoHaButton extends LitElement {
|
||||
.card-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
}
|
||||
.card-content div {
|
||||
display: flex;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
@@ -123,11 +123,11 @@ export class DemoHaProgressButton extends LitElement {
|
||||
.card-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
}
|
||||
.card-content div {
|
||||
display: flex;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
@@ -88,7 +88,7 @@ export class DemoHaSlider extends LitElement {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ export class DemoHaSpinner extends LitElement {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
@@ -159,7 +159,7 @@ class HassioSystemManagedDialog extends LitElement {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
--mdc-icon-size: 48px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ export const hassioStyle = css`
|
||||
.card-group {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
grid-gap: var(--ha-space-2);
|
||||
grid-gap: 8px;
|
||||
}
|
||||
@media screen and (min-width: 640px) {
|
||||
.card-group {
|
||||
|
@@ -213,7 +213,7 @@ class HaLandingPage extends LandingPageBaseElement {
|
||||
ha-card .card-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
}
|
||||
ha-alert p {
|
||||
text-align: unset;
|
||||
|
20
package.json
20
package.json
@@ -34,7 +34,7 @@
|
||||
"@codemirror/legacy-modes": "6.5.1",
|
||||
"@codemirror/search": "6.5.11",
|
||||
"@codemirror/state": "6.5.2",
|
||||
"@codemirror/view": "6.38.3",
|
||||
"@codemirror/view": "6.38.2",
|
||||
"@date-fns/tz": "1.4.1",
|
||||
"@egjs/hammerjs": "2.0.17",
|
||||
"@formatjs/intl-datetimeformat": "6.18.0",
|
||||
@@ -89,8 +89,8 @@
|
||||
"@thomasloven/round-slider": "0.6.0",
|
||||
"@tsparticles/engine": "3.9.1",
|
||||
"@tsparticles/preset-links": "3.2.0",
|
||||
"@vaadin/combo-box": "24.9.1",
|
||||
"@vaadin/vaadin-themable-mixin": "24.9.1",
|
||||
"@vaadin/combo-box": "24.9.0",
|
||||
"@vaadin/vaadin-themable-mixin": "24.9.0",
|
||||
"@vibrant/color": "4.0.0",
|
||||
"@vue/web-component-wrapper": "1.3.0",
|
||||
"@webcomponents/scoped-custom-element-registry": "0.0.10",
|
||||
@@ -111,7 +111,7 @@
|
||||
"fuse.js": "7.1.0",
|
||||
"google-timezones-json": "1.2.0",
|
||||
"gulp-zopfli-green": "6.0.2",
|
||||
"hls.js": "1.6.13",
|
||||
"hls.js": "1.6.12",
|
||||
"home-assistant-js-websocket": "9.5.0",
|
||||
"idb-keyval": "6.2.2",
|
||||
"intl-messageformat": "10.7.16",
|
||||
@@ -158,10 +158,10 @@
|
||||
"@octokit/plugin-retry": "8.0.1",
|
||||
"@octokit/rest": "22.0.0",
|
||||
"@rsdoctor/rspack-plugin": "1.2.3",
|
||||
"@rspack/core": "1.5.7",
|
||||
"@rspack/core": "1.5.5",
|
||||
"@rspack/dev-server": "1.1.4",
|
||||
"@types/babel__plugin-transform-runtime": "7.9.5",
|
||||
"@types/chromecast-caf-receiver": "6.0.22",
|
||||
"@types/chromecast-caf-receiver": "6.0.24",
|
||||
"@types/chromecast-caf-sender": "1.0.11",
|
||||
"@types/color-name": "2.0.0",
|
||||
"@types/culori": "4.0.1",
|
||||
@@ -203,7 +203,7 @@
|
||||
"husky": "9.1.7",
|
||||
"jsdom": "27.0.0",
|
||||
"jszip": "3.10.1",
|
||||
"lint-staged": "16.2.1",
|
||||
"lint-staged": "16.1.6",
|
||||
"lit-analyzer": "2.0.3",
|
||||
"lodash.merge": "4.6.2",
|
||||
"lodash.template": "4.5.0",
|
||||
@@ -213,11 +213,11 @@
|
||||
"rspack-manifest-plugin": "5.1.0",
|
||||
"serve": "14.2.5",
|
||||
"sinon": "21.0.0",
|
||||
"tar": "7.5.1",
|
||||
"tar": "7.4.3",
|
||||
"terser-webpack-plugin": "5.3.14",
|
||||
"ts-lit-plugin": "2.0.2",
|
||||
"typescript": "5.9.2",
|
||||
"typescript-eslint": "8.44.1",
|
||||
"typescript-eslint": "8.44.0",
|
||||
"vite-tsconfig-paths": "5.1.4",
|
||||
"vitest": "3.2.4",
|
||||
"webpack-stats-plugin": "1.1.3",
|
||||
@@ -235,5 +235,5 @@
|
||||
"tslib": "2.8.1",
|
||||
"@material/mwc-list@^0.27.0": "patch:@material/mwc-list@npm%3A0.27.0#~/.yarn/patches/@material-mwc-list-npm-0.27.0-5344fc9de4.patch"
|
||||
},
|
||||
"packageManager": "yarn@4.10.3"
|
||||
"packageManager": "yarn@4.10.2"
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "home-assistant-frontend"
|
||||
version = "20250924.0"
|
||||
version = "20250925.0"
|
||||
license = "Apache-2.0"
|
||||
license-files = ["LICENSE*"]
|
||||
description = "The Home Assistant frontend"
|
||||
|
@@ -1,40 +1,23 @@
|
||||
import { formatHex, parse } from "culori";
|
||||
|
||||
/**
|
||||
* Expands a 3-digit hex color to a 6-digit hex color.
|
||||
* @param hex - The hex color to expand.
|
||||
* @returns The expanded hex color.
|
||||
* @throws If the hex color is invalid.
|
||||
*/
|
||||
export const expandHex = (hex: string): string => {
|
||||
const color = parse(hex);
|
||||
if (!color) {
|
||||
throw new Error(`Invalid hex color: ${hex}`);
|
||||
hex = hex.replace("#", "");
|
||||
if (hex.length === 6) return hex;
|
||||
let result = "";
|
||||
for (const val of hex) {
|
||||
result += val + val;
|
||||
}
|
||||
const formattedColor = formatHex(color);
|
||||
if (!formattedColor) {
|
||||
throw new Error(`Could not format hex color: ${hex}`);
|
||||
}
|
||||
return formattedColor.replace("#", "");
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Blends two hex colors. c1 is placed over c2, blend is c1's opacity.
|
||||
* @param c1 - The first hex color.
|
||||
* @param c2 - The second hex color.
|
||||
* @param blend - The blend percentage (0-100).
|
||||
* @returns The blended hex color.
|
||||
*/
|
||||
// Blend 2 hex colors: c1 is placed over c2, blend is c1's opacity.
|
||||
export const hexBlend = (c1: string, c2: string, blend = 50): string => {
|
||||
let color = "";
|
||||
c1 = expandHex(c1);
|
||||
c2 = expandHex(c2);
|
||||
let color = "";
|
||||
for (let i = 0; i <= 5; i += 2) {
|
||||
const h1 = parseInt(c1.substring(i, i + 2), 16);
|
||||
const h2 = parseInt(c2.substring(i, i + 2), 16);
|
||||
const hex = Math.floor(h2 + (h1 - h2) * (blend / 100))
|
||||
.toString(16)
|
||||
.padStart(2, "0");
|
||||
let hex = Math.floor(h2 + (h1 - h2) * (blend / 100)).toString(16);
|
||||
while (hex.length < 2) hex = "0" + hex;
|
||||
color += hex;
|
||||
}
|
||||
return `#${color}`;
|
||||
|
@@ -1,49 +1,28 @@
|
||||
import { wcagLuminance, wcagContrast } from "culori";
|
||||
export const luminosity = (rgb: [number, number, number]): number => {
|
||||
// http://www.w3.org/TR/WCAG20/#relativeluminancedef
|
||||
const lum: [number, number, number] = [0, 0, 0];
|
||||
for (let i = 0; i < rgb.length; i++) {
|
||||
const chan = rgb[i] / 255;
|
||||
lum[i] = chan <= 0.03928 ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the luminosity of an RGB color.
|
||||
* @param rgb - The RGB color to calculate the luminosity of.
|
||||
* @returns The luminosity of the color.
|
||||
*/
|
||||
export const luminosity = (rgb: [number, number, number]): number =>
|
||||
wcagLuminance({
|
||||
mode: "rgb",
|
||||
r: rgb[0] / 255,
|
||||
g: rgb[1] / 255,
|
||||
b: rgb[2] / 255,
|
||||
});
|
||||
return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
|
||||
};
|
||||
|
||||
/**
|
||||
* Calculates the contrast ratio between two RGB colors.
|
||||
* @param color1 - The first color to calculate the contrast ratio of.
|
||||
* @param color2 - The second color to calculate the contrast ratio of.
|
||||
* @returns The contrast ratio between the two colors.
|
||||
*/
|
||||
export const rgbContrast = (
|
||||
color1: [number, number, number],
|
||||
color2: [number, number, number]
|
||||
) =>
|
||||
wcagContrast(
|
||||
{
|
||||
mode: "rgb",
|
||||
r: color1[0] / 255,
|
||||
g: color1[1] / 255,
|
||||
b: color1[2] / 255,
|
||||
},
|
||||
{
|
||||
mode: "rgb",
|
||||
r: color2[0] / 255,
|
||||
g: color2[1] / 255,
|
||||
b: color2[2] / 255,
|
||||
}
|
||||
);
|
||||
) => {
|
||||
const lum1 = luminosity(color1);
|
||||
const lum2 = luminosity(color2);
|
||||
|
||||
if (lum1 > lum2) {
|
||||
return (lum1 + 0.05) / (lum2 + 0.05);
|
||||
}
|
||||
|
||||
return (lum2 + 0.05) / (lum1 + 0.05);
|
||||
};
|
||||
|
||||
/**
|
||||
* Calculates the contrast ratio between two RGB colors.
|
||||
* @param rgb1 - The first color to calculate the contrast ratio of.
|
||||
* @param rgb2 - The second color to calculate the contrast ratio of.
|
||||
* @returns The contrast ratio between the two colors.
|
||||
*/
|
||||
export const getRGBContrastRatio = (
|
||||
rgb1: [number, number, number],
|
||||
rgb2: [number, number, number]
|
||||
|
@@ -974,7 +974,7 @@ export class HaChartBase extends LitElement {
|
||||
right: 4px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ha-space-1);
|
||||
gap: 4px;
|
||||
}
|
||||
.chart-controls.small {
|
||||
top: 0;
|
||||
@@ -1011,7 +1011,7 @@ export class HaChartBase extends LitElement {
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
.chart-legend li {
|
||||
height: 24px;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
||||
import { css, html, LitElement, nothing } from "lit";
|
||||
import { css, html, LitElement } from "lit";
|
||||
import { customElement, property } from "lit/decorators";
|
||||
import { fireEvent } from "../common/dom/fire_event";
|
||||
import type { LocalizeFunc } from "../common/translations/localize";
|
||||
@@ -73,18 +73,14 @@ export class HaAnalytics extends LitElement {
|
||||
.checked=${this.analytics?.preferences[preference]}
|
||||
.preference=${preference}
|
||||
name=${preference}
|
||||
?disabled=${baseEnabled}
|
||||
>
|
||||
</ha-switch>
|
||||
${baseEnabled
|
||||
? nothing
|
||||
: html`<ha-tooltip
|
||||
.for="switch-${preference}"
|
||||
placement="right"
|
||||
>
|
||||
${this.localize(
|
||||
`ui.panel.${this.translationKeyPanel}.analytics.need_base_enabled`
|
||||
)}
|
||||
</ha-tooltip>`}
|
||||
<ha-tooltip .for="switch-${preference}" placement="right">
|
||||
${this.localize(
|
||||
`ui.panel.${this.translationKeyPanel}.analytics.need_base_enabled`
|
||||
)}
|
||||
</ha-tooltip>
|
||||
</span>
|
||||
</ha-settings-row>
|
||||
`
|
||||
|
@@ -54,7 +54,7 @@ export class HaBadge extends LitElement {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
height: var(--ha-badge-size, 36px);
|
||||
min-width: var(--ha-badge-size, 36px);
|
||||
padding: 0px 12px;
|
||||
|
@@ -76,7 +76,7 @@ export class HaCopyTextfield extends LitElement {
|
||||
.container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
|
@@ -343,7 +343,7 @@ export class HaDateRangePicker extends LitElement {
|
||||
.date-range-inputs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.date-range-ranges {
|
||||
|
@@ -77,8 +77,8 @@ export class HaFormGrid extends LitElement implements HaFormElement {
|
||||
var(--form-grid-column-count, auto-fit),
|
||||
minmax(var(--form-grid-min-width, 200px), 1fr)
|
||||
);
|
||||
grid-column-gap: var(--ha-space-2);
|
||||
grid-row-gap: var(--ha-space-6);
|
||||
grid-column-gap: 8px;
|
||||
grid-row-gap: 24px;
|
||||
}
|
||||
:host > ha-form {
|
||||
display: block;
|
||||
|
@@ -156,7 +156,7 @@ export class HaFormOptionalActions extends LitElement implements HaFormElement {
|
||||
:host {
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
}
|
||||
:host ha-form {
|
||||
display: block;
|
||||
|
@@ -57,7 +57,7 @@ export class HaFormfield extends FormfieldBase {
|
||||
}
|
||||
.mdc-form-field {
|
||||
align-items: var(--ha-formfield-align-items, center);
|
||||
gap: var(--ha-space-1);
|
||||
gap: 4px;
|
||||
}
|
||||
.mdc-form-field > label {
|
||||
direction: var(--direction);
|
||||
|
@@ -227,7 +227,7 @@ export class HaGridSizeEditor extends LitElement {
|
||||
"row-slider preview";
|
||||
grid-template-rows: auto auto;
|
||||
grid-template-columns: auto 1fr;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
#columns {
|
||||
grid-area: column-slider;
|
||||
|
@@ -104,7 +104,7 @@ export class HaIconButtonToolbar extends LitElement {
|
||||
background-color: transparent;
|
||||
padding-right: 4px;
|
||||
height: var(--icon-button-toolbar-height);
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.icon-toolbar-button {
|
||||
|
@@ -105,7 +105,7 @@ export class HaPickerField extends LitElement {
|
||||
--md-list-item-bottom-space: 0px;
|
||||
--md-list-item-leading-space: 8px;
|
||||
--md-list-item-trailing-space: 8px;
|
||||
--ha-md-list-item-gap: var(--ha-space-2);
|
||||
--ha-md-list-item-gap: 8px;
|
||||
/* Remove the default focus ring */
|
||||
--md-focus-ring-width: 0px;
|
||||
--md-focus-ring-duration: 0s;
|
||||
|
@@ -39,24 +39,22 @@ class HaSegmentedBar extends LitElement {
|
||||
<slot name="extra"></slot>
|
||||
</div>
|
||||
<div class="bar">
|
||||
${this.segments.map(
|
||||
(segment, index) => html`
|
||||
${this.hideTooltip || !segment.label
|
||||
? nothing
|
||||
: html`
|
||||
<ha-tooltip for="segment-${index}" placement="top">
|
||||
${segment.label}
|
||||
</ha-tooltip>
|
||||
`}
|
||||
<div
|
||||
id="segment-${index}"
|
||||
style=${styleMap({
|
||||
width: `${(segment.value / totalValue) * 100}%`,
|
||||
backgroundColor: segment.color,
|
||||
})}
|
||||
></div>
|
||||
`
|
||||
)}
|
||||
${this.segments.map((segment) => {
|
||||
const bar = html`<div
|
||||
style=${styleMap({
|
||||
width: `${(segment.value / totalValue) * 100}%`,
|
||||
backgroundColor: segment.color,
|
||||
})}
|
||||
></div>`;
|
||||
return this.hideTooltip && !segment.label
|
||||
? bar
|
||||
: html`
|
||||
<ha-tooltip>
|
||||
<span slot="content">${segment.label}</span>
|
||||
${bar}
|
||||
</ha-tooltip>
|
||||
`;
|
||||
})}
|
||||
</div>
|
||||
${this.hideLegend
|
||||
? nothing
|
||||
@@ -90,7 +88,7 @@ class HaSegmentedBar extends LitElement {
|
||||
.heading {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
.heading .title {
|
||||
flex: 1;
|
||||
@@ -125,7 +123,7 @@ class HaSegmentedBar extends LitElement {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--ha-space-3);
|
||||
gap: 12px;
|
||||
margin: 12px 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
@@ -133,7 +131,7 @@ class HaSegmentedBar extends LitElement {
|
||||
.legend li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-1);
|
||||
gap: 4px;
|
||||
font-size: var(--ha-font-size-s);
|
||||
}
|
||||
.legend li .bullet {
|
||||
|
@@ -116,7 +116,7 @@ export class HaSelectBox extends LitElement {
|
||||
.list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(var(--columns, 1), minmax(0, 1fr));
|
||||
gap: var(--ha-space-3);
|
||||
gap: 12px;
|
||||
}
|
||||
.option {
|
||||
position: relative;
|
||||
@@ -128,7 +128,7 @@ export class HaSelectBox extends LitElement {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ export class HaSelectBox extends LitElement {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ export class HaSelectBox extends LitElement {
|
||||
.option .content .text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ha-space-1);
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
@@ -89,7 +89,7 @@ export class HaButtonToggleSelector extends LitElement {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
@media all and (max-width: 600px) {
|
||||
|
@@ -321,7 +321,7 @@ export class HaMediaSelector extends LitElement {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8px;
|
||||
gap: var(--ha-space-3);
|
||||
gap: 12px;
|
||||
}
|
||||
ha-card .thumbnail {
|
||||
width: 40px;
|
||||
|
@@ -82,12 +82,12 @@ export class HaNumberSelector extends LitElement {
|
||||
labeled
|
||||
.min=${this.selector.number!.min}
|
||||
.max=${this.selector.number!.max}
|
||||
.value=${this.value}
|
||||
.value=${this.value ?? ""}
|
||||
.step=${sliderStep}
|
||||
.disabled=${this.disabled}
|
||||
.required=${this.required}
|
||||
@change=${this._handleSliderChange}
|
||||
.withMarkers=${this.selector.number?.slider_ticks || false}
|
||||
.ticks=${this.selector.number?.slider_ticks}
|
||||
>
|
||||
</ha-slider>
|
||||
`
|
||||
|
@@ -297,7 +297,7 @@ export class HaObjectSelector extends LitElement {
|
||||
return [
|
||||
css`
|
||||
ha-md-list {
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
ha-md-list-item {
|
||||
border: 1px solid var(--divider-color);
|
||||
|
@@ -19,7 +19,7 @@ export class HaSlider extends Slider {
|
||||
Slider.styles,
|
||||
css`
|
||||
:host {
|
||||
--wa-form-control-activated-color: var(--ha-control-color);
|
||||
--wa-form-control-activated-color: var(--primary-color);
|
||||
--track-size: var(--ha-slider-track-size, 4px);
|
||||
--marker-height: calc(var(--ha-slider-track-size, 4px) / 2);
|
||||
--marker-width: calc(var(--ha-slider-track-size, 4px) / 2);
|
||||
|
@@ -18,8 +18,6 @@ export class HaTabGroupTab extends Tab {
|
||||
opacity: 0.8;
|
||||
|
||||
color: inherit;
|
||||
|
||||
--wa-space-l: 16px;
|
||||
}
|
||||
|
||||
:host([active]:not([disabled])) {
|
||||
|
@@ -217,7 +217,7 @@ class DialogJoinMediaPlayers extends LitElement {
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: var(--ha-space-4);
|
||||
row-gap: 16px;
|
||||
}
|
||||
|
||||
ha-dialog-header ha-button {
|
||||
|
@@ -1138,7 +1138,7 @@ export class HaMediaPlayerBrowse extends LitElement {
|
||||
auto-fit,
|
||||
minmax(var(--media-browse-item-size, 175px), 0.1fr)
|
||||
);
|
||||
grid-gap: var(--ha-space-4);
|
||||
grid-gap: 16px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
|
@@ -54,7 +54,7 @@ class HaMediaPlayerToggle extends LitElement {
|
||||
.list-item {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
column-gap: var(--ha-space-4);
|
||||
column-gap: 16px;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
@@ -4,7 +4,6 @@ export interface LovelaceBadgeConfig {
|
||||
type: string;
|
||||
[key: string]: any;
|
||||
visibility?: Condition[];
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export const ensureBadgeConfig = (
|
||||
|
@@ -39,8 +39,6 @@ import type { HomeAssistant, TranslationDict } from "../types";
|
||||
import { isUnavailableState } from "./entity";
|
||||
import { isTTSMediaSource } from "./tts";
|
||||
|
||||
import { generateEntityFilter } from "../common/entity/entity_filter";
|
||||
|
||||
interface MediaPlayerEntityAttributes extends HassEntityAttributeBase {
|
||||
media_content_id?: string;
|
||||
media_content_type?: string;
|
||||
@@ -524,33 +522,3 @@ export const mediaPlayerJoin = (
|
||||
|
||||
export const mediaPlayerUnjoin = (hass: HomeAssistant, entity_id: string) =>
|
||||
hass.callService("media_player", "unjoin", {}, { entity_id });
|
||||
|
||||
/**
|
||||
* Compute active media player states in a specific area.
|
||||
* @param hass Home Assistant object
|
||||
* @param areaId Area ID to filter media players by
|
||||
* @returns Array of playing media player entities
|
||||
*/
|
||||
export const computeActiveAreaMediaStates = (
|
||||
hass: HomeAssistant,
|
||||
areaId: string
|
||||
): MediaPlayerEntity[] => {
|
||||
const area = hass.areas[areaId];
|
||||
if (!area) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Get all media_player entities in this area
|
||||
const mediaFilter = generateEntityFilter(hass, {
|
||||
area: areaId,
|
||||
domain: "media_player",
|
||||
});
|
||||
|
||||
const mediaEntities = Object.keys(hass.entities).filter(mediaFilter);
|
||||
|
||||
return mediaEntities
|
||||
.map((entityId) => hass.states[entityId] as MediaPlayerEntity | undefined)
|
||||
.filter(
|
||||
(stateObj): stateObj is MediaPlayerEntity => stateObj?.state === "playing"
|
||||
);
|
||||
};
|
||||
|
@@ -325,7 +325,7 @@ class StepFlowCreateEntry extends LitElement {
|
||||
.device-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
.device-info img {
|
||||
width: 40px;
|
||||
|
@@ -26,21 +26,20 @@ class StepFlowLoading extends LitElement {
|
||||
this.step
|
||||
);
|
||||
return html`
|
||||
<div class="content">
|
||||
<ha-spinner size="large"></ha-spinner>
|
||||
<div class="init-spinner">
|
||||
${description ? html`<div>${description}</div>` : ""}
|
||||
<ha-spinner></ha-spinner>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
static styles = css`
|
||||
.content {
|
||||
margin-top: 0;
|
||||
.init-spinner {
|
||||
padding: 50px 100px;
|
||||
text-align: center;
|
||||
}
|
||||
ha-spinner {
|
||||
margin-bottom: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ class StepFlowProgress extends LitElement {
|
||||
)}%</ha-progress-ring
|
||||
>
|
||||
`
|
||||
: html`<ha-spinner size="large"></ha-spinner>`}
|
||||
: html` <ha-spinner size="large"></ha-spinner> `}
|
||||
${this.flowConfig.renderShowFormProgressDescription(
|
||||
this.hass,
|
||||
this.step
|
||||
@@ -48,7 +48,6 @@ class StepFlowProgress extends LitElement {
|
||||
configFlowContentStyles,
|
||||
css`
|
||||
.content {
|
||||
margin-top: 0;
|
||||
padding: 50px 100px;
|
||||
text-align: center;
|
||||
}
|
||||
|
@@ -209,7 +209,7 @@ export class DialogEnterCode
|
||||
display: grid;
|
||||
grid-template-columns: repeat(var(--keypad-columns), auto);
|
||||
grid-auto-rows: auto;
|
||||
grid-gap: var(--ha-space-6);
|
||||
grid-gap: 24px;
|
||||
justify-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ export class HaMoreInfoControlSelectContainer extends LitElement {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
gap: var(--ha-space-3);
|
||||
gap: 12px;
|
||||
margin: auto;
|
||||
overflow: auto;
|
||||
-ms-overflow-style: none; /* IE and Edge */
|
||||
|
@@ -202,13 +202,13 @@ class MoreInfoSirenAdvancedControls extends LitElement {
|
||||
.options {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
}
|
||||
.controls {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
ha-control-button {
|
||||
|
@@ -107,7 +107,7 @@ class MoreInfoCamera extends LitElement {
|
||||
box-sizing: border-box;
|
||||
padding: 16px;
|
||||
z-index: 1;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
@@ -181,7 +181,7 @@ class MoreInfoLock extends LitElement {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
font-weight: var(--ha-font-weight-medium);
|
||||
color: var(--success-color);
|
||||
}
|
||||
|
@@ -48,10 +48,10 @@ class MoreInfoMediaPlayer extends LitElement {
|
||||
|
||||
@property({ attribute: false }) public stateObj?: MediaPlayerEntity;
|
||||
|
||||
private _formatDuration(duration: number) {
|
||||
private _formateDuration(duration: number) {
|
||||
const hours = Math.floor(duration / 3600);
|
||||
const minutes = Math.floor((duration % 3600) / 60);
|
||||
const seconds = Math.floor(duration % 60);
|
||||
const seconds = duration % 60;
|
||||
return formatDurationDigital(this.hass.locale, {
|
||||
hours,
|
||||
minutes,
|
||||
@@ -260,12 +260,12 @@ class MoreInfoMediaPlayer extends LitElement {
|
||||
const controls = computeMediaControls(stateObj, true);
|
||||
const coverUrl = stateObj.attributes.entity_picture || "";
|
||||
const playerObj = new HassMediaPlayerEntity(this.hass, this.stateObj);
|
||||
|
||||
const position = Math.max(Math.floor(playerObj.currentProgress || 0), 0);
|
||||
const duration = Math.max(stateObj.attributes.media_duration || 0, 0);
|
||||
const remaining = Math.max(duration - position, 0);
|
||||
const remainingFormatted = this._formatDuration(remaining);
|
||||
const positionFormatted = this._formatDuration(position);
|
||||
const position = Math.floor(playerObj.currentProgress) || 0;
|
||||
const duration = stateObj.attributes.media_duration || 0;
|
||||
const remaining = duration - position;
|
||||
const durationFormated =
|
||||
remaining > 0 ? this._formateDuration(remaining) : 0;
|
||||
const postionFormated = this._formateDuration(position);
|
||||
const primaryTitle = playerObj.primaryTitle;
|
||||
const secondaryTitle = playerObj.secondaryTitle;
|
||||
const turnOn = controls?.find((c) => c.action === "turn_on");
|
||||
@@ -323,10 +323,11 @@ class MoreInfoMediaPlayer extends LitElement {
|
||||
@change=${this._handleMediaSeekChanged}
|
||||
?disabled=${!stateActive(stateObj) ||
|
||||
!supportsFeature(stateObj, MediaPlayerEntityFeature.SEEK)}
|
||||
>
|
||||
<span slot="reference">${positionFormatted}</span>
|
||||
<span slot="reference">${remainingFormatted}</span>
|
||||
</ha-slider>
|
||||
></ha-slider>
|
||||
<div class="position-info-row">
|
||||
<span class="position-time">${postionFormated}</span>
|
||||
<span class="duration-time">${durationFormated}</span>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
: nothing}
|
||||
@@ -442,7 +443,7 @@ class MoreInfoMediaPlayer extends LitElement {
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
@@ -476,22 +477,6 @@ class MoreInfoMediaPlayer extends LitElement {
|
||||
height: 320px;
|
||||
}
|
||||
|
||||
@media (max-height: 750px) {
|
||||
.cover-container {
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
.cover-image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.cover-image--playing {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-cover {
|
||||
background-color: var(--secondary-background-color);
|
||||
font-size: 1.5em;
|
||||
@@ -526,7 +511,7 @@ class MoreInfoMediaPlayer extends LitElement {
|
||||
.volume {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-3);
|
||||
gap: 12px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
@@ -563,8 +548,13 @@ class MoreInfoMediaPlayer extends LitElement {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.position-bar ha-slider::part(references) {
|
||||
.position-info-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
color: var(--secondary-text-color);
|
||||
padding: 0 8px;
|
||||
font-size: var(--ha-font-size-s);
|
||||
}
|
||||
|
||||
.media-info-row {
|
||||
@@ -607,7 +597,7 @@ class MoreInfoMediaPlayer extends LitElement {
|
||||
.bottom-controls {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
align-self: center;
|
||||
width: 320px;
|
||||
}
|
||||
|
@@ -508,7 +508,7 @@ class MoreInfoUpdate extends LitElement {
|
||||
box-sizing: border-box;
|
||||
padding: 16px;
|
||||
z-index: 1;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
a {
|
||||
|
@@ -269,7 +269,7 @@ class DialogShortcuts extends LitElement {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
|
@@ -8,7 +8,6 @@ import { createCloseHeading } from "../../components/ha-dialog";
|
||||
import "../../components/ha-textarea";
|
||||
import type { HaTextArea } from "../../components/ha-textarea";
|
||||
import { convertTextToSpeech } from "../../data/tts";
|
||||
import { haStyleDialog } from "../../resources/styles";
|
||||
import type { HomeAssistant } from "../../types";
|
||||
import { showAlertDialog } from "../generic/show-dialog-box";
|
||||
import type { TTSTryDialogParams } from "./show-dialog-tts-try";
|
||||
@@ -150,24 +149,21 @@ export class TTSTryDialog extends LitElement {
|
||||
});
|
||||
}
|
||||
|
||||
static styles = [
|
||||
haStyleDialog,
|
||||
css`
|
||||
ha-dialog {
|
||||
--mdc-dialog-max-width: 500px;
|
||||
}
|
||||
ha-textarea,
|
||||
ha-select {
|
||||
width: 100%;
|
||||
}
|
||||
ha-select {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.loading {
|
||||
height: 36px;
|
||||
}
|
||||
`,
|
||||
];
|
||||
static styles = css`
|
||||
ha-dialog {
|
||||
--mdc-dialog-max-width: 500px;
|
||||
}
|
||||
ha-textarea,
|
||||
ha-select {
|
||||
width: 100%;
|
||||
}
|
||||
ha-select {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.loading {
|
||||
height: 36px;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
@@ -127,7 +127,7 @@ export class CloudStepIntro extends LitElement {
|
||||
.features {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
grid-gap: var(--ha-space-4);
|
||||
grid-gap: 16px;
|
||||
padding: 16px;
|
||||
}
|
||||
.feature {
|
||||
|
@@ -427,7 +427,7 @@ export class HaVoiceAssistantSetupStepPipeline extends LitElement {
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
display: flex;
|
||||
gap: var(--ha-space-1);
|
||||
gap: 4px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
.segment {
|
||||
|
@@ -368,7 +368,7 @@ export class HaVoiceAssistantSetupStepSuccess extends LitElement {
|
||||
margin-top: 24px;
|
||||
}
|
||||
.rows {
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
@@ -182,7 +182,7 @@ class HassSubpage extends LitElement {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
:host([narrow]) #fab.tabs {
|
||||
bottom: calc(84px + var(--safe-area-inset-bottom, 0px));
|
||||
|
@@ -740,7 +740,7 @@ export class HaTabsSubpageDataTable extends KeyboardShortcutMixin(LitElement) {
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
padding: 0 16px;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
box-sizing: border-box;
|
||||
background: var(--primary-background-color);
|
||||
border-bottom: 1px solid var(--divider-color);
|
||||
@@ -823,7 +823,7 @@ export class HaTabsSubpageDataTable extends KeyboardShortcutMixin(LitElement) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: 100%;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
padding: 0 16px;
|
||||
box-sizing: border-box;
|
||||
overflow-x: scroll;
|
||||
@@ -852,7 +852,7 @@ export class HaTabsSubpageDataTable extends KeyboardShortcutMixin(LitElement) {
|
||||
.selection-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.selection-controls p {
|
||||
@@ -864,7 +864,7 @@ export class HaTabsSubpageDataTable extends KeyboardShortcutMixin(LitElement) {
|
||||
.center-vertical {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.relative {
|
||||
|
@@ -362,7 +362,7 @@ class HassTabsSubpage extends LitElement {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
:host([narrow]) #fab.tabs {
|
||||
bottom: calc(84px + var(--safe-area-inset-bottom, 0px));
|
||||
|
@@ -212,7 +212,7 @@ class OnboardingIntegrations extends SubscribeMixin(LitElement) {
|
||||
margin-top: 24px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(106px, 1fr));
|
||||
row-gap: var(--ha-space-6);
|
||||
row-gap: 24px;
|
||||
}
|
||||
.more {
|
||||
display: flex;
|
||||
|
@@ -64,8 +64,8 @@ class OnboardingWelcomeLinks extends LitElement {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
||||
margin-top: 16px;
|
||||
column-gap: var(--ha-space-4);
|
||||
row-gap: var(--ha-space-4);
|
||||
column-gap: 16px;
|
||||
row-gap: 16px;
|
||||
}
|
||||
@media (max-width: 550px) {
|
||||
:host {
|
||||
|
@@ -123,7 +123,7 @@ class OnboardingRestoreBackupCloudLogin extends LitElement {
|
||||
font-size: var(--ha-font-size-2xl);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
}
|
||||
h2 img {
|
||||
width: 48px;
|
||||
|
@@ -332,7 +332,7 @@ class OnboardingRestoreBackupRestore extends LitElement {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
line-height: var(--ha-line-height-condensed);
|
||||
}
|
||||
h2 {
|
||||
|
@@ -736,7 +736,7 @@ class DialogAddAutomationElement
|
||||
}
|
||||
.shortcut-label {
|
||||
display: flex;
|
||||
gap: var(--ha-space-3);
|
||||
gap: 12px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.shortcut-label .supporting-text {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { consume } from "@lit/context";
|
||||
import {
|
||||
mdiAppleKeyboardCommand,
|
||||
mdiCog,
|
||||
mdiContentSave,
|
||||
mdiDebugStepOver,
|
||||
@@ -88,7 +87,6 @@ import "./blueprint-automation-editor";
|
||||
import "./manual-automation-editor";
|
||||
import type { HaManualAutomationEditor } from "./manual-automation-editor";
|
||||
import { UndoRedoMixin } from "../../../mixins/undo-redo-mixin";
|
||||
import { isMac } from "../../../util/is_mac";
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
@@ -217,10 +215,6 @@ export class HaAutomationEditor extends UndoRedoMixin<
|
||||
: undefined;
|
||||
|
||||
const useBlueprint = "use_blueprint" in this._config;
|
||||
const shortcutIcon = isMac
|
||||
? html`<ha-svg-icon .path=${mdiAppleKeyboardCommand}></ha-svg-icon>`
|
||||
: this.hass.localize("ui.panel.config.automation.editor.ctrl");
|
||||
|
||||
return html`
|
||||
<hass-subpage
|
||||
.hass=${this.hass}
|
||||
@@ -237,35 +231,16 @@ export class HaAutomationEditor extends UndoRedoMixin<
|
||||
.path=${mdiUndo}
|
||||
@click=${this.undo}
|
||||
.disabled=${!this.canUndo}
|
||||
id="button-undo"
|
||||
>
|
||||
</ha-icon-button>
|
||||
<ha-tooltip placement="bottom" for="button-undo">
|
||||
${this.hass.localize("ui.common.undo")}
|
||||
<span class="shortcut"
|
||||
>(
|
||||
<span>${shortcutIcon}</span>
|
||||
<span>+</span>
|
||||
<span>Z</span>)
|
||||
</span>
|
||||
</ha-tooltip>
|
||||
<ha-icon-button
|
||||
slot="toolbar-icon"
|
||||
.label=${this.hass.localize("ui.common.redo")}
|
||||
.path=${mdiRedo}
|
||||
@click=${this.redo}
|
||||
.disabled=${!this.canRedo}
|
||||
id="button-redo"
|
||||
>
|
||||
</ha-icon-button>
|
||||
<ha-tooltip placement="bottom" for="button-redo">
|
||||
${this.hass.localize("ui.common.redo")}
|
||||
<span class="shortcut">
|
||||
(<span>${shortcutIcon}</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>)
|
||||
</span>
|
||||
</ha-tooltip>`
|
||||
</ha-icon-button>`
|
||||
: nothing}
|
||||
${this._config?.id && !this.narrow
|
||||
? html`
|
||||
@@ -1317,15 +1292,6 @@ export class HaAutomationEditor extends UndoRedoMixin<
|
||||
ha-fab.dirty {
|
||||
bottom: calc(16px + var(--safe-area-inset-bottom, 0px));
|
||||
}
|
||||
ha-tooltip ha-svg-icon {
|
||||
width: 12px;
|
||||
}
|
||||
ha-tooltip .shortcut {
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
@@ -92,7 +92,7 @@ class DialogPasteReplace extends LitElement implements HassDialog {
|
||||
}
|
||||
div[slot="primaryAction"] {
|
||||
display: flex;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
@@ -118,7 +118,7 @@ export const manualEditorStyles = css`
|
||||
var(--ha-automation-editor-max-width) -
|
||||
${CONTENT_MIN_WIDTH}px - var(--mdc-drawer-width, 0px)
|
||||
);
|
||||
--sidebar-gap: var(--ha-space-4);
|
||||
--sidebar-gap: 16px;
|
||||
}
|
||||
|
||||
.fab-positioner {
|
||||
@@ -188,7 +188,7 @@ export const automationRowsStyles = css`
|
||||
.rows {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
}
|
||||
.rows.no-sidebar {
|
||||
margin-inline-end: 0;
|
||||
@@ -225,7 +225,7 @@ export const automationRowsStyles = css`
|
||||
.buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
order: 1;
|
||||
}
|
||||
`;
|
||||
@@ -244,7 +244,7 @@ export const overflowStyles = css`
|
||||
.overflow-label {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: var(--ha-space-3);
|
||||
gap: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.overflow-label .shortcut {
|
||||
|
@@ -806,7 +806,7 @@ export default class HaAutomationTriggerRow extends LitElement {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-1);
|
||||
gap: 4px;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
}
|
||||
|
@@ -313,13 +313,13 @@ class HaBackupConfigAgents extends LitElement {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
line-height: var(--ha-line-height-condensed);
|
||||
}
|
||||
.unencrypted-warning {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-1);
|
||||
gap: 4px;
|
||||
}
|
||||
.dot {
|
||||
display: block;
|
||||
@@ -341,7 +341,7 @@ class HaBackupConfigAgents extends LitElement {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
gap: var(--ha-space-1);
|
||||
gap: 4px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
@@ -119,7 +119,7 @@ class HaBackupAgentsPicker extends LitElement {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
font-size: var(--ha-font-size-l);
|
||||
font-weight: var(--ha-font-weight-normal);
|
||||
line-height: var(--ha-line-height-normal);
|
||||
|
@@ -110,7 +110,7 @@ class HaBackupDetailsRestore extends LitElement {
|
||||
max-width: 690px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
display: grid;
|
||||
}
|
||||
.card-content {
|
||||
@@ -133,7 +133,7 @@ class HaBackupDetailsRestore extends LitElement {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
line-height: var(--ha-line-height-condensed);
|
||||
}
|
||||
`;
|
||||
|
@@ -138,7 +138,7 @@ class HaBackupDetailsSummary extends LitElement {
|
||||
max-width: 690px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
display: grid;
|
||||
}
|
||||
.card-content {
|
||||
@@ -168,7 +168,7 @@ class HaBackupDetailsSummary extends LitElement {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
line-height: var(--ha-line-height-condensed);
|
||||
}
|
||||
`;
|
||||
|
@@ -35,7 +35,7 @@ class SupervisorFormfieldLabel extends LitElement {
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
align-items: center;
|
||||
}
|
||||
.label {
|
||||
|
@@ -74,8 +74,8 @@ class HaBackupSummaryCard extends LitElement {
|
||||
.summary {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
column-gap: var(--ha-space-4);
|
||||
row-gap: var(--ha-space-2);
|
||||
column-gap: 16px;
|
||||
row-gap: 8px;
|
||||
align-items: center;
|
||||
padding: 16px;
|
||||
padding-bottom: 8px;
|
||||
|
@@ -117,7 +117,7 @@ class HaBackupOverviewBackups extends LitElement {
|
||||
padding: 28px 20px 0;
|
||||
max-width: 690px;
|
||||
margin: 0 auto;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: calc(72px + var(--safe-area-inset-bottom));
|
||||
|
@@ -61,7 +61,7 @@ class HaBackupOverviewBackups extends LitElement {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
}
|
||||
.icon {
|
||||
position: relative;
|
||||
|
@@ -303,7 +303,7 @@ class HaBackupBackupsSummary extends LitElement {
|
||||
padding: 28px 20px 0;
|
||||
max-width: 690px;
|
||||
margin: 0 auto;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 24px;
|
||||
|
@@ -334,7 +334,7 @@ class HaBackupOverviewBackups extends LitElement {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
|
@@ -579,7 +579,7 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
}
|
||||
.encryption-key p {
|
||||
margin: 0;
|
||||
|
@@ -305,7 +305,7 @@ class DialogChangeBackupEncryptionKey extends LitElement implements HassDialog {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
}
|
||||
.encryption-key p {
|
||||
margin: 0;
|
||||
|
@@ -231,7 +231,7 @@ class DialogSetBackupEncryptionKey extends LitElement implements HassDialog {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
}
|
||||
.encryption-key p {
|
||||
margin: 0;
|
||||
|
@@ -153,7 +153,7 @@ class DialogShowBackupEncryptionKey extends LitElement implements HassDialog {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
}
|
||||
.encryption-key p {
|
||||
margin: 0;
|
||||
|
@@ -189,7 +189,7 @@ class HaConfigBackupBackups extends SubscribeMixin(LitElement) {
|
||||
0
|
||||
);
|
||||
return html`
|
||||
<div style="display: flex; gap: var(--ha-space-1);">
|
||||
<div style="display: flex; gap: 4px;">
|
||||
${displayedAgentIds.map((agentId) => {
|
||||
const name = computeBackupAgentName(
|
||||
this.hass.localize,
|
||||
|
@@ -356,7 +356,7 @@ class HaConfigBackupDetails extends LitElement {
|
||||
padding: 28px 20px 0;
|
||||
max-width: 690px;
|
||||
margin: 0 auto;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
display: grid;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
@@ -399,7 +399,7 @@ class HaConfigBackupDetails extends LitElement {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
line-height: var(--ha-line-height-condensed);
|
||||
}
|
||||
.dot {
|
||||
|
@@ -326,7 +326,7 @@ class HaConfigBackupDetails extends LitElement {
|
||||
padding: 28px 20px 0;
|
||||
max-width: 690px;
|
||||
margin: 0 auto;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
display: grid;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
@@ -376,7 +376,7 @@ class HaConfigBackupDetails extends LitElement {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
line-height: var(--ha-line-height-condensed);
|
||||
}
|
||||
.dot {
|
||||
|
@@ -248,7 +248,7 @@ class HaConfigBackupOverview extends LitElement {
|
||||
padding: 28px 20px 0;
|
||||
max-width: 690px;
|
||||
margin: 0 auto;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: calc(var(--safe-area-inset-bottom) + 72px);
|
||||
|
@@ -510,7 +510,7 @@ class HaConfigBackupSettings extends LitElement {
|
||||
padding: 28px 20px 0;
|
||||
max-width: 690px;
|
||||
margin: 0 auto;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 24px;
|
||||
@@ -532,7 +532,7 @@ class HaConfigBackupSettings extends LitElement {
|
||||
}
|
||||
.cloud-info .cloud-header {
|
||||
display: flex;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
font-size: var(--ha-font-size-xl);
|
||||
align-items: center;
|
||||
padding: 16px;
|
||||
|
@@ -129,7 +129,7 @@ export class DialogSupportPackage extends LitElement {
|
||||
}
|
||||
.actions {
|
||||
display: flex;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
hr {
|
||||
|
@@ -59,7 +59,7 @@ export class DashboardCard extends LitElement {
|
||||
padding: 12px;
|
||||
display: block;
|
||||
text-align: var(--float-start);
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
.preview {
|
||||
padding: 16px;
|
||||
|
@@ -213,7 +213,6 @@ class HaConfigEnergy extends LitElement {
|
||||
this.hass.states[key],
|
||||
])
|
||||
),
|
||||
issues: this._validationResult,
|
||||
};
|
||||
const json = JSON.stringify(data, null, 2);
|
||||
const blob = new Blob([json], { type: "application/json" });
|
||||
|
@@ -921,7 +921,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
||||
.header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--ha-space-6);
|
||||
gap: 24px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 24px;
|
||||
@@ -932,7 +932,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
||||
}
|
||||
.title {
|
||||
display: flex;
|
||||
gap: var(--ha-space-1);
|
||||
gap: 4px;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
@@ -991,7 +991,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
.section {
|
||||
width: 100%;
|
||||
@@ -1013,7 +1013,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
||||
.integration-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ha-space-2);
|
||||
gap: 8px;
|
||||
}
|
||||
.integration-info ha-svg-icon {
|
||||
min-width: 24px;
|
||||
|
@@ -1013,7 +1013,7 @@ class HaConfigIntegrationsDashboard extends KeyboardShortcutMixin(
|
||||
z-index: 2;
|
||||
background-color: var(--primary-background-color);
|
||||
padding: 0 16px;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid var(--divider-color);
|
||||
}
|
||||
|
@@ -91,7 +91,7 @@ class MatterAddDeviceNew extends LitElement {
|
||||
justify-content: space-between;
|
||||
padding: 0 24px;
|
||||
box-sizing: border-box;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
@@ -143,9 +143,7 @@ export class ThreadConfigPanel extends SubscribeMixin(LitElement) {
|
||||
slot="fab"
|
||||
@click=${this._importExternalThreadCredentials}
|
||||
extended
|
||||
.label=${this.hass.localize(
|
||||
"ui.panel.config.thread.thread_network_send_credentials_ha"
|
||||
)}
|
||||
label="Send credentials to Home Assistant"
|
||||
><ha-svg-icon slot="icon" .path=${mdiCellphoneKey}></ha-svg-icon
|
||||
></ha-fab>`
|
||||
: nothing}
|
||||
@@ -312,9 +310,7 @@ export class ThreadConfigPanel extends SubscribeMixin(LitElement) {
|
||||
<ha-button
|
||||
.datasetId=${network.dataset.dataset_id}
|
||||
@click=${this._setPreferred}
|
||||
>${this.hass.localize(
|
||||
"ui.panel.config.thread.thread_network_make_preferred"
|
||||
)}</ha-button
|
||||
>Make preferred network</ha-button
|
||||
>
|
||||
</div>`
|
||||
: ""}
|
||||
@@ -326,9 +322,7 @@ export class ThreadConfigPanel extends SubscribeMixin(LitElement) {
|
||||
size="small"
|
||||
.networkDataset=${network.dataset}
|
||||
@click=${this._sendCredentials}
|
||||
>${this.hass.localize(
|
||||
"ui.panel.config.thread.thread_network_send_credentials_phone"
|
||||
)}</ha-button
|
||||
>Send credentials to phone</ha-button
|
||||
>
|
||||
</div>`
|
||||
: ""}
|
||||
|
@@ -209,7 +209,7 @@ class ZWaveJSCapabilityThermostatSetback extends LitElement {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
}
|
||||
:host > ha-select {
|
||||
width: 100%;
|
||||
@@ -225,7 +225,7 @@ class ZWaveJSCapabilityThermostatSetback extends LitElement {
|
||||
.setback-state {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
gap: var(--ha-space-4);
|
||||
gap: 16px;
|
||||
}
|
||||
.setback-state ha-select,
|
||||
ha-textfield {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user