aboutsummaryrefslogtreecommitdiffhomepage
path: root/desktop
diff options
context:
space:
mode:
authorneauoire <[email protected]>2019-12-11 20:34:28 -0500
committerneauoire <[email protected]>2019-12-11 20:34:28 -0500
commit768a0a61bc1fb1caac0d6d1ec65c48d37e1f4e74 (patch)
tree5a17a28bfb6499b283d0dfed1de1125de1bd1bb0 /desktop
parent99f82ab0b64666e6a222d5ecf3eebf60f2be9005 (diff)
downloadOrca-768a0a61bc1fb1caac0d6d1ec65c48d37e1f4e74.tar.gz
Orca-768a0a61bc1fb1caac0d6d1ec65c48d37e1f4e74.zip
Improved midi errors
Diffstat (limited to 'desktop')
-rw-r--r--desktop/sources/scripts/core/io/midi.js2
-rw-r--r--desktop/sources/scripts/lib/theme.js30
2 files changed, 16 insertions, 16 deletions
diff --git a/desktop/sources/scripts/core/io/midi.js b/desktop/sources/scripts/core/io/midi.js
index fb442dc..1b0119b 100644
--- a/desktop/sources/scripts/core/io/midi.js
+++ b/desktop/sources/scripts/core/io/midi.js
@@ -232,7 +232,7 @@ function Midi (client) {
}
this.toString = function () {
- return this.outputDevice() ? `${this.outputDevice().name}` : 'No Midi'
+ return !navigator.requestMIDIAccess ? 'No Midi Support' : this.outputDevice() ? `${this.outputDevice().name}` : 'No Midi Device'
}
this.length = function () {
diff --git a/desktop/sources/scripts/lib/theme.js b/desktop/sources/scripts/lib/theme.js
index 85fcc63..0556fa0 100644
--- a/desktop/sources/scripts/lib/theme.js
+++ b/desktop/sources/scripts/lib/theme.js
@@ -11,12 +11,12 @@ function Theme (client) {
this.active = {}
this.default = {
background: '#eeeeee',
- f_high: '#000000',
- f_med: '#666666',
- f_low: '#888888',
- f_inv: '#000000',
- b_high: '#cccccc',
- b_med: '#dddddd',
+ f_high: '#0a0a0a',
+ f_med: '#4a4a4a',
+ f_low: '#6a6a6a',
+ f_inv: '#111111',
+ b_high: '#a1a1a1',
+ b_med: '#c1c1c1',
b_low: '#ffffff',
b_inv: '#ffb545'
}
@@ -144,15 +144,15 @@ function Theme (client) {
function isValid (json) {
if (!json) { return false }
- if (!json.background) { return false }
- if (!json.f_high) { return false }
- if (!json.f_med) { return false }
- if (!json.f_low) { return false }
- if (!json.f_inv) { return false }
- if (!json.b_high) { return false }
- if (!json.b_med) { return false }
- if (!json.b_low) { return false }
- if (!json.b_inv) { return false }
+ if (!json.background || !isColor(json.background)) { return false }
+ if (!json.f_high || !isColor(json.f_high)) { return false }
+ if (!json.f_med || !isColor(json.f_med)) { return false }
+ if (!json.f_low || !isColor(json.f_low)) { return false }
+ if (!json.f_inv || !isColor(json.f_inv)) { return false }
+ if (!json.b_high || !isColor(json.b_high)) { return false }
+ if (!json.b_med || !isColor(json.b_med)) { return false }
+ if (!json.b_low || !isColor(json.b_low)) { return false }
+ if (!json.b_inv || !isColor(json.b_inv)) { return false }
return true
}