mirror of
https://github.com/home-assistant/frontend.git
synced 2026-11-09 14:34:13 +00:00
Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ccd2a4dead | ||
|
|
fead96eb9c | ||
|
|
4e480e7e8c | ||
|
|
fc4d83195b | ||
|
|
0a6adf5290 | ||
|
|
3f8c806095 | ||
|
|
283c335878 | ||
|
|
54d42767b5 | ||
|
|
9cfb6ce1bd |
No files matched your search
@@ -35,11 +35,12 @@ runs:
|
||||
NETLIFY_AUTH_TOKEN: ${{ inputs.auth-token }}
|
||||
NETLIFY_SITE_ID: ${{ inputs.site-id }}
|
||||
run: |
|
||||
# Execute the deployment (--filter picks the root workspace project)
|
||||
# Execute the deployment (--filter picks the root workspace project,
|
||||
# --no-build because we deploy an already built directory)
|
||||
if [ -n "$ALIAS" ]; then
|
||||
npx -y netlify-cli deploy --filter home-assistant-frontend --dir="$DIR" --alias "$ALIAS" --json > deploy_output.json
|
||||
npx -y netlify-cli deploy --filter home-assistant-frontend --no-build --dir="$DIR" --alias "$ALIAS" --json > deploy_output.json
|
||||
else
|
||||
npx -y netlify-cli deploy --filter home-assistant-frontend --dir="$DIR" --prod --json > deploy_output.json
|
||||
npx -y netlify-cli deploy --filter home-assistant-frontend --no-build --dir="$DIR" --prod --json > deploy_output.json
|
||||
fi
|
||||
|
||||
# Collect the urls from the deployment output
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<title>Home Assistant Cast - FAQ</title>
|
||||
<link rel="icon" href="/images/ha-cast-icon.png" type="image/png" />
|
||||
<%= renderTemplate("../../../src/html/_meta_viewport.html.template") %>
|
||||
<%= renderTemplate("../../../src/html/_style_base.html.template") %>
|
||||
<style>
|
||||
body {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<title>Home Assistant Cast</title>
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel="icon" href="/images/ha-cast-icon.png" type="image/png" />
|
||||
<%= renderTemplate("../../../src/html/_meta_viewport.html.template") %>
|
||||
<%= renderTemplate("../../../src/html/_style_base.html.template") %>
|
||||
<style>
|
||||
body {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<% for (const entry of latestEntryJS) { %>
|
||||
<script type="module" src="<%= entry %>"></script>
|
||||
<% } %>
|
||||
<%= renderTemplate("../../../src/html/_meta_viewport.html.template") %>
|
||||
<%= renderTemplate("../../../src/html/_style_base.html.template") %>
|
||||
<style>
|
||||
body {
|
||||
|
||||
@@ -35,13 +35,12 @@
|
||||
/>
|
||||
<meta name="theme-color" content="#03a9f4" />
|
||||
<%= renderTemplate("_social_meta.html.template") %>
|
||||
<%= renderTemplate("../../../src/html/_style_base.html.template") %>
|
||||
<style>
|
||||
html {
|
||||
background-color: var(--primary-background-color, #fafafa);
|
||||
color: var(--primary-text-color, #212121);
|
||||
/* Prevent iOS Safari from inflating text when rotating to landscape */
|
||||
-webkit-text-size-adjust: 100%;
|
||||
text-size-adjust: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html {
|
||||
@@ -49,94 +48,8 @@
|
||||
color: var(--primary-text-color, #e1e1e1);
|
||||
}
|
||||
}
|
||||
body {
|
||||
font-family: Roboto, Noto, sans-serif;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-weight: 400;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#ha-launch-screen {
|
||||
font-family: ui-sans-serif, system-ui, sans-serif;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
transition: opacity var(--ha-animation-duration-normal, 250ms) ease-out;
|
||||
}
|
||||
#ha-launch-screen.removing {
|
||||
opacity: 0;
|
||||
}
|
||||
@keyframes launch-lockup-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
#ha-launch-screen .ha-lockup {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
animation: launch-lockup-in var(--ha-animation-duration-normal, 250ms) ease-out both;
|
||||
}
|
||||
#ha-launch-screen-info-box > *,
|
||||
#ha-launch-screen .ohf-logo {
|
||||
animation: launch-lockup-in var(--ha-animation-duration-normal, 250ms) ease-out both;
|
||||
}
|
||||
#ha-launch-screen .ha-logo {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
#ha-launch-screen .ha-launch-screen-spacer-top {
|
||||
flex: 1;
|
||||
margin-top: calc( 2 * max(var(--safe-area-inset-top, 0px), 48px) + 46px );
|
||||
padding-top: 48px;
|
||||
}
|
||||
#ha-launch-screen .ha-launch-screen-spacer-bottom {
|
||||
flex: 1;
|
||||
padding-top: 16px;
|
||||
}
|
||||
.ohf-logo {
|
||||
margin: max(var(--safe-area-inset-bottom, 0px), 48px) 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
opacity: .66;
|
||||
}
|
||||
.ohf-logo span {
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.ohf-logo picture {
|
||||
display: flex;
|
||||
}
|
||||
.ohf-logo img {
|
||||
width: 237px;
|
||||
aspect-ratio: 237 / 24;
|
||||
height: auto;
|
||||
}
|
||||
@media (max-height: 560px) {
|
||||
#ha-launch-screen .ha-launch-screen-spacer-top {
|
||||
margin-top: 24px;
|
||||
padding-top: 24px;
|
||||
}
|
||||
#ha-launch-screen .ha-launch-screen-spacer-bottom {
|
||||
padding-top: 16px;
|
||||
}
|
||||
.ohf-logo {
|
||||
margin-block: 24px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<%= renderTemplate("../../../src/html/_style_launch_screen.html.template") %>
|
||||
</head>
|
||||
<body>
|
||||
<div id="ha-launch-screen">
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<title>Home Assistant</title>
|
||||
<%= renderTemplate("../../../src/html/_header.html.template") %>
|
||||
<%= renderTemplate("../../../src/html/_meta_viewport.html.template") %>
|
||||
<%= renderTemplate("../../../src/html/_style_base.html.template") %>
|
||||
<style>
|
||||
html {
|
||||
|
||||
@@ -283,13 +283,14 @@ class HaHsColorPicker extends LitElement {
|
||||
const x = e.center.x;
|
||||
const y = e.center.y;
|
||||
const boundingRect = e.target.getBoundingClientRect();
|
||||
const offsetX = boundingRect.left;
|
||||
const offsetY = boundingRect.top;
|
||||
const maxX = e.target.clientWidth;
|
||||
const maxY = e.target.clientHeight;
|
||||
// The wheel is drawn as a centered square (object-fit: contain), but the
|
||||
// canvas box itself is not always square (e.g. wider in Safari).
|
||||
const size = Math.min(boundingRect.width, boundingRect.height);
|
||||
const centerX = boundingRect.left + boundingRect.width / 2;
|
||||
const centerY = boundingRect.top + boundingRect.height / 2;
|
||||
|
||||
const _x = (2 * (x - offsetX)) / maxX - 1;
|
||||
const _y = (2 * (y - offsetY)) / maxY - 1;
|
||||
const _x = (2 * (x - centerX)) / size;
|
||||
const _y = (2 * (y - centerY)) / size;
|
||||
|
||||
const [r, phi] = xy2polar(_x, _y);
|
||||
const [xx, yy] = polar2xy(Math.min(1, r), phi);
|
||||
|
||||
@@ -382,13 +382,20 @@ export const getEntityPlatformLookup = (
|
||||
return entityLookup;
|
||||
};
|
||||
|
||||
export interface AutomaticEntityIdOverrides {
|
||||
name?: string | null;
|
||||
area_id?: string | null;
|
||||
}
|
||||
|
||||
export const getAutomaticEntityIds = (
|
||||
hass: HomeAssistant,
|
||||
entity_ids: string[]
|
||||
entity_ids: string[],
|
||||
overrides?: Record<string, AutomaticEntityIdOverrides>
|
||||
) =>
|
||||
hass.callWS<Record<string, string | null>>({
|
||||
type: "config/entity_registry/get_automatic_entity_ids",
|
||||
entity_ids,
|
||||
...(overrides && { overrides }),
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, viewport-fit=cover, initial-scale=1">
|
||||
@@ -1,4 +1,3 @@
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, viewport-fit=cover, initial-scale=1">
|
||||
<style>
|
||||
html {
|
||||
/* Prevent iOS Safari from inflating text when rotating to landscape */
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<style>
|
||||
#ha-launch-screen {
|
||||
font-family: ui-sans-serif, system-ui, sans-serif;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
background-color: var(--primary-background-color, #fafafa);
|
||||
z-index: 100;
|
||||
transition: opacity var(--ha-animation-duration-normal, 250ms) ease-out;
|
||||
}
|
||||
#ha-launch-screen.removing {
|
||||
opacity: 0;
|
||||
}
|
||||
@keyframes launch-lockup-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
#ha-launch-screen .ha-lockup {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
animation: launch-lockup-in var(--ha-animation-duration-normal, 250ms) ease-out both;
|
||||
}
|
||||
#ha-launch-screen-info-box > *,
|
||||
#ha-launch-screen .ohf-logo {
|
||||
animation: launch-lockup-in var(--ha-animation-duration-normal, 250ms) ease-out both;
|
||||
}
|
||||
#ha-launch-screen .ha-logo {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
#ha-launch-screen .ha-launch-screen-spacer-top {
|
||||
flex: 1;
|
||||
margin-top: calc( 2 * max(var(--safe-area-inset-top, 0px), 48px) + 46px );
|
||||
padding-top: 48px;
|
||||
}
|
||||
#ha-launch-screen .ha-launch-screen-spacer-bottom {
|
||||
flex: 1;
|
||||
padding-top: 16px;
|
||||
}
|
||||
.ohf-logo {
|
||||
margin: max(var(--safe-area-inset-bottom, 0px), 48px) 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
opacity: .66;
|
||||
}
|
||||
.ohf-logo span {
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.ohf-logo picture {
|
||||
display: flex;
|
||||
}
|
||||
.ohf-logo img {
|
||||
width: 237px;
|
||||
aspect-ratio: 237 / 24;
|
||||
height: auto;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
/*
|
||||
* Core renders the app's index.html through Jinja2, where the minified
|
||||
* `@media (...){#ha-launch-screen` would read as the start of a `{# #}`
|
||||
* comment. The `body` prefix keeps a character between `{` and `#`.
|
||||
*/
|
||||
body #ha-launch-screen {
|
||||
background-color: var(--primary-background-color, #111111);
|
||||
}
|
||||
}
|
||||
@media (max-height: 560px) {
|
||||
/* `body` prefix for the same Jinja2 reason as above. */
|
||||
body #ha-launch-screen .ha-launch-screen-spacer-top {
|
||||
margin-top: 24px;
|
||||
padding-top: 24px;
|
||||
}
|
||||
.ohf-logo {
|
||||
margin-block: 24px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<title>Home Assistant</title>
|
||||
<%= renderTemplate("_header.html.template") %>
|
||||
<%= renderTemplate("_meta_viewport.html.template") %>
|
||||
<%= renderTemplate("_style_base.html.template") %>
|
||||
<style>
|
||||
html {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<meta name="referrer" content="same-origin" />
|
||||
<meta name="theme-color" content="{{ theme_color }}" />
|
||||
<meta name="color-scheme" content="dark light" />
|
||||
<%= renderTemplate("_meta_viewport.html.template") %>
|
||||
<%= renderTemplate("_style_base.html.template") %>
|
||||
<style>
|
||||
html {
|
||||
@@ -26,104 +27,14 @@
|
||||
color: var(--primary-text-color, #212121);
|
||||
height: 100vh;
|
||||
}
|
||||
#ha-launch-screen {
|
||||
font-family: ui-sans-serif, system-ui, sans-serif;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
background-color: var(--primary-background-color, #fafafa);
|
||||
z-index: 100;
|
||||
transition: opacity var(--ha-animation-duration-normal, 250ms) ease-out;
|
||||
}
|
||||
#ha-launch-screen.removing {
|
||||
opacity: 0;
|
||||
}
|
||||
@keyframes launch-lockup-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
#ha-launch-screen .ha-lockup {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
animation: launch-lockup-in var(--ha-animation-duration-normal, 250ms) ease-out both;
|
||||
}
|
||||
#ha-launch-screen-info-box > *,
|
||||
#ha-launch-screen .ohf-logo {
|
||||
animation: launch-lockup-in var(--ha-animation-duration-normal, 250ms) ease-out both;
|
||||
}
|
||||
#ha-launch-screen .ha-logo {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
#ha-launch-screen .ha-launch-screen-spacer-top {
|
||||
flex: 1;
|
||||
margin-top: calc( 2 * max(var(--safe-area-inset-top, 0px), 48px) + 46px );
|
||||
padding-top: 48px;
|
||||
}
|
||||
#ha-launch-screen .ha-launch-screen-spacer-bottom {
|
||||
flex: 1;
|
||||
padding-top: 16px;
|
||||
}
|
||||
.ohf-logo {
|
||||
margin: max(var(--safe-area-inset-bottom, 0px), 48px) 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
opacity: .66;
|
||||
}
|
||||
.ohf-logo span {
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.ohf-logo picture {
|
||||
display: flex;
|
||||
}
|
||||
.ohf-logo img {
|
||||
width: 237px;
|
||||
aspect-ratio: 237 / 24;
|
||||
height: auto;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html {
|
||||
background-color: var(--primary-background-color, #111111);
|
||||
color: var(--primary-text-color, #e1e1e1);
|
||||
}
|
||||
/* body selector to avoid minification causing bad jinja2 */
|
||||
body #ha-launch-screen {
|
||||
background-color: var(--primary-background-color, #111111);
|
||||
}
|
||||
}
|
||||
@media (max-height: 560px) {
|
||||
/* body selector to avoid minification causing bad jinja2 */
|
||||
body #ha-launch-screen .ha-launch-screen-spacer-top {
|
||||
margin-top: 24px;
|
||||
padding-top: 24px;
|
||||
}
|
||||
body #ha-launch-screen .ha-launch-screen-spacer-bottom {
|
||||
padding-top: 16px;
|
||||
}
|
||||
.ohf-logo {
|
||||
margin-block: 24px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<%= renderTemplate("_style_launch_screen.html.template") %>
|
||||
</head>
|
||||
<body>
|
||||
<div id="ha-launch-screen">
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<title>Home Assistant</title>
|
||||
<%= renderTemplate("_header.html.template") %>
|
||||
<%= renderTemplate("_meta_viewport.html.template") %>
|
||||
<%= renderTemplate("_style_base.html.template") %>
|
||||
<style>
|
||||
html {
|
||||
|
||||
@@ -639,7 +639,16 @@ export default class HaAutomationActionRow extends LitElement {
|
||||
${this._renderOverflowLabel(
|
||||
this.hass.localize(
|
||||
`ui.panel.config.automation.editor.edit_${!this._yamlMode ? "yaml" : "ui"}`
|
||||
)
|
||||
),
|
||||
this._selected
|
||||
? html`<span class="shortcut">
|
||||
<span>${renderCtrlOrCmd(this.hass.localize)}</span>
|
||||
<span>+</span>
|
||||
<span>Shift</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>
|
||||
</span>`
|
||||
: undefined
|
||||
)}
|
||||
</ha-dropdown-item>
|
||||
|
||||
|
||||
@@ -404,7 +404,16 @@ export default class HaAutomationConditionRow extends LitElement {
|
||||
${this._renderOverflowLabel(
|
||||
this.hass.localize(
|
||||
`ui.panel.config.automation.editor.edit_${!this._yamlMode ? "yaml" : "ui"}`
|
||||
)
|
||||
),
|
||||
this._selected
|
||||
? html`<span class="shortcut">
|
||||
<span>${renderCtrlOrCmd(this.hass.localize)}</span>
|
||||
<span>+</span>
|
||||
<span>Shift</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>
|
||||
</span>`
|
||||
: undefined
|
||||
)}
|
||||
</ha-dropdown-item>
|
||||
|
||||
|
||||
@@ -328,7 +328,16 @@ export default class HaAutomationOptionRow extends LitElement {
|
||||
${this._renderOverflowLabel(
|
||||
this.hass.localize(
|
||||
`ui.panel.config.automation.editor.edit_${!this._yamlMode ? "yaml" : "ui"}`
|
||||
)
|
||||
),
|
||||
this._selected
|
||||
? html`<span class="shortcut">
|
||||
<span>${renderCtrlOrCmd(this.hass.localize)}</span>
|
||||
<span>+</span>
|
||||
<span>Shift</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>
|
||||
</span>`
|
||||
: undefined
|
||||
)}
|
||||
</ha-dropdown-item>
|
||||
|
||||
|
||||
@@ -310,7 +310,17 @@ export default class HaAutomationSidebarAction extends LitElement {
|
||||
${this.hass.localize(
|
||||
`ui.panel.config.automation.editor.edit_${!this.yamlMode ? "yaml" : "ui"}`
|
||||
)}
|
||||
<span class="shortcut-placeholder ${isMac ? "mac" : ""}"></span>
|
||||
${
|
||||
!this.narrow
|
||||
? html`<span class="shortcut">
|
||||
<span>${renderCtrlOrCmd(this.hass.localize)}</span>
|
||||
<span>+</span>
|
||||
<span>Shift</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>
|
||||
</span>`
|
||||
: nothing
|
||||
}
|
||||
</div>
|
||||
</ha-dropdown-item>
|
||||
|
||||
|
||||
@@ -286,7 +286,17 @@ export default class HaAutomationSidebarCondition extends LitElement {
|
||||
${this.hass.localize(
|
||||
`ui.panel.config.automation.editor.edit_${!this.yamlMode ? "yaml" : "ui"}`
|
||||
)}
|
||||
<span class="shortcut-placeholder ${isMac ? "mac" : ""}"></span>
|
||||
${
|
||||
!this.narrow
|
||||
? html`<span class="shortcut">
|
||||
<span>${renderCtrlOrCmd(this.hass.localize)}</span>
|
||||
<span>+</span>
|
||||
<span>Shift</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>
|
||||
</span>`
|
||||
: nothing
|
||||
}
|
||||
</div>
|
||||
</ha-dropdown-item>
|
||||
|
||||
|
||||
@@ -153,9 +153,17 @@ export default class HaAutomationSidebarOption extends LitElement {
|
||||
${this.hass.localize(
|
||||
`ui.panel.config.automation.editor.edit_${!this.yamlMode ? "yaml" : "ui"}`
|
||||
)}
|
||||
<span
|
||||
class="shortcut-placeholder ${isMac ? "mac" : ""}"
|
||||
></span>
|
||||
${
|
||||
!this.narrow
|
||||
? html`<span class="shortcut">
|
||||
<span>${renderCtrlOrCmd(this.hass.localize)}</span>
|
||||
<span>+</span>
|
||||
<span>Shift</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>
|
||||
</span>`
|
||||
: nothing
|
||||
}
|
||||
</div>
|
||||
</ha-dropdown-item>
|
||||
<wa-divider slot="menu-items"></wa-divider>
|
||||
|
||||
+13
-4
@@ -8,10 +8,9 @@ import type { LocalizeKeys } from "../../../../common/translations/localize";
|
||||
import "../../../../components/ha-dropdown-item";
|
||||
import type { ScriptFieldSidebarConfig } from "../../../../data/automation";
|
||||
import type { HomeAssistant } from "../../../../types";
|
||||
import { isMac } from "../../../../util/is_mac";
|
||||
import "../../script/ha-script-field-selector-editor";
|
||||
import type HaAutomationConditionEditor from "../action/ha-automation-action-editor";
|
||||
import { sidebarEditorStyles } from "../styles";
|
||||
import { overflowStyles, sidebarEditorStyles } from "../styles";
|
||||
import "./ha-automation-sidebar-card";
|
||||
import type { HaDropdownSelectEvent } from "../../../../components/ha-dropdown";
|
||||
import { renderCtrlOrCmd } from "../../../../common/keyboard/ctrl-or-cmd";
|
||||
@@ -80,7 +79,17 @@ export default class HaAutomationSidebarScriptFieldSelector extends LitElement {
|
||||
${this.hass.localize(
|
||||
`ui.panel.config.automation.editor.edit_${!this.yamlMode ? "yaml" : "ui"}`
|
||||
)}
|
||||
<span class="shortcut-placeholder ${isMac ? "mac" : ""}"></span>
|
||||
${
|
||||
!this.narrow
|
||||
? html`<span class="shortcut">
|
||||
<span>${renderCtrlOrCmd(this.hass.localize)}</span>
|
||||
<span>+</span>
|
||||
<span>Shift</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>
|
||||
</span>`
|
||||
: nothing
|
||||
}
|
||||
</div>
|
||||
</ha-dropdown-item>
|
||||
<ha-dropdown-item
|
||||
@@ -188,7 +197,7 @@ export default class HaAutomationSidebarScriptFieldSelector extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
static styles = sidebarEditorStyles;
|
||||
static styles = [sidebarEditorStyles, overflowStyles];
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
||||
@@ -85,7 +85,17 @@ export default class HaAutomationSidebarScriptField extends LitElement {
|
||||
${this.hass.localize(
|
||||
`ui.panel.config.automation.editor.edit_${!this.yamlMode ? "yaml" : "ui"}`
|
||||
)}
|
||||
<span class="shortcut-placeholder ${isMac ? "mac" : ""}"></span>
|
||||
${
|
||||
!this.narrow
|
||||
? html`<span class="shortcut">
|
||||
<span>${renderCtrlOrCmd(this.hass.localize)}</span>
|
||||
<span>+</span>
|
||||
<span>Shift</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>
|
||||
</span>`
|
||||
: nothing
|
||||
}
|
||||
</div>
|
||||
</ha-dropdown-item>
|
||||
<ha-dropdown-item
|
||||
|
||||
@@ -290,7 +290,17 @@ export default class HaAutomationSidebarTrigger extends LitElement {
|
||||
${this.hass.localize(
|
||||
`ui.panel.config.automation.editor.edit_${!this.yamlMode ? "yaml" : "ui"}`
|
||||
)}
|
||||
<span class="shortcut-placeholder ${isMac ? "mac" : ""}"></span>
|
||||
${
|
||||
!this.narrow
|
||||
? html`<span class="shortcut">
|
||||
<span>${renderCtrlOrCmd(this.hass.localize)}</span>
|
||||
<span>+</span>
|
||||
<span>Shift</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>
|
||||
</span>`
|
||||
: nothing
|
||||
}
|
||||
</div>
|
||||
</ha-dropdown-item>
|
||||
<wa-divider slot="menu-items"></wa-divider>
|
||||
|
||||
@@ -555,7 +555,16 @@ export default class HaAutomationTriggerRow extends LitElement {
|
||||
${this._renderOverflowLabel(
|
||||
this.hass.localize(
|
||||
`ui.panel.config.automation.editor.edit_${!yamlMode ? "yaml" : "ui"}`
|
||||
)
|
||||
),
|
||||
this._selected
|
||||
? html`<span class="shortcut">
|
||||
<span>${renderCtrlOrCmd(this.hass.localize)}</span>
|
||||
<span>+</span>
|
||||
<span>Shift</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>
|
||||
</span>`
|
||||
: undefined
|
||||
)}
|
||||
</ha-dropdown-item>
|
||||
|
||||
|
||||
@@ -1591,9 +1591,17 @@ export class EntityRegistrySettingsEditor extends LitElement {
|
||||
}
|
||||
|
||||
private async _restoreEntityId(): Promise<void> {
|
||||
const entityIds = await getAutomaticEntityIds(this.hass, [
|
||||
this._origEntityId,
|
||||
]);
|
||||
// use the unsaved name and area, as they are part of the entity ID
|
||||
const entityIds = await getAutomaticEntityIds(
|
||||
this.hass,
|
||||
[this._origEntityId],
|
||||
{
|
||||
[this._origEntityId]: {
|
||||
name: this._computeName(),
|
||||
area_id: this._computeAreaId(),
|
||||
},
|
||||
}
|
||||
);
|
||||
this._entityId = entityIds[this._origEntityId] || this._origEntityId;
|
||||
}
|
||||
|
||||
|
||||
@@ -299,6 +299,11 @@ export class MatterConfigDashboard extends LitElement {
|
||||
max-width: var(--ha-content-width-narrow);
|
||||
}
|
||||
|
||||
ha-list-item-button::part(headline),
|
||||
ha-list-item-button::part(supporting-text) {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.nav-card {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -320,6 +320,11 @@ class MatterOptionsPage extends LitElement {
|
||||
max-width: var(--ha-content-width-narrow);
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
ha-row-item::part(headline),
|
||||
ha-row-item::part(supporting-text) {
|
||||
white-space: normal;
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -440,6 +440,10 @@ export class MQTTConfigPanel extends LitElement {
|
||||
margin: 0 auto var(--ha-space-4);
|
||||
max-width: var(--ha-content-width-narrow);
|
||||
}
|
||||
ha-list-item-button::part(headline),
|
||||
ha-list-item-button::part(supporting-text) {
|
||||
white-space: normal;
|
||||
}
|
||||
ha-select {
|
||||
width: 96px;
|
||||
margin: 0 8px;
|
||||
|
||||
@@ -523,6 +523,13 @@ class ZHAConfigDashboard extends LitElement {
|
||||
max-width: var(--ha-content-width-narrow);
|
||||
}
|
||||
|
||||
ha-list-item-base::part(headline),
|
||||
ha-list-item-base::part(supporting-text),
|
||||
ha-list-item-button::part(headline),
|
||||
ha-list-item-button::part(supporting-text) {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.nav-card .card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -463,6 +463,11 @@ class ZHAOptionsPage extends LitElement {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
ha-list-item-base::part(headline),
|
||||
ha-list-item-base::part(supporting-text) {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
ha-select,
|
||||
ha-input {
|
||||
min-width: 210px;
|
||||
|
||||
+5
@@ -104,6 +104,11 @@ class ZWaveJSControllerStatistics extends SubscribeMixin(LitElement) {
|
||||
max-width: var(--ha-content-width-narrow);
|
||||
}
|
||||
|
||||
ha-list-item-base::part(headline),
|
||||
ha-list-item-base::part(supporting-text) {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
span[slot="end"] {
|
||||
font-size: 0.95em;
|
||||
color: var(--primary-text-color);
|
||||
|
||||
+4
@@ -22,6 +22,7 @@ import "../../../../../components/ha-icon-button";
|
||||
import "../../../../../components/input/ha-input-search";
|
||||
import type { HaInputSearch } from "../../../../../components/input/ha-input-search";
|
||||
import type { DeviceRegistryEntry } from "../../../../../data/device/device_registry";
|
||||
import { isChildDevice } from "../../../../../data/device/device_registry";
|
||||
import type {
|
||||
RssiError,
|
||||
ZWaveJSNodeStatisticsUpdatedMessage,
|
||||
@@ -82,6 +83,9 @@ export class ZWaveJSNetworkVisualization extends SubscribeMixin(LitElement) {
|
||||
if (!device.config_entries.includes(this.configEntryId)) {
|
||||
return;
|
||||
}
|
||||
if (isChildDevice(device)) {
|
||||
return;
|
||||
}
|
||||
const nodeId = getNodeIdFromDevice(device);
|
||||
if (nodeId === undefined) {
|
||||
return;
|
||||
|
||||
@@ -149,6 +149,11 @@ class ZWaveJSOptionsPage extends LitElement {
|
||||
max-width: var(--ha-content-width-narrow);
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
ha-list-item-base::part(headline),
|
||||
ha-list-item-base::part(supporting-text) {
|
||||
white-space: normal;
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import type { Field } from "../../../data/script";
|
||||
import { SELECTOR_SELECTOR_BUILDING_BLOCKS } from "../../../data/selector/selector_selector";
|
||||
import { showPromptDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||
import type { HomeAssistant } from "../../../types";
|
||||
import { isMac } from "../../../util/is_mac";
|
||||
import { showEditorToast } from "../automation/editor-toast";
|
||||
import { scrollRowIntoView } from "../automation/scroll-row-into-view";
|
||||
import { indentStyle, overflowStyles, rowStyles } from "../automation/styles";
|
||||
@@ -116,7 +115,17 @@ export default class HaScriptFieldRow extends LitElement {
|
||||
${this.hass.localize(
|
||||
`ui.panel.config.automation.editor.edit_${!this._yamlMode ? "yaml" : "ui"}`
|
||||
)}
|
||||
<span class="shortcut-placeholder ${isMac ? "mac" : ""}"></span>
|
||||
${
|
||||
!this.narrow && this._selected
|
||||
? html`<span class="shortcut">
|
||||
<span>${renderCtrlOrCmd(this.hass.localize)}</span>
|
||||
<span>+</span>
|
||||
<span>Shift</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>
|
||||
</span>`
|
||||
: nothing
|
||||
}
|
||||
</div>
|
||||
</ha-dropdown-item>
|
||||
<ha-dropdown-item
|
||||
@@ -221,9 +230,19 @@ export default class HaScriptFieldRow extends LitElement {
|
||||
${this.hass.localize(
|
||||
`ui.panel.config.automation.editor.edit_${!this._yamlMode ? "yaml" : "ui"}`
|
||||
)}
|
||||
<span
|
||||
class="shortcut-placeholder ${isMac ? "mac" : ""}"
|
||||
></span>
|
||||
${
|
||||
!this.narrow && this._selectorRowSelected
|
||||
? html`<span class="shortcut">
|
||||
<span
|
||||
>${renderCtrlOrCmd(this.hass.localize)}</span
|
||||
>
|
||||
<span>+</span>
|
||||
<span>Shift</span>
|
||||
<span>+</span>
|
||||
<span>Y</span>
|
||||
</span>`
|
||||
: nothing
|
||||
}
|
||||
</div>
|
||||
</ha-dropdown-item>
|
||||
<ha-dropdown-item
|
||||
|
||||
@@ -321,8 +321,9 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
||||
const hourly = forecastData?.type === "hourly";
|
||||
const dayNight = forecastData?.type === "twice_daily";
|
||||
const compactForecast = this._sizeController.value?.height === "short";
|
||||
const showInlineDayLabel = compactForecast && (hourly || dayNight);
|
||||
const showDayHeader = !compactForecast && (hourly || dayNight);
|
||||
// Hourly forecasts skip day names, because 0:00 already marks a new day.
|
||||
const showInlineDayLabel = compactForecast && dayNight;
|
||||
const showDayHeader = !compactForecast && dayNight;
|
||||
const todayKey = this._dayKeyFromDate(new Date());
|
||||
|
||||
const weatherStateIcon = getWeatherStateIcon(stateObj.state, this);
|
||||
@@ -531,8 +532,6 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
||||
item,
|
||||
index,
|
||||
forecast,
|
||||
dayNight,
|
||||
hourly,
|
||||
todayKey
|
||||
)
|
||||
: nothing
|
||||
@@ -600,14 +599,8 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
||||
item: ForecastAttribute,
|
||||
index: number,
|
||||
forecast: ForecastAttribute[],
|
||||
dayNight: boolean,
|
||||
hourly: boolean,
|
||||
todayKey: string
|
||||
) {
|
||||
if (!dayNight && !hourly) {
|
||||
return nothing;
|
||||
}
|
||||
|
||||
const previousItem = forecast[index - 1];
|
||||
const itemDayKey = this._dayKeyForForecast(item);
|
||||
const dayChanged =
|
||||
|
||||
@@ -5,6 +5,7 @@ import { css, html, LitElement, nothing } from "lit";
|
||||
import { customElement, property, query, state } from "lit/decorators";
|
||||
import type { HASSDomEvent } from "../../../../common/dom/fire_event";
|
||||
import { fireEvent } from "../../../../common/dom/fire_event";
|
||||
import { ctrlOrCmdLabel } from "../../../../common/keyboard/ctrl-or-cmd";
|
||||
import { fireEntityRelatedContext } from "../../../../data/context";
|
||||
import { computeRTLDirection } from "../../../../common/util/compute_rtl";
|
||||
import { stripDefaults } from "../../../../common/util/strip-defaults";
|
||||
@@ -14,6 +15,7 @@ import "../../../../components/ha-dialog-footer";
|
||||
import "../../../../components/ha-dialog";
|
||||
import "../../../../components/ha-icon-button";
|
||||
import "../../../../components/ha-spinner";
|
||||
import "../../../../components/ha-tooltip";
|
||||
import type { LovelaceBadgeConfig } from "../../../../data/lovelace/config/badge";
|
||||
import {
|
||||
getCustomBadgeEntry,
|
||||
@@ -265,6 +267,7 @@ export class HuiDialogEditBadge
|
||||
@click=${this._toggleMode}
|
||||
.disabled=${!this._guiModeAvailable}
|
||||
class="gui-mode-button"
|
||||
id="toggle-editor-mode"
|
||||
>
|
||||
${this.hass!.localize(
|
||||
!this._badgeEditorEl || this._GUImode
|
||||
@@ -272,6 +275,9 @@ export class HuiDialogEditBadge
|
||||
: "ui.panel.lovelace.editor.edit_badge.show_visual_editor"
|
||||
)}
|
||||
</ha-button>
|
||||
<ha-tooltip slot="secondaryAction" for="toggle-editor-mode">
|
||||
${ctrlOrCmdLabel(this.hass!.localize)}+Shift+Y
|
||||
</ha-tooltip>
|
||||
`
|
||||
: nothing
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import { customElement, property, query, state } from "lit/decorators";
|
||||
import memoizeOne from "memoize-one";
|
||||
import type { HASSDomEvent } from "../../../../common/dom/fire_event";
|
||||
import { fireEvent } from "../../../../common/dom/fire_event";
|
||||
import { ctrlOrCmdLabel } from "../../../../common/keyboard/ctrl-or-cmd";
|
||||
import {
|
||||
fireRelatedContext,
|
||||
type RelatedContextItem,
|
||||
@@ -18,6 +19,7 @@ import "../../../../components/ha-dialog";
|
||||
import "../../../../components/ha-dialog-footer";
|
||||
import "../../../../components/ha-icon-button";
|
||||
import "../../../../components/ha-spinner";
|
||||
import "../../../../components/ha-tooltip";
|
||||
import type { LovelaceCardConfig } from "../../../../data/lovelace/config/card";
|
||||
import type { LovelaceSectionConfig } from "../../../../data/lovelace/config/section";
|
||||
import {
|
||||
@@ -288,6 +290,7 @@ export class HuiDialogEditCard
|
||||
@click=${this._toggleMode}
|
||||
.disabled=${!this._guiModeAvailable}
|
||||
class="gui-mode-button"
|
||||
id="toggle-editor-mode"
|
||||
appearance="plain"
|
||||
>
|
||||
${this.hass!.localize(
|
||||
@@ -296,6 +299,9 @@ export class HuiDialogEditCard
|
||||
: "ui.panel.lovelace.editor.edit_card.show_visual_editor"
|
||||
)}
|
||||
</ha-button>
|
||||
<ha-tooltip slot="secondaryAction" for="toggle-editor-mode">
|
||||
${ctrlOrCmdLabel(this.hass!.localize)}+Shift+Y
|
||||
</ha-tooltip>
|
||||
`
|
||||
: ""
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import { cache } from "lit/directives/cache";
|
||||
import type { HASSDomEvent } from "../../../../common/dom/fire_event";
|
||||
import { storage } from "../../../../common/decorators/storage";
|
||||
import { fireEvent } from "../../../../common/dom/fire_event";
|
||||
import { ctrlOrCmdLabel } from "../../../../common/keyboard/ctrl-or-cmd";
|
||||
import { stopPropagation } from "../../../../common/dom/stop_propagation";
|
||||
import { withViewTransition } from "../../../../common/util/view-transition";
|
||||
import "../../../../components/ha-button";
|
||||
@@ -414,6 +415,7 @@ export class HuiDialogEditSection
|
||||
<ha-button
|
||||
slot="secondaryAction"
|
||||
class="gui-mode-button"
|
||||
id="toggle-editor-mode"
|
||||
appearance="plain"
|
||||
@click=${this._toggleMode}
|
||||
.disabled=${this._yamlMode && this._yamlError}
|
||||
@@ -424,6 +426,9 @@ export class HuiDialogEditSection
|
||||
: "ui.panel.lovelace.editor.edit_card.show_code_editor"
|
||||
)}
|
||||
</ha-button>
|
||||
<ha-tooltip slot="secondaryAction" for="toggle-editor-mode">
|
||||
${ctrlOrCmdLabel(this.hass.localize)}+Shift+Y
|
||||
</ha-tooltip>
|
||||
<ha-button
|
||||
slot="secondaryAction"
|
||||
appearance="plain"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Home Assistant</title>
|
||||
<%= renderTemplate("../../../../../src/html/_meta_viewport.html.template") %>
|
||||
<%= renderTemplate("../../../../../src/html/_style_base.html.template") %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in new issue
Block a user