remote-control: add /SESSION/OPEN and /SESSION/SAVE commands
This commit is contained in:
parent
23e1a1c793
commit
07201d8427
3 changed files with 32 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ var {updateWidget} = require('./editor/data-workers'),
|
|||
editor = require('./editor'),
|
||||
widgetManager = require('./managers/widgets'),
|
||||
stateManager = require('./managers/state'),
|
||||
sessionManager = require('./managers/session'),
|
||||
deepExtend = require('deep-extend'),
|
||||
notifications = require('./ui/notifications')
|
||||
|
||||
|
|
@ -231,6 +232,22 @@ var callbacks = {
|
|||
})
|
||||
|
||||
},
|
||||
'/SESSION/OPEN': function(args) {
|
||||
|
||||
if (!Array.isArray(args)) args = [args]
|
||||
|
||||
if (typeof args === 'string') sessionManager.requestOpen(args[0])
|
||||
|
||||
},
|
||||
'/SESSION/SAVE': function(args) {
|
||||
|
||||
if (!Array.isArray(args)) args = [args]
|
||||
|
||||
sessionManager.save(args[0])
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue