mirror of
https://github.com/lights0123/n-link.git
synced 2024-12-31 22:05:27 +00:00
Fix WebUSB detection
This commit is contained in:
parent
d08aac0db1
commit
d4d3b87405
|
@ -109,6 +109,11 @@ function sleep(ms: number) {
|
||||||
export default class Home extends Vue {
|
export default class Home extends Vue {
|
||||||
selectedCalculator: string | null = null;
|
selectedCalculator: string | null = null;
|
||||||
showHidden = false;
|
showHidden = false;
|
||||||
|
webUSB = true;
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.webUSB = !!(navigator as any).usb;
|
||||||
|
}
|
||||||
|
|
||||||
@Watch('$devices.hasEnumerated')
|
@Watch('$devices.hasEnumerated')
|
||||||
onEnumerated() {
|
onEnumerated() {
|
||||||
|
@ -161,10 +166,6 @@ export default class Home extends Vue {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
get webUSB() {
|
|
||||||
return process.client ? !!(navigator as any).usb : true;
|
|
||||||
}
|
|
||||||
|
|
||||||
installDrivers() {
|
installDrivers() {
|
||||||
open('https://lights0123.com/n-link/#windows');
|
open('https://lights0123.com/n-link/#windows');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue