Skip to content

Commit 94a0eee

Browse files
authored
Change files settings (keybase#22482)
* change files settings mobile * story
1 parent 98881c1 commit 94a0eee

3 files changed

Lines changed: 38 additions & 37 deletions

File tree

‎shared/settings/files/index.desktop.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ const styles = Styles.styleSheetCreate(
165165
},
166166
finderIntegrationContent: {
167167
paddingLeft: Styles.globalMargins.small,
168+
paddingRight: Styles.globalMargins.small,
168169
paddingTop: Styles.globalMargins.medium,
169170
},
170171
spinner: {

‎shared/settings/files/index.native.tsx‎

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -50,42 +50,31 @@ class ThresholdDropdown extends React.PureComponent<
5050
}
5151
}
5252

53-
const SyncNotificationSetting = (props: Props) => (
54-
<Kb.Box2
55-
direction="horizontal"
56-
alignItems="flex-start"
57-
fullWidth={true}
58-
style={{flex: 1, flexWrap: 'wrap'}}
59-
>
60-
<Kb.Text type="Body">Warn me if I have less than </Kb.Text>
61-
<ThresholdDropdown {...props} />
62-
<Kb.Text type="Body">of storage space remaining</Kb.Text>
63-
</Kb.Box2>
64-
)
65-
6653
const Files = (props: Props) => (
67-
<>
68-
<Kb.Box2 direction="vertical" fullHeight={true} fullWidth={true}>
69-
<Kb.Box2 direction="vertical" fullWidth={true} style={styles.syncContent}>
70-
<Kb.Box>
71-
<Kb.Box2 direction="horizontal" gap="tiny" style={styles.contentHeader}>
72-
<Kb.Text type="BodySmallSemibold">Sync</Kb.Text>
73-
</Kb.Box2>
74-
<Kb.Checkbox
75-
onCheck={
76-
props.spaceAvailableNotificationThreshold === 0
77-
? props.onEnableSyncNotifications
78-
: props.onDisableSyncNotifications
79-
}
80-
labelComponent={<SyncNotificationSetting {...props} />}
81-
checked={props.spaceAvailableNotificationThreshold !== 0}
82-
disabled={props.areSettingsLoading}
83-
style={styles.syncNotificationCheckbox}
84-
/>
85-
</Kb.Box>
54+
<Kb.Box2 direction="vertical" fullWidth={true} alignItems="center">
55+
<Kb.Box2 direction="vertical" fullWidth={true} style={styles.syncContent}>
56+
<Kb.Box2 direction="horizontal" gap="tiny" style={styles.contentHeader}>
57+
<Kb.Text type="BodySmallSemibold">Sync</Kb.Text>
8658
</Kb.Box2>
59+
<Kb.Checkbox
60+
onCheck={
61+
props.spaceAvailableNotificationThreshold === 0
62+
? props.onEnableSyncNotifications
63+
: props.onDisableSyncNotifications
64+
}
65+
label="Warn when low on storage space"
66+
checked={props.spaceAvailableNotificationThreshold !== 0}
67+
disabled={props.areSettingsLoading}
68+
style={styles.syncNotificationCheckbox}
69+
/>
70+
{!!props.spaceAvailableNotificationThreshold && (
71+
<Kb.Text type="BodySmall" style={{marginTop: Styles.globalMargins.tiny}}>
72+
Threshold:
73+
</Kb.Text>
74+
)}
75+
{!!props.spaceAvailableNotificationThreshold && <ThresholdDropdown {...props} />}
8776
</Kb.Box2>
88-
</>
77+
</Kb.Box2>
8978
)
9079

9180
const styles = Styles.styleSheetCreate(
@@ -94,10 +83,16 @@ const styles = Styles.styleSheetCreate(
9483
contentHeader: {
9584
paddingBottom: Styles.globalMargins.tiny,
9685
},
97-
syncContent: {
98-
paddingLeft: Styles.globalMargins.xsmall,
99-
paddingTop: Styles.globalMargins.medium,
100-
},
86+
syncContent: Styles.platformStyles({
87+
common: {
88+
paddingLeft: Styles.globalMargins.xsmall,
89+
paddingRight: Styles.globalMargins.xsmall,
90+
paddingTop: Styles.globalMargins.medium,
91+
},
92+
isTablet: {
93+
maxWidth: 410,
94+
},
95+
}),
10196
syncNotificationCheckbox: {
10297
alignItems: 'center',
10398
},

‎shared/stories/__tests__/__snapshots__/Storyshots.test.js.snap‎

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)