Commit b551c766d840b59690caaff8bb59ece65b097f61
whoops, provide defaults for settings
Matt McKegg committed on 10/1/2017, 1:30:08 AMParent: 52922a4cd9a0eb4dfa4e61033be7a2fb037818ac
Files changed
modules/page/html/render/settings.js | changed |
modules/page/html/render/settings.js | ||
---|---|---|
@@ -1,7 +1,6 @@ | ||
1 | -var { h, computed } = require('mutant') | |
1 | +var { h, when } = require('mutant') | |
2 | 2 | var nest = require('depnest') |
3 | -var appRoot = require('app-root-path') | |
4 | 3 | |
5 | 4 | var themeNames = Object.keys(require('../../../../styles')) |
6 | 5 | |
7 | 6 | exports.needs = nest({ |
@@ -28,9 +27,9 @@ | ||
28 | 27 | var prepend = [ |
29 | 28 | h('PageHeading', [ |
30 | 29 | h('h1', [ |
31 | 30 | h('strong', i18n('Settings')) |
32 | - ]), | |
31 | + ]) | |
33 | 32 | ]) |
34 | 33 | ] |
35 | 34 | |
36 | 35 | return h('Scroller', { style: { overflow: 'auto' } }, [ |
@@ -43,9 +42,9 @@ | ||
43 | 42 | h('select', { |
44 | 43 | style: { |
45 | 44 | 'font-size': '120%' |
46 | 45 | }, |
47 | - value: currentTheme, | |
46 | + value: when(currentTheme, currentTheme, 'light'), | |
48 | 47 | 'ev-change': (ev) => api.settings.sync.set({ |
49 | 48 | patchwork: {theme: ev.target.value} |
50 | 49 | }) |
51 | 50 | }, [ |
@@ -58,9 +57,9 @@ | ||
58 | 57 | h('select', { |
59 | 58 | style: { |
60 | 59 | 'font-size': '120%' |
61 | 60 | }, |
62 | - value: currentLang, | |
61 | + value: when(currentLang, currentLang, 'en'), | |
63 | 62 | 'ev-change': (ev) => api.settings.sync.set({ |
64 | 63 | patchwork: {lang: ev.target.value} |
65 | 64 | }) |
66 | 65 | }, [ |
Built with git-ssb-web