diff --git a/ReactNativeClient/lib/components/global-style.js b/ReactNativeClient/lib/components/global-style.js index 4b2ddcc57..1c1c000b3 100644 --- a/ReactNativeClient/lib/components/global-style.js +++ b/ReactNativeClient/lib/components/global-style.js @@ -15,6 +15,7 @@ const globalStyle = { dividerColor: "#dddddd", strongDividerColor: "#aaaaaa", selectedColor: '#e5e5e5', + headerBackgroundColor: '#F0F0F0', disabledOpacity: 0.2, colorUrl: '#7B81FF', textSelectionColor: "#0096FF", @@ -84,6 +85,16 @@ function addExtraStyles(style) { fontSize: style.fontSize, }; + style.headerStyle = { + color: style.color, + fontSize: style.fontSize * 1.2, + fontWeight: 'bold', + }; + + style.headerWrapperStyle = { + backgroundColor: style.headerBackgroundColor, + }; + return style; } @@ -105,6 +116,7 @@ function themeStyle(theme) { output.strongDividerColor = '#888888'; output.selectedColor = '#333333'; output.textSelectionColor = '#00AEFF'; + output.headerBackgroundColor = '#2D3136'; output.raisedBackgroundColor = "#0F2051"; output.raisedColor = "#788BC3"; diff --git a/ReactNativeClient/lib/components/screens/config.js b/ReactNativeClient/lib/components/screens/config.js index 015763961..deb869426 100644 --- a/ReactNativeClient/lib/components/screens/config.js +++ b/ReactNativeClient/lib/components/screens/config.js @@ -62,7 +62,6 @@ class ConfigScreenComponent extends BaseScreenComponent { paddingRight: theme.marginRight, }, settingText: { - fontWeight: 'bold', color: theme.color, fontSize: theme.fontSize, flex: 1, @@ -73,6 +72,10 @@ class ConfigScreenComponent extends BaseScreenComponent { fontSize: theme.fontSize, flex: 1, }, + sliderUnits: { + color: theme.color, + fontSize: theme.fontSize, + }, settingDescriptionText: { color: theme.color, fontSize: theme.fontSize, @@ -114,6 +117,8 @@ class ConfigScreenComponent extends BaseScreenComponent { styles.linkText.flex = 0; styles.linkText.fontWeight = 'normal'; + styles.headerWrapperStyle = Object.assign({}, styles.settingContainer, theme.headerWrapperStyle) + styles.switchSettingControl = Object.assign({}, styles.settingControl); delete styles.switchSettingControl.color; //styles.switchSettingControl.width = '20%'; @@ -123,6 +128,61 @@ class ConfigScreenComponent extends BaseScreenComponent { return this.styles_[themeId]; } + renderHeader(key, title) { + const theme = themeStyle(this.props.theme); + return ( + + {title} + + ); + } + + sectionToComponent(key, section, settings) { + const theme = themeStyle(this.props.theme); + const settingComps = []; + + for (let i = 0; i < section.metadatas.length; i++) { + const md = section.metadatas[i]; + + if (section.name === 'sync' && md.key === 'sync.resourceDownloadMode') { + const syncTargetMd = SyncTargetRegistry.idToMetadata(settings['sync.target']); + + if (syncTargetMd.supportsConfigCheck) { + const messages = shared.checkSyncConfigMessages(this); + const statusComp = !messages.length ? null : ( + + {messages[0]} + {messages.length >= 1 ? ({messages[1]}) : null} + ); + + settingComps.push( + + + +