diff --git a/app/templates/custom-elements/connection-indicator.html b/app/templates/custom-elements/connection-indicator.html index 79830d9fa..92a7f8c5b 100644 --- a/app/templates/custom-elements/connection-indicator.html +++ b/app/templates/custom-elements/connection-indicator.html @@ -64,13 +64,17 @@
-
+

Your browser is connected to your TinyPilot device. -

-
+

+

Your browser is currently unable to connect to your TinyPilot device over the network. -

+

+

+ See “System” > “Networking” > “Status” for more + information. +

diff --git a/app/templates/custom-elements/wifi-dialog.html b/app/templates/custom-elements/wifi-dialog.html index 951141180..4af5c9101 100644 --- a/app/templates/custom-elements/wifi-dialog.html +++ b/app/templates/custom-elements/wifi-dialog.html @@ -135,6 +135,12 @@

Wi-Fi Credentials Saved

Your Wi-Fi credentials have been saved. When your TinyPilot device is in range of the wireless network, it will automatically try to connect to it.

+

+ To monitor the Wi-Fi connection status, open the "Network Status" dialog. +

+ @@ -200,6 +206,9 @@

Wi-Fi Credentials Removed

), enableButton: this.shadowRoot.querySelector("#enable-button"), disableButton: this.shadowRoot.querySelector("#disable-button"), + networkStatusButton: this.shadowRoot.querySelector( + "#network-status-button" + ), }; this.addEventListener("overlay-shown", () => this._initialize()); @@ -218,6 +227,16 @@

Wi-Fi Credentials Removed

this._elements.disableButton.addEventListener("click", () => { this._disable(); }); + this._elements.networkStatusButton.addEventListener("click", () => { + this.dispatchEvent(new DialogClosedEvent()); + const menuBar = document.getElementById("menu-bar"); + menuBar.dispatchEvent( + new CustomEvent("network-status-dialog-requested", { + bubbles: true, + composed: true, + }) + ); + }); this.shadowRoot.querySelectorAll(".close-button").forEach((el) => el.addEventListener("click", () => { this.dispatchEvent(new DialogClosedEvent());