mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +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"
|
||||
></ha-icon-button>
|
||||
<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>
|
||||
<div class="content">
|
||||
<h1>${this.hass.localize("ui.panel.config.thread.my_network")}</h1>
|
||||
${networks.preferred
|
||||
? html`<h1>
|
||||
${this.hass.localize("ui.panel.config.thread.my_network")}
|
||||
</h1>
|
||||
${this._renderNetwork(networks.preferred)}`
|
||||
: ""}
|
||||
? this._renderNetwork(networks.preferred)
|
||||
: html`<ha-card>
|
||||
<div class="card-content no-routers">
|
||||
<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
|
||||
? html`<h3>
|
||||
${this.hass.localize("ui.panel.config.thread.other_networks")}
|
||||
@ -231,7 +245,7 @@ export class ThreadConfigPanel extends SubscribeMixin(LitElement) {
|
||||
margin: 0 auto;
|
||||
direction: ltr;
|
||||
}
|
||||
routers {
|
||||
.routers {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.no-routers {
|
||||
|
@ -3268,6 +3268,8 @@
|
||||
"thread": {
|
||||
"other_networks": "Other networks",
|
||||
"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",
|
||||
"border_routers": "{count} border {count, plural,\n one {router}\n other {routers}\n}",
|
||||
"managed_by_home_assistant": "Managed by Home Assistant",
|
||||
|
Loading…
x
Reference in New Issue
Block a user