mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Add message when no preferred network (#15514)
This commit is contained in:
parent
fbf084bf00
commit
74bc6eeda8
@ -48,16 +48,30 @@ export class ThreadConfigPanel extends SubscribeMixin(LitElement) {
|
|||||||
slot="trigger"
|
slot="trigger"
|
||||||
></ha-icon-button>
|
></ha-icon-button>
|
||||||
<mwc-list-item @click=${this._addOTBR}
|
<mwc-list-item @click=${this._addOTBR}
|
||||||
>Add border router</mwc-list-item
|
>${this.hass.localize(
|
||||||
|
"ui.panel.config.thread.add_open_thread_border_router"
|
||||||
|
)}</mwc-list-item
|
||||||
>
|
>
|
||||||
</ha-button-menu>
|
</ha-button-menu>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
<h1>${this.hass.localize("ui.panel.config.thread.my_network")}</h1>
|
||||||
${networks.preferred
|
${networks.preferred
|
||||||
? html`<h1>
|
? this._renderNetwork(networks.preferred)
|
||||||
${this.hass.localize("ui.panel.config.thread.my_network")}
|
: html`<ha-card>
|
||||||
</h1>
|
<div class="card-content no-routers">
|
||||||
${this._renderNetwork(networks.preferred)}`
|
<h3>
|
||||||
: ""}
|
${this.hass.localize(
|
||||||
|
"ui.panel.config.thread.no_preferred_network"
|
||||||
|
)}
|
||||||
|
</h3>
|
||||||
|
<ha-svg-icon .path=${mdiDevices}></ha-svg-icon>
|
||||||
|
<mwc-button @click=${this._addOTBR}
|
||||||
|
>${this.hass.localize(
|
||||||
|
"ui.panel.config.thread.add_open_thread_border_router"
|
||||||
|
)}</mwc-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</ha-card>`}
|
||||||
${networks.networks.length
|
${networks.networks.length
|
||||||
? html`<h3>
|
? html`<h3>
|
||||||
${this.hass.localize("ui.panel.config.thread.other_networks")}
|
${this.hass.localize("ui.panel.config.thread.other_networks")}
|
||||||
@ -231,7 +245,7 @@ export class ThreadConfigPanel extends SubscribeMixin(LitElement) {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
}
|
}
|
||||||
routers {
|
.routers {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
.no-routers {
|
.no-routers {
|
||||||
|
@ -3268,6 +3268,8 @@
|
|||||||
"thread": {
|
"thread": {
|
||||||
"other_networks": "Other networks",
|
"other_networks": "Other networks",
|
||||||
"my_network": "My network",
|
"my_network": "My network",
|
||||||
|
"no_preferred_network": "You don't have a preferred network yet.",
|
||||||
|
"add_open_thread_border_router": "Add an OpenTread border router",
|
||||||
"no_border_routers": "No border routers found",
|
"no_border_routers": "No border routers found",
|
||||||
"border_routers": "{count} border {count, plural,\n one {router}\n other {routers}\n}",
|
"border_routers": "{count} border {count, plural,\n one {router}\n other {routers}\n}",
|
||||||
"managed_by_home_assistant": "Managed by Home Assistant",
|
"managed_by_home_assistant": "Managed by Home Assistant",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user