parent
efde7a140b
commit
0d3aee26b9
2 changed files with 1 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
||||||
const {app, BrowserWindow} = require('electron')
|
const {app, BrowserWindow} = require('electron')
|
||||||
const e = require('express')
|
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
function createWindow () {
|
function createWindow () {
|
||||||
|
@ -44,7 +43,6 @@ function createWindow () {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
mainWindow.webContents.session.setDevicePermissionHandler((details) => {
|
mainWindow.webContents.session.setDevicePermissionHandler((details) => {
|
||||||
if (details.deviceType === 'usb' && details.origin === 'file://') {
|
if (details.deviceType === 'usb' && details.origin === 'file://') {
|
||||||
if (!grantedDeviceThroughPermHandler) {
|
if (!grantedDeviceThroughPermHandler) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
function getDeviceDetails(device) {
|
function getDeviceDetails(device) {
|
||||||
return grantedDevice.productName || `Unknown device ${grantedDevice.deviceId}`
|
return device.productName || `Unknown device ${device.deviceId}`
|
||||||
}
|
}
|
||||||
|
|
||||||
async function testIt() {
|
async function testIt() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue