mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Device page: use different prompts for "device = enabled" & "device = disabled" cases (#24739)
* prompts for enabled & disabled devices * add different prompts for "device = enabled" & "device = disabled" * prettier * prettier * prettier * prettier * prettier * prettier
This commit is contained in:
parent
60010c82bd
commit
586a137037
@ -404,6 +404,10 @@ export class HaConfigDevicePage extends LitElement {
|
||||
|
||||
this._renderIntegrationInfo(device, integrations, deviceInfo);
|
||||
|
||||
const add_prompt = device.disabled_by
|
||||
? this.hass.localize("ui.panel.config.devices.add_prompt_disabled")
|
||||
: this.hass.localize("ui.panel.config.devices.add_prompt_enabled");
|
||||
|
||||
const automationCard = isComponentLoaded(this.hass, "automation")
|
||||
? html`
|
||||
<ha-card outlined>
|
||||
@ -484,6 +488,7 @@ export class HaConfigDevicePage extends LitElement {
|
||||
}`
|
||||
),
|
||||
})}
|
||||
${add_prompt}
|
||||
</div>
|
||||
`}
|
||||
</ha-card>
|
||||
@ -577,6 +582,7 @@ export class HaConfigDevicePage extends LitElement {
|
||||
),
|
||||
}
|
||||
)}
|
||||
${add_prompt}
|
||||
</div>
|
||||
`}
|
||||
</ha-card>
|
||||
@ -654,6 +660,7 @@ export class HaConfigDevicePage extends LitElement {
|
||||
}`
|
||||
),
|
||||
})}
|
||||
${add_prompt}
|
||||
</div>
|
||||
`}
|
||||
</ha-card>
|
||||
@ -1422,7 +1429,10 @@ export class HaConfigDevicePage extends LitElement {
|
||||
<span slot="header"
|
||||
>${this.hass.localize(
|
||||
"ui.panel.config.devices.confirm_rename_entity_wont_rename",
|
||||
{ deviceSlug: oldDeviceSlug, count: dialogNoRenames.length }
|
||||
{
|
||||
deviceSlug: oldDeviceSlug,
|
||||
count: dialogNoRenames.length,
|
||||
}
|
||||
)}</span
|
||||
>
|
||||
${dialogNoRenames}
|
||||
|
@ -4767,7 +4767,9 @@
|
||||
}
|
||||
},
|
||||
"devices": {
|
||||
"add_prompt": "No {name} have been added using this {type} yet. You can add one by pressing the + button above.",
|
||||
"add_prompt": "No {name} have been added using this {type} yet.",
|
||||
"add_prompt_enabled": "You can add one by pressing the + button above.",
|
||||
"add_prompt_disabled": "You can re-enable the device then add one by pressing the + button above.",
|
||||
"add_device": "Add device",
|
||||
"caption": "Devices",
|
||||
"description": "Manage configured devices",
|
||||
|
Loading…
x
Reference in New Issue
Block a user