remote-control: add /SESSION/OPEN and /SESSION/SAVE commands
This commit is contained in:
parent
3dedf2cc74
commit
92f43fd87c
3 changed files with 32 additions and 0 deletions
|
|
@ -7,6 +7,9 @@
|
|||
- fullscreen: lack of support not detected on some ios devices
|
||||
- multixy: labels not hidden when `ephemeral` is `true`
|
||||
|
||||
- remote control
|
||||
- add `/SESSION/OPEN` and `/SESSION/SAVE` commands
|
||||
|
||||
## 1.5.1
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -169,3 +169,15 @@ Save the state of all widgets in the temporary slot.
|
|||
#### `/STATE/RECALL`
|
||||
|
||||
Reload saved state from the temporary slot.
|
||||
|
||||
----
|
||||
|
||||
#### `/SESSION/OPEN path.json`
|
||||
|
||||
Open session file `path.json`.
|
||||
|
||||
----
|
||||
|
||||
#### `/SESSION/SAVE path.json`
|
||||
|
||||
Save current session to `path.json`. If `path.json` is omitted, current session's path is used.
|
||||
|
|
|
|||
|
|
@ -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