Create a settings UI doc, needs to take appropriate features from cfg.json

This commit is contained in:
mmcw-dev 2018-01-02 01:13:45 -05:00
parent cef1c1fd93
commit 7ec1a08adf
1 changed files with 19 additions and 0 deletions

19
app/lib/settings-ui.js Normal file
View File

@ -0,0 +1,19 @@
'use strict'
const os = require('os');
const fs = require('fs');
const settings = {};
settings.file = `${os.homedir()}/.mcopy/settings.json`;
settings.state = {
camera : {},
projector : {},
light : {}
}
settings.save = function () {
const str = JSON.stringify(settings.state, null, '\t');
fs.writeFile(settings.file, str, 'utf8', (err) => {
if (err) console.error(err);
});
}