diff --git a/CHANGELOG.md b/CHANGELOG.md index 813a151f..df834e47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - misc - change noFocus client option behavior: the defalt client window now doesn't take the focus at all, even when a text input is clicked. + - colorize debug messages for in/out messages - scripting - add `setFocusable()` function to change the focusability of the window on the fly (allows reenabling focus temporarely to interact with a text widget using a dedicated toggle button for example) diff --git a/src/launcher/terminal.js b/src/launcher/terminal.js index 7b3931f4..4f94f5c5 100644 --- a/src/launcher/terminal.js +++ b/src/launcher/terminal.js @@ -2,6 +2,11 @@ var {ipcRenderer} = require('electron'), ansiHTML = require('ansi-html'), html = require('nanohtml') +ansiHTML.setColors({ + magenta: 'B48EAD', + cyan: '81A1C1', +}) + class Terminal { constructor(options) { diff --git a/src/scss/ui/launcher.scss b/src/scss/ui/launcher.scss index fe7bf79a..3dbb9fd8 100644 --- a/src/scss/ui/launcher.scss +++ b/src/scss/ui/launcher.scss @@ -171,7 +171,7 @@ osc-settings-checkbox, osc-settings-reset, osc-settings-file { cursor: auto; > div { - margin: 0 12rem 4rem; + margin: 0 12rem; } @@ -180,7 +180,9 @@ osc-settings-checkbox, osc-settings-reset, osc-settings-file { cursor: auto; white-space: pre-wrap; } - + .log span { + background: transparent!important + } .help { font-style: italic; color: var(--color-accent); diff --git a/src/server/midi.js b/src/server/midi.js index 5a8dbed2..d614f9fa 100644 --- a/src/server/midi.js +++ b/src/server/midi.js @@ -109,7 +109,13 @@ class MidiConverter { console.log(data) } } else if (name == 'debug') { - console.log('(DEBUG, MIDI) ' + data) + if (data.indexOf('in:') === 0) { + console.log('\x1b[36m(DEBUG, MIDI)', data, '\x1b[0m') + } else if (data.indexOf('out:') === 0) { + console.log('\x1b[35m(DEBUG, MIDI)', data, '\x1b[0m') + } else { + console.log('(DEBUG, MIDI) ' + data) + } } else if (name == 'osc') { instance.receiveOsc(data) } else if (name == 'error') { diff --git a/src/server/osc/index.js b/src/server/osc/index.js index 433328f2..7c2e7c04 100644 --- a/src/server/osc/index.js +++ b/src/server/osc/index.js @@ -118,7 +118,7 @@ class OscServer { } - if (debug) console.log('(DEBUG, OSC) Out: ',{address:data.address, args: data.args}, 'To: ' + data.host + ':' + data.port) + if (debug) console.log('\x1b[35m(DEBUG, OSC) Out: ',{address:data.address, args: data.args}, 'To: ' + data.host + ':' + data.port, '\x1b[0m') } @@ -137,7 +137,7 @@ class OscServer { ipc.send('receiveOsc', data, clientId) - if (debug) console.log('(DEBUG, OSC) In: ', {address:data.address, args: data.args}, 'From: ' + data.host + ':' + data.port) + if (debug) console.log('\x1b[36m(DEBUG, OSC) In: ', {address:data.address, args: data.args}, 'From: ' + data.host + ':' + data.port, '\x1b[0m') }