Only show 'Visit device URL' if we have a url

This commit is contained in:
Paulus Schoutsen 2021-11-10 21:36:19 -08:00
parent 2155ad6439
commit 87c95de8f0

View File

@ -272,18 +272,22 @@ class EwtInstallDialog extends LitElement {
${showSetupLinks
? html`
<div class="dashboard-buttons">
<div>
<a
href=${this._client!.nextUrl}
class="has-button"
target="_blank"
@click=${() => {
this._state = "DASHBOARD";
}}
>
<ewt-button label="Visit Device"></ewt-button>
</a>
</div>
${this._client!.nextUrl === undefined
? ""
: html`
<div>
<a
href=${this._client!.nextUrl}
class="has-button"
target="_blank"
@click=${() => {
this._state = "DASHBOARD";
}}
>
<ewt-button label="Visit Device"></ewt-button>
</a>
</div>
`}
${!this._manifest.home_assistant_domain
? ""
: html`