This commit is contained in:
SrGooglo 2024-01-27 15:38:57 +01:00
parent b521d44f66
commit 01c7bf3803

View File

@ -81,21 +81,24 @@ class ElectronApp {
await setup() await setup()
// check if can decode google drive token // check if can decode google drive token
const googleDrive_enabled = !!await GoogleDriveAPI.readCredentials() const googleDrive_enabled = !!(await GoogleDriveAPI.readCredentials())
return { return {
pkg: pkg, pkg: pkg,
authorizedServices: { authorizedServices: {
drive: googleDrive_enabled, drive: googleDrive_enabled
}, }
} }
}, }
} }
events = { events = {
"open-runtime-path": () => { "open-runtime-path": () => {
return this.pkgManager.openRuntimePath() return this.pkgManager.openRuntimePath()
}, },
"open-dev-logs": () => {
return
}
} }
createWindow() { createWindow() {
@ -146,7 +149,7 @@ class ElectronApp {
} }
default: { default: {
return sendToRender("new:message", { return sendToRender("new:message", {
message: "Unrecognized URL action", message: "Unrecognized URL action"
}) })
} }
} }
@ -227,12 +230,10 @@ class ElectronApp {
ProtocolRegistry.register({ ProtocolRegistry.register({
protocol: protocolRegistryNamespace, protocol: protocolRegistryNamespace,
command: `"${process.execPath}" "${path.resolve( command: `"${process.execPath}" "${path.resolve(process.argv[1])}" $_URL_`,
process.argv[1]
)}" $_URL_`,
override: true, override: true,
script: true, script: true,
terminal: false, terminal: false
}) })
} else { } else {
if (!app.isDefaultProtocolClient(protocolRegistryNamespace)) { if (!app.isDefaultProtocolClient(protocolRegistryNamespace)) {
@ -264,4 +265,4 @@ class ElectronApp {
} }
} }
new ElectronApp().initialize() new ElectronApp().initialize()