mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 05:16:34 +00:00
Add dialog-box warning support (#7356)
This commit is contained in:
parent
3ee4c11a99
commit
a7ef8aba68
@ -70,6 +70,7 @@ class DialogBox extends LitElement {
|
|||||||
<p
|
<p
|
||||||
class=${classMap({
|
class=${classMap({
|
||||||
"no-bottom-padding": Boolean(this._params.prompt),
|
"no-bottom-padding": Boolean(this._params.prompt),
|
||||||
|
warning: Boolean(this._params.warning),
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
${this._params.text}
|
${this._params.text}
|
||||||
@ -180,6 +181,9 @@ class DialogBox extends LitElement {
|
|||||||
/* Place above other dialogs */
|
/* Place above other dialogs */
|
||||||
--dialog-z-index: 104;
|
--dialog-z-index: 104;
|
||||||
}
|
}
|
||||||
|
.warning {
|
||||||
|
color: var(--warning-color);
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ interface BaseDialogParams {
|
|||||||
confirmText?: string;
|
confirmText?: string;
|
||||||
text?: string | TemplateResult;
|
text?: string | TemplateResult;
|
||||||
title?: string;
|
title?: string;
|
||||||
|
warning?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AlertDialogParams extends BaseDialogParams {
|
export interface AlertDialogParams extends BaseDialogParams {
|
||||||
|
@ -574,6 +574,9 @@ export class HaConfigDevicePage extends LitElement {
|
|||||||
text: this.hass.localize(
|
text: this.hass.localize(
|
||||||
"ui.panel.config.devices.confirm_rename_entity_ids_warning"
|
"ui.panel.config.devices.confirm_rename_entity_ids_warning"
|
||||||
),
|
),
|
||||||
|
confirmText: this.hass.localize("ui.common.yes"),
|
||||||
|
dismissText: this.hass.localize("ui.common.no"),
|
||||||
|
warning: true,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const updateProms = entities.map((entity) => {
|
const updateProms = entities.map((entity) => {
|
||||||
|
@ -1648,8 +1648,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": "Scripts",
|
"scripts": "Scripts",
|
||||||
"scenes": "Scenes",
|
"scenes": "Scenes",
|
||||||
"confirm_rename_entity_ids": "Do you also want to rename the entity id's of your entities?",
|
"confirm_rename_entity_ids": "Do you also want to rename the entity IDs of your entities?",
|
||||||
"confirm_rename_entity_ids_warning": "This will not change any configuration (like automations, scripts, scenes, Lovelace) that is currently using these entities, you will have to update them yourself.",
|
"confirm_rename_entity_ids_warning": "This will not change any configuration (like automations, scripts, scenes, dashboards) that is currently using these entities! You will have to update them yourself to use the new entity IDs!",
|
||||||
"data_table": {
|
"data_table": {
|
||||||
"device": "Device",
|
"device": "Device",
|
||||||
"manufacturer": "Manufacturer",
|
"manufacturer": "Manufacturer",
|
||||||
@ -2378,7 +2378,7 @@
|
|||||||
"migrate": {
|
"migrate": {
|
||||||
"header": "Configuration Incompatible",
|
"header": "Configuration Incompatible",
|
||||||
"para_no_id": "This element doesn't have an ID. Please add an ID to this element in 'ui-lovelace.yaml'.",
|
"para_no_id": "This element doesn't have an ID. Please add an ID to this element in 'ui-lovelace.yaml'.",
|
||||||
"para_migrate": "Home Assistant can add ID's to all your cards and views automatically for you by pressing the 'Migrate configuration' button.",
|
"para_migrate": "Home Assistant can add IDs to all your cards and views automatically for you by pressing the 'Migrate configuration' button.",
|
||||||
"migrate": "Migrate configuration"
|
"migrate": "Migrate configuration"
|
||||||
},
|
},
|
||||||
"action-editor": {
|
"action-editor": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user