mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-08-03 19:41:28 +02:00
now using electron-store to save settings between launches
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const express = require("express");
|
||||
const { mediaInfo } = require("./mediaInfo");
|
||||
const settingsModule = require("./settings");
|
||||
const { store, settings } = require("./settings");
|
||||
const globalEvents = require("./../constants/globalEvents");
|
||||
const statuses = require("./../constants/statuses");
|
||||
|
||||
@@ -47,7 +47,7 @@ expressModule.run = function(mainWindow) {
|
||||
});
|
||||
});
|
||||
|
||||
expressApp.listen(settingsModule.settings.apiSettings.port, () => {});
|
||||
expressApp.listen(store.get(settings.apiSettings.port), () => {});
|
||||
};
|
||||
|
||||
module.exports = expressModule;
|
||||
|
@@ -1,12 +1,19 @@
|
||||
const settings = {
|
||||
notifications: true,
|
||||
api: true,
|
||||
apiSettings: {
|
||||
port: 47836,
|
||||
const Store = require("electron-store");
|
||||
const settings = require("./../constants/settings");
|
||||
|
||||
const store = new Store({
|
||||
defaults: {
|
||||
notifications: true,
|
||||
api: true,
|
||||
apiSettings: {
|
||||
port: 47836,
|
||||
},
|
||||
windowBounds: { width: 800, height: 600 },
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
const settingsModule = {
|
||||
store,
|
||||
settings,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user