From b8f1dd261fd524d251e85da9fab281622305a977 Mon Sep 17 00:00:00 2001 From: neauoire Date: Sat, 9 Nov 2019 12:42:04 -0500 Subject: Updated theme --- desktop/sources/scripts/lib/theme.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/desktop/sources/scripts/lib/theme.js b/desktop/sources/scripts/lib/theme.js index 4853609..5104277 100644 --- a/desktop/sources/scripts/lib/theme.js +++ b/desktop/sources/scripts/lib/theme.js @@ -10,17 +10,20 @@ function Theme (client) { this.active = {} this.default = { - background: '#eee', - f_high: '#000', - f_med: '#999', - f_low: '#ccc', - f_inv: '#000', - b_high: '#000', - b_med: '#888', - b_low: '#aaa', + background: '#eeeeee', + f_high: '#000000', + f_med: '#666666', + f_low: '#888888', + f_inv: '#000000', + b_high: '#ffffff', + b_med: '#cccccc', + b_low: '#dddddd', b_inv: '#ffb545' } + // Callbacks + this.onLoad = () => {} + this.install = (host = document.body) => { window.addEventListener('dragover', this.drag) window.addEventListener('drop', this.drop) @@ -67,6 +70,9 @@ function Theme (client) { }` localStorage.setItem('theme', JSON.stringify(theme)) this.active = theme + if (this.onLoad) { + this.onLoad(data) + } } this.reset = () => { @@ -161,6 +167,4 @@ function Theme (client) { function isHtml (text) { try { new DOMParser().parseFromString(text, 'text/xml'); return true } catch (error) { return false } } - - console.log(isColor('#72dec2')) } -- cgit v1.2.3