Skip to content

Commit

Permalink
fix save preferences bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim Neunert committed May 22, 2024
1 parent 53d0673 commit 981007a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
5 changes: 3 additions & 2 deletions pyinstaller/electron/basic_auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ <h2>The server at '<span id="server">...</span>' is prompting for authorization<
const fs = require('fs')
const { ipcRenderer } = require('electron')
const helpers = require('./helpers')
const getAppSettings = helpers.getAppSettings
const appSettingsPath = helpers.appSettingsPath
const config = require('./config')
const getAppSettings = config.getAppSettings
const appSettingsPath = config.appSettingsPath

function cancel() {
window.close();
Expand Down
3 changes: 2 additions & 1 deletion pyinstaller/electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const downloadloc = require('./downloadloc')
const { downloadSpecterd, destroyProgressbar } = require('./src/download.js')
const getDownloadLocation = downloadloc.getDownloadLocation
const { startSpecterd, quitSpecterd } = require('./src/specterd.js')
const { getFileHash, getAppSettings, versionData, isDev, devFolder, isMac } = require('./src/helpers.js')
const { getFileHash, versionData, isDev, devFolder, isMac } = require('./src/helpers.js')
const { getAppSettings } = require('./src/config.js')
const { showError, updatingLoaderMsg, initMainWindow, loadUrl, initTray } = require('./src/uiHelpers.js')

// Quit again if there is no version-data in dev
Expand Down
3 changes: 1 addition & 2 deletions pyinstaller/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
{
"target": "dmg",
"arch": [
"x64",
"arm64"
"universal"
]
}
]
Expand Down
7 changes: 4 additions & 3 deletions pyinstaller/electron/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,11 @@ <h3 class="mt-8">Use a custom specterd file</h3>
const fs = require("fs");
const path = require("path");
const { ipcRenderer } = require("electron");
const helpers = require("./helpers");
const helpers = require("./src/helpers");
const config = require("./src/config");
const getFileHash = helpers.getFileHash;
const getAppSettings = helpers.getAppSettings;
const appSettingsPath = helpers.appSettingsPath;
const getAppSettings = config.getAppSettings;
const appSettingsPath = config.appSettingsPath;
const specterdDirPath = helpers.specterdDirPath;

function toggleAdvanced() {
Expand Down
1 change: 1 addition & 0 deletions pyinstaller/electron/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ module.exports = {
specterAppLogPath,
versionDataPath,
versionData,
getAppSettings,
isDev: isDev,
devFolder,
}
2 changes: 1 addition & 1 deletion pyinstaller/electron/src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const crypto = require('crypto')
const readLastLines = require('read-last-lines')
const isMac = process.platform === 'darwin'

const { versionData, appSettingsPath, specterAppLogPath } = require('./config.js')
const { versionData, specterAppLogPath } = require('./config.js')
const { logger } = require('./logging.js')

// Use different version-data.jsons
Expand Down

0 comments on commit 981007a

Please sign in to comment.