diff --git a/browser/css/style.scss b/browser/css/style.scss index be9da9e6..2000cb08 100644 --- a/browser/css/style.scss +++ b/browser/css/style.scss @@ -89,7 +89,9 @@ $scrollbar-margin:5px; input:focus::selection{ background:$color-accent; } - +input { + cursor: text; +} @@ -118,7 +120,7 @@ body { a.btn { background: $bg-button; - display: block; + display: block;border:1px solid $color-border; padding:10px; &:hover { background: $bg-button-hover; @@ -143,10 +145,9 @@ a.btn { box-shadow: 0 0 0 1px $color-border inset; } a { - padding-right:25px; + padding-right:35px; overflow: hidden; margin-top:10px; - box-shadow: 0 0 0 1px $color-border inset; position: relative; white-space: nowrap; text-overflow: ellipsis; @@ -156,6 +157,10 @@ a.btn { top:1px; bottom:1px; padding:9px; + color:$color-text-fade; + &:hover { + color:$color-text + } } } } @@ -220,7 +225,6 @@ a.btn { display:block; margin-bottom:15px; background:$bg-button; - border:1px solid $color-border; } .inspector { @@ -448,6 +452,81 @@ a { +.popup { + position: fixed; + top:0; + left:0; + right:0; + bottom:0; + padding:10%; + background:rgba(black,.5); + z-index:1000000; + .popup-title { + position: relative; + padding:10px; + background:$bg-button; + .closer { + position:absolute; + right:0px; + top:0; + padding:10px; + color:$color-text-fade; + cursor: pointer; + &:hover { + color:$color-text; + } + } + } + .popup-wrapper { + background:$color-fg; + height:100%; + width:100%; + position: relative; + overflow: hidden; + .popup-content { + height:100%; + width:100%; + padding:10px; + overflow-y:scroll; + white-space: normal; + } + } +} + +form { + label { + display: block; + padding-top:10px; + margin-bottom:10px; + } + .info { + color:$color-text-fade; + margin-bottom:10px; + } + input { + display:block; + margin-bottom:10px; + background:$color-bg; + font:inherit; + color:$color-text; + border:1px solid $color-border; + width:100%; + padding:10px; + &:focus { + box-shadow: 0 0 0 1px $color-accent; + } + } + .submit { + margin-top:30px; + } +} + + + + + + + @@ -639,33 +718,6 @@ a { - -/* STRIP (vertical fader) */ - -.fader-wrapper-outer { - padding-bottom:30px; - overflow:hidden; - height:100%; - width:100%; - position: relative; - input { - position:absolute; - bottom:0; - box-shadow: 0 0 1px 0 $color-border inset; - } -} -.fader-wrapper { - padding:20px 15px 20px 20px ; - overflow:hidden; - height:100%; - width:95px; - position: relative; -} -.fader{ - height:100%; -} - - /* XY */ .xy-wrapper { @@ -825,15 +877,10 @@ a { } - - - - - .fader-wrapper-outer { padding-bottom:30px; overflow:hidden; - // height:100%; + height:100%; position: relative; input { position:absolute; diff --git a/browser/js/app/callbacks.js b/browser/js/app/callbacks.js index 415fe754..9507eef7 100644 --- a/browser/js/app/callbacks.js +++ b/browser/js/app/callbacks.js @@ -19,7 +19,7 @@ ipc.on('load',function(preset){ ipc.on('listSessions',function(data){ for (i in data) { - $('#lobby .list').append('
'+config[i].info+'
\ + ') + form.append(html) + } + + var submit = $(''+icon('save')+' Save configuration') + + form.append(submit) + + popup = createPopup(icon('gear')+' Configuration panel',form) + + submit.click(function(e){ + e.preventDefault() + var data = form.serializeArray(), + newconfig = {} + + for (i in data) { + newconfig[data[i].name] = data[i].value + } + + writeConfig(newconfig) + + popup.close(); + + }) + + + +} diff --git a/main/config.json b/main/config.json index da26593a..1884d389 100644 --- a/main/config.json +++ b/main/config.json @@ -2,12 +2,12 @@ "presetPath": "/home/bordun/oscwork/oschtmlgui/presets/", "sessionPath": "/home/bordun/oscwork/oschtmlgui/sessions/", "recentSessions": [ - "/home/bordun/oscwork/oschtmlgui/sessions/demo.js", "/home/bordun/oscwork/oschtmlgui/sessions/knob.js", - "/home/bordun/oscwork/oschtmlgui/sessions/xy.js", - "/home/bordun/oscwork/oschtmlgui/sessions/sebkhachott.js", "/home/bordun/oscwork/oschtmlgui/sessions/demo-full.js", - "/home/bordun/oscwork/oschtmlgui/sessions/fadertest.js", - "/home/bordun/oscwork/oschtmlgui/sessions/monitorsjeannot.js" - ] + "/home/bordun/oscwork/oschtmlgui/sessions/demo.js", + "/home/bordun/oscwork/oschtmlgui/sessions/xy.js", + "/home/bordun/oscwork/oschtmlgui/sessions/fadertest.js" + ], + "oscInPort": "2222", + "syncTargets": "" } \ No newline at end of file diff --git a/main/main.js b/main/main.js index 47db0630..7ede80d4 100644 --- a/main/main.js +++ b/main/main.js @@ -27,8 +27,8 @@ var defaultConfig = { oscInPort:5555 } var editableConfig = { - syncTargets: "List of target host (ip:port pairs), separeted by spaces. Every OSC message sent by the app will be sent to these hosts too.", - oscInPort: "Port on which the app listens to synchronise with other apps." + syncTargets: "List of target hosts (ip:port pairs), separeted by spaces. Every OSC message sent by the app will be sent to these hosts too.", + oscInPort: "Port on which the app listens to synchronise with other apps. You'll need to restart the app for this change to take effect." } @@ -45,7 +45,18 @@ writeConfig = function(newconfig) { } readConfig = function(key) { - return config[key] || defaultConfig[key] + if (key!=undefined) { + return config[key] || defaultConfig[key] + } else { + var ret = {} + for (i in editableConfig) { + ret[i] = { + value:readConfig(i), + info:editableConfig[i] + } + } + return ret + } } @@ -97,8 +108,6 @@ app.on('ready', function() { var Menu = require('menu'); var MenuItem = require('menu-item'); - var menu = new Menu(); - var template = [ { label: 'View',