diff --git a/electron/index3.html b/electron/index3.html index 5c9ad20..92a9a44 100644 --- a/electron/index3.html +++ b/electron/index3.html @@ -150,10 +150,6 @@ loadJson.federation = {}; } - if(typeof loadJson.federation.disableInvites !== 'boolean') { - loadJson.federation.disableInvites = false; - } - if(!loadJson.secret) { loadJson.secret = crypto.randomBytes(Math.ceil(128/2)).toString('base64').slice(0,128); } @@ -702,7 +698,7 @@
Federation
\
\
\ - Federation allows you to sync files between mStream servers. To sync your files to another server, you can create a Federation Token through the Web UI. Federation Tokens allow the other server to download files without an account.\ + Federation allows you to sync files between mStream servers. To sync your files to another server, you can create a Invite Token through the Web UI\
\
\ \ @@ -712,45 +708,22 @@ \
\
\ - Federated directories will be downloaded here. Federation is disabled until this value is set\ + Federated directories will be downloaded here\
\
\
\ \ + Federation is disabled until this value is set\
\
\
\
\ - Clear\ -
\ - \ -
\ -
\ -
Access Controls
\ -
\ -
\ -
\ - Secret Key: {{secretKey}}\ -
\ -
\ - \ -
\ -
\ -
\ - Reset Security Key (Permanently disables all active tokens)\ + Clear (Disables Federation)\
\
\ \ \ ', - computed: { - secretKey: function() { - return `*****************${this.lJson.secret.slice(-6, -2)}`; - } - }, methods: { updateConfig: function() { fs.writeFileSync(configFile, JSON.stringify(loadJson), 'utf8'); @@ -759,29 +732,6 @@ loadJson.federation.folder = null; fs.writeFileSync(configFile, JSON.stringify(loadJson), 'utf8'); }, - resetSecurityKey: function(e) { - iziToast.question({ - timeout: 20000, - close: false, - overlayClose: true, - overlay: true, - displayMode: 'once', - id: 'question', - zindex: 99999, - title: "Reset Secret Key?", - position: 'center', - buttons: [ - ['', (instance, toast) => { - loadJson.secret = crypto.randomBytes(Math.ceil(256/2)).toString('base64').slice(0,256); - fs.writeFileSync(configFile, JSON.stringify(loadJson), 'utf8'); - instance.hide({ transitionOut: 'fadeOut' }, toast, 'button'); - }, true], - ['', (instance, toast) => { - instance.hide({ transitionOut: 'fadeOut' }, toast, 'button'); - }], - ] - }); - }, selectSyncPath: function(el) { dialog.showOpenDialog({properties: ['openDirectory']}, (selectedFile) => { if(selectedFile.length === 0){ diff --git a/modules/defaults.js b/modules/defaults.js index 4a92af3..b019733 100644 --- a/modules/defaults.js +++ b/modules/defaults.js @@ -21,6 +21,7 @@ exports.setup = function (program) { }); const schema = Joi.object({ + autoboot: Joi.boolean().optional(), port: Joi.number().default(3000), scanOptions: scanOptions.default(scanOptions.validate({}).value), noUpload: Joi.boolean().optional(), @@ -30,7 +31,8 @@ exports.setup = function (program) { ddns: Joi.object({ iniFile: Joi.string().default(path.join(__dirname, `../frp/frps.ini`)), email: Joi.string().optional(), - password: Joi.string().optional() + password: Joi.string().optional(), + tested: Joi.boolean().optional() }), secret: Joi.string().optional(), folders: Joi.object().pattern(