mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 10:59:50 +00:00
Compare commits
2 Commits
update-hov
...
feature/sa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1305689875 | ||
|
|
98cecc1f08 |
@@ -25,8 +25,6 @@ export class HaAutomationRow extends LitElement {
|
|||||||
@property({ type: Boolean, reflect: true, attribute: "building-block" })
|
@property({ type: Boolean, reflect: true, attribute: "building-block" })
|
||||||
public buildingBlock = false;
|
public buildingBlock = false;
|
||||||
|
|
||||||
@property({ type: Boolean, reflect: true }) public highlight?: boolean;
|
|
||||||
|
|
||||||
@query(".row")
|
@query(".row")
|
||||||
private _rowElement?: HTMLDivElement;
|
private _rowElement?: HTMLDivElement;
|
||||||
|
|
||||||
@@ -170,20 +168,9 @@ export class HaAutomationRow extends LitElement {
|
|||||||
margin: 0 12px;
|
margin: 0 12px;
|
||||||
}
|
}
|
||||||
:host([sort-selected]) .row {
|
:host([sort-selected]) .row {
|
||||||
outline: solid;
|
box-shadow:
|
||||||
outline-color: rgba(var(--rgb-accent-color), 0.6);
|
0px 0px 8px 4px rgba(var(--rgb-accent-color), 0.8),
|
||||||
outline-offset: -2px;
|
inset 0px 2px 8px 4px rgba(var(--rgb-accent-color), 0.4);
|
||||||
outline-width: 2px;
|
|
||||||
background-color: rgba(var(--rgb-accent-color), 0.08);
|
|
||||||
}
|
|
||||||
.row:hover {
|
|
||||||
background-color: rgba(var(--rgb-primary-text-color), 0.04);
|
|
||||||
}
|
|
||||||
:host([highlight]) .row {
|
|
||||||
background-color: rgba(var(--rgb-primary-color), 0.08);
|
|
||||||
}
|
|
||||||
:host([highlight]) .row:hover {
|
|
||||||
background-color: rgba(var(--rgb-primary-color), 0.16);
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -393,13 +393,10 @@ export class HaItemDisplayEditor extends LitElement {
|
|||||||
--md-list-item-one-line-container-height: 48px;
|
--md-list-item-one-line-container-height: 48px;
|
||||||
}
|
}
|
||||||
ha-md-list-item.drag-selected {
|
ha-md-list-item.drag-selected {
|
||||||
--md-focus-ring-color: rgba(var(--rgb-accent-color), 0.6);
|
box-shadow:
|
||||||
|
0px 0px 8px 4px rgba(var(--rgb-accent-color), 0.8),
|
||||||
|
inset 0px 2px 8px 4px rgba(var(--rgb-accent-color), 0.4);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
outline: solid;
|
|
||||||
outline-color: rgba(var(--rgb-accent-color), 0.6);
|
|
||||||
outline-offset: -2px;
|
|
||||||
outline-width: 2px;
|
|
||||||
background-color: rgba(var(--rgb-accent-color), 0.08);
|
|
||||||
}
|
}
|
||||||
ha-md-list-item ha-icon-button {
|
ha-md-list-item ha-icon-button {
|
||||||
margin-left: -12px;
|
margin-left: -12px;
|
||||||
|
|||||||
@@ -707,7 +707,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.menu {
|
.menu {
|
||||||
height: var(--header-height);
|
height: calc(var(--header-height) + var(--safe-area-inset-top));
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
@@ -728,6 +728,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
|||||||
padding-left: calc(4px + var(--safe-area-inset-left));
|
padding-left: calc(4px + var(--safe-area-inset-left));
|
||||||
padding-inline-start: calc(4px + var(--safe-area-inset-left));
|
padding-inline-start: calc(4px + var(--safe-area-inset-left));
|
||||||
padding-inline-end: initial;
|
padding-inline-end: initial;
|
||||||
|
padding-top: var(--safe-area-inset-top);
|
||||||
}
|
}
|
||||||
:host([expanded]) .menu {
|
:host([expanded]) .menu {
|
||||||
width: calc(256px + var(--safe-area-inset-left));
|
width: calc(256px + var(--safe-area-inset-left));
|
||||||
@@ -755,8 +756,11 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
|||||||
|
|
||||||
ha-fade-in,
|
ha-fade-in,
|
||||||
ha-md-list {
|
ha-md-list {
|
||||||
|
padding: 4px 0;
|
||||||
|
box-sizing: border-box;
|
||||||
height: calc(
|
height: calc(
|
||||||
100% - var(--header-height) - 132px - var(--safe-area-inset-bottom)
|
100% - var(--header-height) - var(--safe-area-inset-top) -
|
||||||
|
132px - var(--safe-area-inset-bottom)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -767,8 +771,6 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ha-md-list {
|
ha-md-list {
|
||||||
padding: 4px 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
background: none;
|
background: none;
|
||||||
margin-left: var(--safe-area-inset-left);
|
margin-left: var(--safe-area-inset-left);
|
||||||
|
|||||||
@@ -98,8 +98,11 @@ class HassSubpage extends LitElement {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: var(--ha-font-size-xl);
|
font-size: var(--ha-font-size-xl);
|
||||||
height: var(--header-height);
|
height: calc(var(--header-height) + var(--safe-area-inset-top));
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
|
padding-top: max(8px, var(--safe-area-inset-top));
|
||||||
|
padding-right: max(12px, var(--safe-area-content-inset-right));
|
||||||
|
padding-left: max(12px, var(--safe-area-content-inset-left));
|
||||||
background-color: var(--app-header-background-color);
|
background-color: var(--app-header-background-color);
|
||||||
font-weight: var(--ha-font-weight-normal);
|
font-weight: var(--ha-font-weight-normal);
|
||||||
color: var(--app-header-text-color, white);
|
color: var(--app-header-text-color, white);
|
||||||
@@ -109,6 +112,9 @@ class HassSubpage extends LitElement {
|
|||||||
@media (max-width: 599px) {
|
@media (max-width: 599px) {
|
||||||
.toolbar {
|
.toolbar {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
padding-top: max(4px, var(--safe-area-inset-top));
|
||||||
|
padding-right: max(4px, var(--safe-area-inset-right));
|
||||||
|
padding-left: max(4px, var(--safe-area-inset-left));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.toolbar a {
|
.toolbar a {
|
||||||
@@ -140,7 +146,9 @@ class HassSubpage extends LitElement {
|
|||||||
.content {
|
.content {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 1px - var(--header-height));
|
height: calc(
|
||||||
|
100% - 1px - var(--header-height) - var(--safe-area-inset-top)
|
||||||
|
);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|||||||
@@ -151,8 +151,6 @@ export default class HaAutomationActionRow extends LitElement {
|
|||||||
|
|
||||||
@property({ type: Boolean }) public last?: boolean;
|
@property({ type: Boolean }) public last?: boolean;
|
||||||
|
|
||||||
@property({ type: Boolean }) public highlight?: boolean;
|
|
||||||
|
|
||||||
@property({ type: Boolean, attribute: "sidebar" })
|
@property({ type: Boolean, attribute: "sidebar" })
|
||||||
public optionsInSidebar = false;
|
public optionsInSidebar = false;
|
||||||
|
|
||||||
@@ -449,7 +447,6 @@ export default class HaAutomationActionRow extends LitElement {
|
|||||||
))}
|
))}
|
||||||
.collapsed=${this._collapsed}
|
.collapsed=${this._collapsed}
|
||||||
.selected=${this._selected}
|
.selected=${this._selected}
|
||||||
.highlight=${this.highlight}
|
|
||||||
@toggle-collapsed=${this._toggleCollapse}
|
@toggle-collapsed=${this._toggleCollapse}
|
||||||
.buildingBlock=${[
|
.buildingBlock=${[
|
||||||
...ACTION_BUILDING_BLOCKS,
|
...ACTION_BUILDING_BLOCKS,
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export default class HaAutomationAction extends LitElement {
|
|||||||
@move-up=${this._moveUp}
|
@move-up=${this._moveUp}
|
||||||
@value-changed=${this._actionChanged}
|
@value-changed=${this._actionChanged}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.highlight=${this.highlightedActions?.includes(action)}
|
?highlight=${this.highlightedActions?.includes(action)}
|
||||||
.optionsInSidebar=${this.optionsInSidebar}
|
.optionsInSidebar=${this.optionsInSidebar}
|
||||||
.sortSelected=${this._rowSortSelected === idx}
|
.sortSelected=${this._rowSortSelected === idx}
|
||||||
@stop-sort-selection=${this._stopSortSelection}
|
@stop-sort-selection=${this._stopSortSelection}
|
||||||
|
|||||||
@@ -116,8 +116,6 @@ export default class HaAutomationConditionRow extends LitElement {
|
|||||||
|
|
||||||
@property({ type: Boolean }) public narrow = false;
|
@property({ type: Boolean }) public narrow = false;
|
||||||
|
|
||||||
@property({ type: Boolean }) public highlight?: boolean;
|
|
||||||
|
|
||||||
@property({ type: Boolean, attribute: "sort-selected" })
|
@property({ type: Boolean, attribute: "sort-selected" })
|
||||||
public sortSelected = false;
|
public sortSelected = false;
|
||||||
|
|
||||||
@@ -357,7 +355,6 @@ export default class HaAutomationConditionRow extends LitElement {
|
|||||||
)}
|
)}
|
||||||
.collapsed=${this._collapsed}
|
.collapsed=${this._collapsed}
|
||||||
.selected=${this._selected}
|
.selected=${this._selected}
|
||||||
.highlight=${this.highlight}
|
|
||||||
@click=${this._toggleSidebar}
|
@click=${this._toggleSidebar}
|
||||||
@toggle-collapsed=${this._toggleCollapse}
|
@toggle-collapsed=${this._toggleCollapse}
|
||||||
.buildingBlock=${CONDITION_BUILDING_BLOCKS.includes(
|
.buildingBlock=${CONDITION_BUILDING_BLOCKS.includes(
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ export default class HaAutomationCondition extends LitElement {
|
|||||||
@move-up=${this._moveUp}
|
@move-up=${this._moveUp}
|
||||||
@value-changed=${this._conditionChanged}
|
@value-changed=${this._conditionChanged}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.highlight=${this.highlightedConditions?.includes(cond)}
|
?highlight=${this.highlightedConditions?.includes(cond)}
|
||||||
.optionsInSidebar=${this.optionsInSidebar}
|
.optionsInSidebar=${this.optionsInSidebar}
|
||||||
.sortSelected=${this._rowSortSelected === idx}
|
.sortSelected=${this._rowSortSelected === idx}
|
||||||
@stop-sort-selection=${this._stopSortSelection}
|
@stop-sort-selection=${this._stopSortSelection}
|
||||||
|
|||||||
@@ -37,6 +37,12 @@ export const rowStyles = css`
|
|||||||
ha-tooltip {
|
ha-tooltip {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
:host([highlight]) ha-card {
|
||||||
|
--shadow-default: var(--ha-card-box-shadow, 0 0 0 0 transparent);
|
||||||
|
--shadow-focus: 0 0 0 1px var(--state-inactive-color);
|
||||||
|
border-color: var(--state-inactive-color);
|
||||||
|
box-shadow: var(--shadow-default), var(--shadow-focus);
|
||||||
|
}
|
||||||
.hidden {
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,8 +113,6 @@ export default class HaAutomationTriggerRow extends LitElement {
|
|||||||
|
|
||||||
@property({ type: Boolean }) public last?: boolean;
|
@property({ type: Boolean }) public last?: boolean;
|
||||||
|
|
||||||
@property({ type: Boolean }) public highlight?: boolean;
|
|
||||||
|
|
||||||
@property({ type: Boolean, attribute: "sidebar" })
|
@property({ type: Boolean, attribute: "sidebar" })
|
||||||
public optionsInSidebar = false;
|
public optionsInSidebar = false;
|
||||||
|
|
||||||
@@ -351,7 +349,6 @@ export default class HaAutomationTriggerRow extends LitElement {
|
|||||||
this.trigger.enabled === false}
|
this.trigger.enabled === false}
|
||||||
@click=${this._toggleSidebar}
|
@click=${this._toggleSidebar}
|
||||||
.selected=${this._selected}
|
.selected=${this._selected}
|
||||||
.highlight=${this.highlight}
|
|
||||||
.sortSelected=${this.sortSelected}
|
.sortSelected=${this.sortSelected}
|
||||||
>${this._selected
|
>${this._selected
|
||||||
? "selected"
|
? "selected"
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ export default class HaAutomationTrigger extends LitElement {
|
|||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.disabled=${this.disabled}
|
.disabled=${this.disabled}
|
||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
.highlight=${this.highlightedTriggers?.includes(trg)}
|
?highlight=${this.highlightedTriggers?.includes(trg)}
|
||||||
.optionsInSidebar=${this.optionsInSidebar}
|
.optionsInSidebar=${this.optionsInSidebar}
|
||||||
.sortSelected=${this._rowSortSelected === idx}
|
.sortSelected=${this._rowSortSelected === idx}
|
||||||
@stop-sort-selection=${this._stopSortSelection}
|
@stop-sort-selection=${this._stopSortSelection}
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ export default class HaScriptFieldRow extends LitElement {
|
|||||||
|
|
||||||
@property({ type: Boolean }) public narrow = false;
|
@property({ type: Boolean }) public narrow = false;
|
||||||
|
|
||||||
@property({ type: Boolean }) public highlight?: boolean;
|
|
||||||
|
|
||||||
@state() private _yamlMode = false;
|
@state() private _yamlMode = false;
|
||||||
|
|
||||||
@state() private _selected = false;
|
@state() private _selected = false;
|
||||||
@@ -63,7 +61,6 @@ export default class HaScriptFieldRow extends LitElement {
|
|||||||
left-chevron
|
left-chevron
|
||||||
@toggle-collapsed=${this._toggleCollapse}
|
@toggle-collapsed=${this._toggleCollapse}
|
||||||
.collapsed=${this._collapsed}
|
.collapsed=${this._collapsed}
|
||||||
.highlight=${this.highlight}
|
|
||||||
>
|
>
|
||||||
<h3 slot="header">${this.key}</h3>
|
<h3 slot="header">${this.key}</h3>
|
||||||
|
|
||||||
@@ -86,7 +83,6 @@ export default class HaScriptFieldRow extends LitElement {
|
|||||||
.leftChevron=${SELECTOR_SELECTOR_BUILDING_BLOCKS.includes(
|
.leftChevron=${SELECTOR_SELECTOR_BUILDING_BLOCKS.includes(
|
||||||
Object.keys(this.field.selector)[0]
|
Object.keys(this.field.selector)[0]
|
||||||
)}
|
)}
|
||||||
.highlight=${this.highlight}
|
|
||||||
>
|
>
|
||||||
<h3 slot="header">
|
<h3 slot="header">
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
@@ -335,6 +331,13 @@ export default class HaScriptFieldRow extends LitElement {
|
|||||||
li[role="separator"] {
|
li[role="separator"] {
|
||||||
border-bottom-color: var(--divider-color);
|
border-bottom-color: var(--divider-color);
|
||||||
}
|
}
|
||||||
|
:host([highlight]) ha-card {
|
||||||
|
--shadow-default: var(--ha-card-box-shadow, 0 0 0 0 transparent);
|
||||||
|
--shadow-focus: 0 0 0 1px var(--state-inactive-color);
|
||||||
|
border-color: var(--state-inactive-color);
|
||||||
|
box-shadow: var(--shadow-default), var(--shadow-focus);
|
||||||
|
}
|
||||||
|
|
||||||
.selector-row {
|
.selector-row {
|
||||||
padding: 12px 0 16px 16px;
|
padding: 12px 0 16px 16px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default class HaScriptFields extends LitElement {
|
|||||||
.disabled=${this.disabled}
|
.disabled=${this.disabled}
|
||||||
@value-changed=${this._fieldChanged}
|
@value-changed=${this._fieldChanged}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.highlight=${this.highlightedFields?.[key] !== undefined}
|
?highlight=${this.highlightedFields?.[key] !== undefined}
|
||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
>
|
>
|
||||||
</ha-script-field-row>
|
</ha-script-field-row>
|
||||||
|
|||||||
Reference in New Issue
Block a user