Quellcode durchsuchen

Reverse guard for serial allowed (#19)

Paulus Schoutsen vor 4 Jahren
Ursprung
Commit
bcdcac1eab
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3 3
      src/install-button.ts

+ 3 - 3
src/install-button.ts

@@ -84,9 +84,9 @@ export class InstallButton extends HTMLElement {
 
     if (!InstallButton.isSupported || !InstallButton.isAllowed) {
       this.toggleAttribute("install-unsupported", true);
-      this.renderRoot.innerHTML = !InstallButton.isSupported
-        ? "<slot name='unsupported'>Your browser does not support installing things on ESP devices. Use Google Chrome or Microsoft Edge.</slot>"
-        : "<slot name='not-allowed'>You can only install ESP devices on HTTPS websites or on the localhost.</slot>";
+      this.renderRoot.innerHTML = !InstallButton.isAllowed
+        ? "<slot name='not-allowed'>You can only install ESP devices on HTTPS websites or on the localhost.</slot>"
+        : "<slot name='unsupported'>Your browser does not support installing things on ESP devices. Use Google Chrome or Microsoft Edge.</slot>";
       return;
     }