Initial wiring of managing settings
This commit is contained in:
34
newton/settings-manager.js
Normal file
34
newton/settings-manager.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const { newtonFs } = require('./fs');
|
||||
|
||||
|
||||
let config = {};
|
||||
|
||||
|
||||
const loadsettings = () => {
|
||||
config = JSON.parse(
|
||||
newtonFs.getSettingsConfigData()
|
||||
);
|
||||
}
|
||||
|
||||
const getConfig = () => {
|
||||
return config;
|
||||
}
|
||||
|
||||
const saveConfig = () => {
|
||||
console.log(config);
|
||||
}
|
||||
|
||||
const getIconPath = () => {
|
||||
return newtonFs.getIconPath();
|
||||
}
|
||||
|
||||
|
||||
|
||||
module.exports = {
|
||||
settingsManager: {
|
||||
getIconPath: getIconPath,
|
||||
loadsettings: loadsettings,
|
||||
getConfig: getConfig,
|
||||
saveConfig: saveConfig,
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user