Skip to content

Commit

Permalink
Merge pull request #1365 from dedis/work-fe1-nico-election-notice
Browse files Browse the repository at this point in the history
Make election notice less attention grabbing
  • Loading branch information
pierluca authored Feb 16, 2023
2 parents 1f1c9b3 + e6a1e26 commit 8f4e6b2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 48 deletions.
24 changes: 8 additions & 16 deletions fe1-web/src/features/evoting/components/ElectionVersionNotice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ const styles = StyleSheet.create({
info: {
padding: Spacing.x1,
marginBottom: Spacing.x1,
borderRadius: Border.radius,

flexDirection: 'row',
alignItems: 'center',
backgroundColor: Color.info,
backgroundColor: Color.contrast,
borderRadius: Border.radius,
} as ViewStyle,
infoText: {
flex: 1,
Expand All @@ -29,28 +29,20 @@ const ElectionVersionNotice = ({ election }: IPropTypes) => {
case ElectionVersion.OPEN_BALLOT:
return (
<View style={styles.info}>
<PoPIcon name="info" color={Color.contrast} size={Icon.largeSize} />
<PoPIcon name="info" color={Color.primary} size={Icon.largeSize} />
<View style={styles.infoText}>
<Text style={[Typography.base, Typography.important, Typography.negative]}>
{STRINGS.general_notice}
</Text>
<Text style={[Typography.base, Typography.negative]}>
{STRINGS.election_warning_open_ballot}
</Text>
<Text style={[Typography.base, Typography.important]}>{STRINGS.general_notice}</Text>
<Text style={Typography.base}>{STRINGS.election_warning_open_ballot}</Text>
</View>
</View>
);
case ElectionVersion.SECRET_BALLOT:
return (
<View style={styles.info}>
<PoPIcon name="info" color={Color.contrast} size={Icon.largeSize} />
<PoPIcon name="info" color={Color.primary} size={Icon.largeSize} />
<View style={styles.infoText}>
<Text style={[Typography.base, Typography.important, Typography.negative]}>
{STRINGS.general_notice}
</Text>
<Text style={[Typography.base, Typography.negative]}>
{STRINGS.election_info_secret_ballot}
</Text>
<Text style={[Typography.base, Typography.important]}>{STRINGS.general_notice}</Text>
<Text style={Typography.base}>{STRINGS.election_info_secret_ballot}</Text>
</View>
</View>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3417,7 +3417,7 @@ exports[`ViewSingleElection renders correctly non organizers opened election 1`]
style={
{
"alignItems": "center",
"backgroundColor": "#3498db",
"backgroundColor": "#fff",
"borderRadius": 8,
"flexDirection": "row",
"marginBottom": 16,
Expand All @@ -3426,7 +3426,7 @@ exports[`ViewSingleElection renders correctly non organizers opened election 1`]
}
>
<View>
{"name":"ios-information-circle-outline","size":50,"color":"#fff"}
{"name":"ios-information-circle-outline","size":50,"color":"#000"}
</View>
<View
style={
Expand All @@ -3448,27 +3448,19 @@ exports[`ViewSingleElection renders correctly non organizers opened election 1`]
{
"fontWeight": "bold",
},
{
"color": "#fff",
},
]
}
>
Notice
</Text>
<Text
style={
[
{
"color": "#000",
"fontSize": 20,
"lineHeight": 26,
"textAlign": "left",
},
{
"color": "#fff",
},
]
{
"color": "#000",
"fontSize": 20,
"lineHeight": 26,
"textAlign": "left",
}
}
>
This is an open ballot election, your cast votes will be visible to all members of the LAO.
Expand Down Expand Up @@ -9909,7 +9901,7 @@ exports[`ViewSingleElection renders correctly organizers opened election 1`] = `
style={
{
"alignItems": "center",
"backgroundColor": "#3498db",
"backgroundColor": "#fff",
"borderRadius": 8,
"flexDirection": "row",
"marginBottom": 16,
Expand All @@ -9918,7 +9910,7 @@ exports[`ViewSingleElection renders correctly organizers opened election 1`] = `
}
>
<View>
{"name":"ios-information-circle-outline","size":50,"color":"#fff"}
{"name":"ios-information-circle-outline","size":50,"color":"#000"}
</View>
<View
style={
Expand All @@ -9940,27 +9932,19 @@ exports[`ViewSingleElection renders correctly organizers opened election 1`] = `
{
"fontWeight": "bold",
},
{
"color": "#fff",
},
]
}
>
Notice
</Text>
<Text
style={
[
{
"color": "#000",
"fontSize": 20,
"lineHeight": 26,
"textAlign": "left",
},
{
"color": "#fff",
},
]
{
"color": "#000",
"fontSize": 20,
"lineHeight": 26,
"textAlign": "left",
}
}
>
This is an open ballot election, your cast votes will be visible to all members of the LAO.
Expand Down

0 comments on commit 8f4e6b2

Please sign in to comment.