main: read-only mode (disables, editor and session history)
This commit is contained in:
parent
f8b8a566c5
commit
0899f5bc5e
9 changed files with 73 additions and 23 deletions
|
|
@ -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)=>{
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue