This commit is contained in:
2026-10-18 13:01:44 +07:00
parent b05d55b3fa
commit 0cd736f682
6 changed files with 110 additions and 15 deletions
+7 -2
View File
@@ -3,6 +3,7 @@ import {
dialog,
BrowserWindow,
ipcMain,
net,
protocol,
screen,
session,
@@ -289,7 +290,11 @@ app
diagnostics.record('settings-error')
hostNotice = error instanceof Error ? error.message : 'Не удалось восстановить окна'
}
const packages = new PackageStore(join(app.getPath('userData'), 'packages'))
const fetchNetwork: typeof fetch = (input, init) =>
net.fetch(input instanceof URL ? input.href : input, init)
const packages = new PackageStore(join(app.getPath('userData'), 'packages'), {
fetch: fetchNetwork,
})
await packages.initialize()
online = new Online(
join(app.getPath('userData'), 'connection'),
@@ -303,7 +308,7 @@ app
encrypt: (value) => safeStorage.encryptString(value),
decrypt: (value) => safeStorage.decryptString(value),
},
undefined,
fetchNetwork,
(failure) => diagnostics?.record('request-error', failure),
async () => {
const result = await dialog.showOpenDialog({