You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
Mobile: Fixed proxy timeout setting UI
This commit is contained in:
@@ -495,6 +495,9 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
|||||||
// );
|
// );
|
||||||
} else if (md.type === Setting.TYPE_INT) {
|
} else if (md.type === Setting.TYPE_INT) {
|
||||||
const unitLabel = md.unitLabel ? md.unitLabel(value) : value;
|
const unitLabel = md.unitLabel ? md.unitLabel(value) : value;
|
||||||
|
const minimum = 'minimum' in md ? md.minimum : 0;
|
||||||
|
const maximum = 'maximum' in md ? md.maximum : 10;
|
||||||
|
|
||||||
// Note: Do NOT add the minimumTrackTintColor and maximumTrackTintColor props
|
// Note: Do NOT add the minimumTrackTintColor and maximumTrackTintColor props
|
||||||
// on the Slider as they are buggy and can crash the app on certain devices.
|
// on the Slider as they are buggy and can crash the app on certain devices.
|
||||||
// https://github.com/laurent22/joplin/issues/2733
|
// https://github.com/laurent22/joplin/issues/2733
|
||||||
@@ -506,7 +509,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
|||||||
</Text>
|
</Text>
|
||||||
<View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', flex: 1 }}>
|
<View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', flex: 1 }}>
|
||||||
<Text style={this.styles().sliderUnits}>{unitLabel}</Text>
|
<Text style={this.styles().sliderUnits}>{unitLabel}</Text>
|
||||||
<Slider key="control" style={{ flex: 1 }} step={md.step} minimumValue={md.minimum} maximumValue={md.maximum} value={value} onValueChange={value => updateSettingValue(key, value)} />
|
<Slider key="control" style={{ flex: 1 }} step={md.step} minimumValue={minimum} maximumValue={maximum} value={value} onValueChange={value => updateSettingValue(key, value)} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1464,6 +1464,7 @@ class Setting extends BaseModel {
|
|||||||
'net.proxyTimeout': {
|
'net.proxyTimeout': {
|
||||||
value: 1,
|
value: 1,
|
||||||
type: SettingItemType.Int,
|
type: SettingItemType.Int,
|
||||||
|
maximum: 60,
|
||||||
advanced: true,
|
advanced: true,
|
||||||
section: 'sync',
|
section: 'sync',
|
||||||
isGlobal: true,
|
isGlobal: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user