Fix WebUSB detection

This commit is contained in:
lights0123 2020-10-28 22:19:36 -04:00
parent d08aac0db1
commit d4d3b87405
No known key found for this signature in database
GPG key ID: 28F315322E37972F

View file

@ -109,6 +109,11 @@ function sleep(ms: number) {
export default class Home extends Vue {
selectedCalculator: string | null = null;
showHidden = false;
webUSB = true;
mounted() {
this.webUSB = !!(navigator as any).usb;
}
@Watch('$devices.hasEnumerated')
onEnumerated() {
@ -161,10 +166,6 @@ export default class Home extends Vue {
);
}
get webUSB() {
return process.client ? !!(navigator as any).usb : true;
}
installDrivers() {
open('https://lights0123.com/n-link/#windows');
}