files: use .json by default for sessions, .state for states
This commit is contained in:
parent
ef06202e5d
commit
be63fc4148
2 changed files with 16 additions and 10 deletions
13
CHANGELOG.md
13
CHANGELOG.md
|
|
@ -1,16 +1,23 @@
|
|||
# Changelog
|
||||
|
||||
## next
|
||||
## 0.20.0
|
||||
|
||||
- **breaking change**
|
||||
- sessions are now saved as `.json`files by default (the deprecated `.js` extension can still be opened).
|
||||
- states are now saved as `.state` files (the old `.preset` files can be renamed without any problem)
|
||||
- bug fixes
|
||||
- touch release event is properly dispatched in traversing containers (ie keyboards and matrices) (#94)
|
||||
- iOS / Safari compatibility improved
|
||||
- widgets
|
||||
- css `border-radius` support enhanced
|
||||
- css `color` applies locally while `--color-text` applies to children too
|
||||
- plot/text: new lines are properly printed
|
||||
- packaging
|
||||
- added `arm64` binaries
|
||||
|
||||
- iOS
|
||||
- compatibility improved (version 9.3 and above)
|
||||
- engine
|
||||
- electron 1.8.0 (chrome 59)
|
||||
|
||||
## 0.19.6
|
||||
|
||||
- hot fix
|
||||
|
|
|
|||
|
|
@ -21,9 +21,8 @@ module.exports = {
|
|||
|
||||
stateSave: function() {
|
||||
var state = JSON.stringify(module.exports.stateGet(),null,' ')
|
||||
var blob = new Blob([state],{type : 'application/x-javascript'})
|
||||
saveAs(blob, new Date().toJSON().slice(0,10)+'_'+new Date().toJSON().slice(11,16))
|
||||
down[0].dispatchEvent(event)
|
||||
var blob = new Blob([state],{type : 'application/json'})
|
||||
saveAs(blob, new Date().toJSON().slice(0,10)+'_'+new Date().toJSON().slice(11,16) + '.state')
|
||||
},
|
||||
|
||||
stateGet: function (){
|
||||
|
|
@ -42,7 +41,7 @@ module.exports = {
|
|||
},
|
||||
|
||||
stateLoad: function() {
|
||||
var prompt = $('<input type="file" accept=".preset"/>')
|
||||
var prompt = $('<input type="file" accept=".state"/>')
|
||||
prompt.click()
|
||||
prompt.on('change',function(e){
|
||||
var reader = new FileReader()
|
||||
|
|
@ -84,7 +83,7 @@ module.exports = {
|
|||
|
||||
sessionBrowse: function(){
|
||||
|
||||
var prompt = $('<input type="file" accept=".js"/>')
|
||||
var prompt = $('<input type="file" accept=".js, .json"/>')
|
||||
prompt.click()
|
||||
prompt.on('change',function(e){
|
||||
var reader = new FileReader(),
|
||||
|
|
@ -101,8 +100,8 @@ module.exports = {
|
|||
|
||||
sessionSave: function() {
|
||||
var sessionfile = JSON.stringify(SESSION,null,' ')
|
||||
var blob = new Blob([sessionfile],{type : 'application/x-javascript'})
|
||||
saveAs(blob, new Date().toJSON().slice(0,10)+'_'+new Date().toJSON().slice(11,16)+'.js')
|
||||
var blob = new Blob([sessionfile],{type : 'application/json'})
|
||||
alert(saveAs(blob, new Date().toJSON().slice(0,10)+'_'+new Date().toJSON().slice(11,16) + '.json'))
|
||||
ipc.send('savingSession')
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue