aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshpuld <shp@cock.li>2017-11-18 13:27:37 +0200
committershpuld <shp@cock.li>2017-11-18 13:27:37 +0200
commit3534a9a62ff9011e44a92f6ba4944155908325cb (patch)
tree77b4e7652252dcfe06b931d085b02e4eff2bc6e6 /src
parentd65d6e5da4c3be16791564910ea5461f4049e890 (diff)
Make defaulting to pleroma-dark work when config.json has an invalid theme. Remove logging.
Diffstat (limited to 'src')
-rw-r--r--src/components/style_switcher/style_switcher.js4
-rw-r--r--src/services/style_setter/style_setter.js2
2 files changed, 1 insertions, 5 deletions
diff --git a/src/components/style_switcher/style_switcher.js b/src/components/style_switcher/style_switcher.js
index 8bed17cc..b1359d13 100644
--- a/src/components/style_switcher/style_switcher.js
+++ b/src/components/style_switcher/style_switcher.js
@@ -15,7 +15,6 @@ export default {
window.fetch('/static/styles.json')
.then((data) => data.json())
.then((themes) => {
- console.log(themes)
self.availableStyles = themes
})
},
@@ -29,8 +28,6 @@ export default {
}
this.bgColorLocal = rgbstr2hex(this.$store.state.config.colors['base00'])
this.fgColorLocal = rgbstr2hex(this.$store.state.config.colors['base02'])
- console.log(this.$store.state.config.colors['base02'])
- console.log(this.fgColorLocal)
this.textColorLocal = rgbstr2hex(this.$store.state.config.colors['base05'])
this.linkColorLocal = rgbstr2hex(this.$store.state.config.colors['base08'])
},
@@ -52,7 +49,6 @@ export default {
const textRgb = rgb(this.textColorLocal)
const linkRgb = rgb(this.linkColorLocal)
if (bgRgb && fgRgb && linkRgb) {
- console.log('all colors ok')
this.$store.dispatch('setOption', {
name: 'customTheme',
value: {
diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js
index 92ba9440..62296e79 100644
--- a/src/services/style_setter/style_setter.js
+++ b/src/services/style_setter/style_setter.js
@@ -121,7 +121,7 @@ const setPreset = (val, commit) => {
window.fetch('/static/styles.json')
.then((data) => data.json())
.then((themes) => {
- const theme = themes[val] ? themes[val] : themes[0]
+ const theme = themes[val] ? themes[val] : themes['pleroma-dark']
const bgRgb = hex2rgb(theme[1])
const fgRgb = hex2rgb(theme[2])
const textRgb = hex2rgb(theme[3])