Reverse guard for serial allowed (#19)

This commit is contained in:
Paulus Schoutsen 2021-06-15 13:34:24 -07:00 committed by GitHub
parent feaed1aed0
commit bcdcac1eab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}