Create a settings UI doc, needs to take appropriate features from cfg.json
This commit is contained in:
parent
cef1c1fd93
commit
7ec1a08adf
|
@ -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);
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue