git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Commit b551c766d840b59690caaff8bb59ece65b097f61

whoops, provide defaults for settings

Matt McKegg committed on 10/1/2017, 1:30:08 AM
Parent: 52922a4cd9a0eb4dfa4e61033be7a2fb037818ac

Files changed

modules/page/html/render/settings.jschanged
modules/page/html/render/settings.jsView
@@ -1,7 +1,6 @@
1-var { h, computed } = require('mutant')
1+var { h, when } = require('mutant')
22 var nest = require('depnest')
3-var appRoot = require('app-root-path')
43
54 var themeNames = Object.keys(require('../../../../styles'))
65
76 exports.needs = nest({
@@ -28,9 +27,9 @@
2827 var prepend = [
2928 h('PageHeading', [
3029 h('h1', [
3130 h('strong', i18n('Settings'))
32- ]),
31+ ])
3332 ])
3433 ]
3534
3635 return h('Scroller', { style: { overflow: 'auto' } }, [
@@ -43,9 +42,9 @@
4342 h('select', {
4443 style: {
4544 'font-size': '120%'
4645 },
47- value: currentTheme,
46+ value: when(currentTheme, currentTheme, 'light'),
4847 'ev-change': (ev) => api.settings.sync.set({
4948 patchwork: {theme: ev.target.value}
5049 })
5150 }, [
@@ -58,9 +57,9 @@
5857 h('select', {
5958 style: {
6059 'font-size': '120%'
6160 },
62- value: currentLang,
61+ value: when(currentLang, currentLang, 'en'),
6362 'ev-change': (ev) => api.settings.sync.set({
6463 patchwork: {lang: ev.target.value}
6564 })
6665 }, [

Built with git-ssb-web