You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Various bug fixes, optimisations and improvements
This commit is contained in:
@@ -279,6 +279,7 @@ const ScreenHeader = connect(
|
||||
(state) => {
|
||||
return {
|
||||
historyCanGoBack: state.historyCanGoBack,
|
||||
locale: state.settings.locale,
|
||||
};
|
||||
}
|
||||
)(ScreenHeaderComponent)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { Component } from 'react';
|
||||
import { View, Switch, StyleSheet, Picker, Text, Button } from 'react-native';
|
||||
import { View, Switch, Slider, StyleSheet, Picker, Text, Button } from 'react-native';
|
||||
import { connect } from 'react-redux'
|
||||
import { ScreenHeader } from 'lib/components/screen-header.js';
|
||||
import { _, setLocale } from 'lib/locale.js';
|
||||
@@ -21,10 +21,17 @@ let styles = {
|
||||
color: globalStyle.color,
|
||||
},
|
||||
settingControl: {
|
||||
//color: globalStyle.color,
|
||||
color: globalStyle.color,
|
||||
},
|
||||
}
|
||||
|
||||
styles.switchSettingContainer = Object.assign({}, styles.settingContainer);
|
||||
styles.switchSettingContainer.flexDirection = 'row';
|
||||
styles.switchSettingContainer.justifyContent = 'space-between';
|
||||
|
||||
styles.switchSettingControl = Object.assign({}, styles.settingControl);
|
||||
delete styles.switchSettingControl.color;
|
||||
|
||||
styles = StyleSheet.create(styles);
|
||||
|
||||
class ConfigScreenComponent extends BaseScreenComponent {
|
||||
@@ -82,12 +89,19 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
);
|
||||
} else if (setting.type == Setting.TYPE_BOOL) {
|
||||
return (
|
||||
<View key={key} style={styles.settingContainer}>
|
||||
<View key={key} style={styles.switchSettingContainer}>
|
||||
<Text key="label" style={styles.settingText}>{setting.label()}</Text>
|
||||
<Switch key="control" style={styles.settingControl} value={value} onValueChange={(value) => updateSettingValue(key, value)} />
|
||||
<Switch key="control" style={styles.switchSettingControl} value={value} onValueChange={(value) => updateSettingValue(key, value)} />
|
||||
</View>
|
||||
);
|
||||
|
||||
} else if (setting.type == Setting.TYPE_INT) {
|
||||
return (
|
||||
<View key={key} style={styles.settingContainer}>
|
||||
<Text key="label" style={styles.settingText}>{setting.label()}</Text>
|
||||
<Slider key="control" style={styles.settingControl} value={value} onValueChange={(value) => updateSettingValue(key, value)} />
|
||||
</View>
|
||||
);
|
||||
} else {
|
||||
//throw new Error('Unsupported setting type: ' + setting.type);
|
||||
}
|
||||
|
||||
|
||||
@@ -231,6 +231,7 @@ const SideMenuContent = connect(
|
||||
selectedFolderId: state.selectedFolderId,
|
||||
selectedTagId: state.selectedTagId,
|
||||
notesParentType: state.notesParentType,
|
||||
locale: state.settings.locale,
|
||||
};
|
||||
}
|
||||
)(SideMenuContentComponent)
|
||||
|
||||
Reference in New Issue
Block a user