Skip to content

Commit f20159a

Browse files
Merge pull request #384 from OpenDTU-App/fix-multiple-styles
2 parents 95a4135 + b89617c commit f20159a

4 files changed

Lines changed: 46 additions & 23 deletions

File tree

src/components/Charts/ImportantCharts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const ImportantCharts: FC = () => {
117117
justifyContent: 'space-between',
118118
}}
119119
>
120-
<View>
120+
<View style={{ flex: 1 }}>
121121
<Text variant="titleMedium">
122122
{t('livedata.configureGraphs')}
123123
</Text>

src/components/StatusWidget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const StatusWidget: FC<StatusWidgetProps> = ({
4343
gap: spacing,
4444
}}
4545
>
46-
<Text variant="titleLarge" style={{ fontSize: 20 }}>
46+
<Text variant="titleLarge" style={{ fontSize: 18 }}>
4747
{title}
4848
</Text>
4949
{icon ? <Icon size={iconSize ?? 20} source={icon} /> : null}

src/components/modals/AddDatabaseModal.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ const AddDatabaseModal: FC<AddDatabaseModalProps> = props => {
7676
mode="outlined"
7777
onChangeText={setName}
7878
style={{ backgroundColor: theme.colors.elevation.level3 }}
79+
autoCapitalize="none"
80+
autoCorrect={false}
7981
/>
8082
</Box>
8183
<Box mb={4}>
@@ -85,6 +87,9 @@ const AddDatabaseModal: FC<AddDatabaseModalProps> = props => {
8587
onChangeText={setBaseUrl}
8688
placeholder={baseUrlPlaceholder}
8789
style={{ backgroundColor: theme.colors.elevation.level3 }}
90+
textContentType="URL"
91+
autoCapitalize="none"
92+
autoCorrect={false}
8893
/>
8994
</Box>
9095
<Box mb={4}>
@@ -93,6 +98,8 @@ const AddDatabaseModal: FC<AddDatabaseModalProps> = props => {
9398
mode="outlined"
9499
onChangeText={setUsername}
95100
style={{ backgroundColor: theme.colors.elevation.level3 }}
101+
autoCapitalize="none"
102+
autoCorrect={false}
96103
/>
97104
</Box>
98105
<Box mb={4}>
@@ -102,6 +109,9 @@ const AddDatabaseModal: FC<AddDatabaseModalProps> = props => {
102109
onChangeText={setPassword}
103110
style={{ backgroundColor: theme.colors.elevation.level3 }}
104111
secureTextEntry
112+
textContentType="password"
113+
autoCapitalize="none"
114+
autoCorrect={false}
105115
/>
106116
</Box>
107117
</Box>

src/views/navigation/screens/GraphsGroup/ManageDatabasesScreen.tsx

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,44 @@ const ManageDatabasesScreen: FC<PropsWithNavigation> = ({ navigation }) => {
4545
<Appbar.Action icon="plus" onPress={handleClickAdd} />
4646
</Appbar.Header>
4747
<StyledView theme={theme}>
48-
<Box style={{ flex: 1, width: '100%' }}>
48+
<Box
49+
style={{
50+
flex: 1,
51+
width: '100%',
52+
display: 'flex',
53+
flexDirection: 'column',
54+
alignItems: 'center',
55+
}}
56+
>
4957
{!hasConfiguredDatabases ? (
50-
<Box
51-
style={{
52-
display: 'flex',
53-
justifyContent: 'center',
54-
height: '100%',
55-
}}
56-
>
57-
<Box mb={16}>
58-
<Text style={{ textAlign: 'center' }} variant="titleLarge">
59-
{t('manageDatabases.noDatabasesConfigured')}
60-
</Text>
61-
</Box>
62-
<Box mb={16}>
63-
<Text style={{ textAlign: 'center' }} variant="titleMedium">
64-
{t('manageDatabases.noDatabasesConfiguredHint')}
65-
</Text>
58+
<Box>
59+
<Box
60+
style={{
61+
display: 'flex',
62+
justifyContent: 'center',
63+
height: '100%',
64+
width: '90%',
65+
}}
66+
>
67+
<Box mb={16}>
68+
<Text style={{ textAlign: 'center' }} variant="titleLarge">
69+
{t('manageDatabases.noDatabasesConfigured')}
70+
</Text>
71+
</Box>
72+
<Box mb={16}>
73+
<Text style={{ textAlign: 'center' }} variant="titleMedium">
74+
{t('manageDatabases.noDatabasesConfiguredHint')}
75+
</Text>
76+
</Box>
77+
<Button icon="plus" onPress={handleClickAdd}>
78+
{t('manageDatabases.addDatabase')}
79+
</Button>
6680
</Box>
67-
<Button icon="plus" onPress={handleClickAdd}>
68-
{t('manageDatabases.addDatabase')}
69-
</Button>
7081
</Box>
7182
) : (
72-
<ScrollView style={{ marginTop: 16, marginBottom: 16 }}>
83+
<ScrollView
84+
style={{ marginTop: 16, marginBottom: 16, width: '100%' }}
85+
>
7386
<Box style={{ gap: spacing, marginHorizontal: 16 }}>
7487
{databases.map((config, index) => (
7588
<StyledListItem

0 commit comments

Comments
 (0)