main: read-only mode (disables, editor and session history)

This commit is contained in:
jean-emmanuel 2017-03-21 08:19:21 +01:00
parent f8b8a566c5
commit 0899f5bc5e
9 changed files with 73 additions and 23 deletions

View file

@ -16,6 +16,10 @@ module.exports = {
if (settings.read('theme')) ipc.send('applyStyle',settings.read('theme'),clientId)
if (settings.read('readOnly')) {
ipc.send('editorDisable',{permanent:true})
}
if (settings.read('newSession')) {
ipc.send('sessionNew')
return
@ -85,7 +89,7 @@ module.exports = {
if (data.path) {
this.sessionAddToHistory(data.path)
if (!settings.read('readOnly')) this.sessionAddToHistory(data.path)
fs.lstat(data.path, (err, stats)=>{