- load last preset option
- fader handle helper & touch-active background color fix
This commit is contained in:
parent
d3c024194b
commit
955364a019
8 changed files with 279 additions and 70 deletions
File diff suppressed because one or more lines are too long
|
|
@ -118,6 +118,11 @@ init = function(session,callback) {
|
|||
click:loadState,
|
||||
icon:'folder-open'
|
||||
},
|
||||
{
|
||||
label:'Load last state',
|
||||
click:loadLastState,
|
||||
icon:'history'
|
||||
},
|
||||
{
|
||||
label:'Send all',
|
||||
click:sendState,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ getState = function (){
|
|||
loadState = function() {
|
||||
ipc.send('load')
|
||||
}
|
||||
loadLastState = function() {
|
||||
ipc.send('loadlast')
|
||||
}
|
||||
|
||||
sendState = function(){
|
||||
var data = getState().join('\n')
|
||||
|
|
|
|||
|
|
@ -573,6 +573,7 @@ form {
|
|||
box-shadow: 0 0 0 1px $color-bg inset;
|
||||
background:$bg-3d;
|
||||
background-clip:padding-box;
|
||||
-webkit-tap-highlight-color:transparent;
|
||||
|
||||
&:first-child {
|
||||
margin-left:6rem;
|
||||
|
|
@ -1021,18 +1022,6 @@ form {
|
|||
&.nogauge {
|
||||
.handle {
|
||||
background:none;
|
||||
&:before {
|
||||
content:"";
|
||||
position: absolute;
|
||||
top:-6rem;
|
||||
left:-2rem;
|
||||
height:8rem;
|
||||
width:8rem;
|
||||
background:$color-accent;
|
||||
border:none!important;
|
||||
border-radius: 100%!important;
|
||||
box-shadow: 0 0 0 5rem transparentize($color-accent,.8),0 0 2px 0 mix($color-text,$color-fg,2);
|
||||
}
|
||||
}
|
||||
}
|
||||
.handle {
|
||||
|
|
@ -1049,6 +1038,18 @@ form {
|
|||
&:active {
|
||||
cursor: -webkit-grabbing;
|
||||
}
|
||||
&:before {
|
||||
content:"";
|
||||
position: absolute;
|
||||
top:-6rem;
|
||||
left:-2rem;
|
||||
height:8rem;
|
||||
width:8rem;
|
||||
background:$color-accent;
|
||||
border:none!important;
|
||||
border-radius: 100%!important;
|
||||
box-shadow: 0 0 0 5rem transparentize($color-accent,.8),0 0 2px 0 mix($color-text,$color-fg,2);
|
||||
}
|
||||
&:after {
|
||||
content:"";
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -221,10 +221,10 @@ ipc.on('sendOsc', function (event,data) {
|
|||
|
||||
|
||||
ipc.on('save', function(event, data){
|
||||
dialog.showSaveDialog(window,{title:'Save current state to preset file',defaultPath:settings.read('presetPath'),filters: [ { name: 'OSC Preset', extensions: ['preset'] }]},function(file){
|
||||
dialog.showSaveDialog(window,{title:'Save current state to preset file',defaultPath:settings.read('presetPath').replace(settings.read('presetPath').split('/').pop(),''),filters: [ { name: 'OSC Preset', extensions: ['preset'] }]},function(file){
|
||||
|
||||
if (file==undefined) {return}
|
||||
settings.write('presetPath',file.replace(file.split('/').pop(),''))
|
||||
settings.write('presetPath',file)
|
||||
|
||||
if (file.indexOf('.preset')==-1){file+='.preset'}
|
||||
fs.writeFile(file,data, function (err, data) {
|
||||
|
|
@ -235,10 +235,10 @@ ipc.on('save', function(event, data){
|
|||
})
|
||||
|
||||
ipc.on('load', function(event, data){
|
||||
dialog.showOpenDialog(window,{title:'Load preset file',defaultPath:settings.read('presetPath'),filters: [ { name: 'OSC Preset', extensions: ['preset'] }]},function(file){
|
||||
dialog.showOpenDialog(window,{title:'Load preset file',defaultPath:settings.read('presetPath').replace(settings.read('presetPath').split('/').pop(),''),filters: [ { name: 'OSC Preset', extensions: ['preset'] }]},function(file){
|
||||
|
||||
if (file==undefined) {return}
|
||||
settings.write('presetPath',file[0].replace(file[0].split('/').pop(),''))
|
||||
settings.write('presetPath',file[0])
|
||||
|
||||
fs.readFile(file[0],'utf-8', function read(err, data) {
|
||||
if (err) throw err
|
||||
|
|
@ -247,6 +247,15 @@ ipc.on('load', function(event, data){
|
|||
})
|
||||
})
|
||||
|
||||
ipc.on('loadlast', function(event, data){
|
||||
if (!settings.read('presetPath')) {return}
|
||||
fs.readFile(settings.read('presetPath'),'utf-8', function read(err, data) {
|
||||
if (err) throw err
|
||||
renderProcess.send('load',data)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
ipc.on('fullscreen', function(event){
|
||||
window.setFullScreen(!window.isFullScreen())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue