additional if clause in the themeStorage obj exists and slight update to working on settings tab

pull/1/head
Rob Stupay 7 years ago
parent 78d8ebd69c
commit 09443d3ebe
  1. 2
      src/app/tabs/settings-tab.js
  2. 11
      src/app/theme/theme-chooser.js

@ -96,7 +96,7 @@ function SettingsTab (container, appAPI, appEvents, opts) {
<span class="${css.checkboxText}">Enable Optimization</span>
</div>
<h4 class="${css.heading}">Themes</h4>
<p class="${css.explaination}">If you select a new theme, the page will reload</p>
<p class="${css.explaination}">If you change themes, the page will reload</p>
<div class="${css.crow}">
<input class="${css.col1}" name="theme" id="themeLight" type="radio">
<label for="themeLight">Light Theme</label>

@ -6,9 +6,16 @@ module.exports = {
chooser: function () {
var themeStorage = new Storage('style:')
if (themeStorage.get('theme') === 'dark') {
return styleGuideDark()
if (themeStorage.exists('theme')) {
console.log('10! ' + themeStorage.exists('theme'))
// console.log('lll ' + )
if (themeStorage.get('theme') === 'dark') {
return styleGuideDark()
} else {
return styleGuideLight()
}
} else {
console.log('17! ' + themeStorage.exists('style:'))
return styleGuideLight()
}
},

Loading…
Cancel
Save