hardware-example 1.1.15-alpha.0 → 1.1.16-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/index.ts +2 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "hardware-example",
|
|
3
3
|
"productName": "HardwareExample",
|
|
4
4
|
"executableName": "onekey-hardware-example",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.16-alpha.0",
|
|
6
6
|
"author": "OneKey",
|
|
7
7
|
"description": "End-to-end encrypted workspaces for teams",
|
|
8
8
|
"main": "dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"ts:check": "yarn tsc --noEmit"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@onekeyfe/hd-transport-electron": "1.1.
|
|
25
|
+
"@onekeyfe/hd-transport-electron": "1.1.16-alpha.0",
|
|
26
26
|
"@stoprocent/noble": "2.3.4",
|
|
27
27
|
"debug": "4.3.4",
|
|
28
28
|
"electron-is-dev": "^3.0.1",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"**/node-gyp": "^10.0.1",
|
|
46
46
|
"tmp": "0.2.4"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "5176cda0516c2c6112cb8e70ba5e7d6d7a8ebfdd"
|
|
49
49
|
}
|
package/src/index.ts
CHANGED
|
@@ -195,7 +195,8 @@ function createMainWindow() {
|
|
|
195
195
|
log.debug('WebUSB: select-usb-device 事件触发');
|
|
196
196
|
log.debug('WebUSB: 可用设备列表:', JSON.stringify(details.deviceList, null, 2));
|
|
197
197
|
|
|
198
|
-
//
|
|
198
|
+
// 阻止默认行为,以便我们可以自动选择设备
|
|
199
|
+
// 这是 Electron 的优势:不像浏览器必须显示弹窗,桌面应用可以自动化处理
|
|
199
200
|
event.preventDefault();
|
|
200
201
|
|
|
201
202
|
// 直接选择第一个设备
|