Skip to content

Commit

Permalink
Minor cleaning of styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyratox committed Jan 18, 2023
1 parent 3838c7d commit bb2dec6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 27 deletions.
45 changes: 18 additions & 27 deletions fe1-web/src/core/components/BuildInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,50 +1,41 @@
import Constants from 'expo-constants';
import React from 'react';
import { StyleSheet, View, Linking, Text } from 'react-native';
import { StyleSheet, View, Linking, Text, ViewStyle } from 'react-native';

import { Color, Spacing, Typography } from 'core/styles';
import { Spacing, Typography } from 'core/styles';

const styles = StyleSheet.create({
container: {
position: 'absolute',
bottom: Spacing.x05,
left: Spacing.x05,
zIndex: 100,
color: Color.inactive,
fontFamily: 'monospace',
textTransform: 'uppercase',
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
...Typography.minuscule,
},
link: {
textDecorationLine: 'none',
color: Color.inactive,
...Typography.minuscule,
},
} as ViewStyle,
});

const BuildInfo = () => {
return (
<View style={styles.container}>
<Text
style={styles.link}
onPress={() =>
Linking.openURL(
`https://github.com/dedis/popstellar/releases/tag/${Constants?.expoConfig?.extra?.appVersion}`,
)
}>
{Constants?.expoConfig?.extra?.appVersion}
style={[Typography.minuscule, Typography.inactive, Typography.code, Typography.uppercase]}>
<Text
onPress={() =>
Linking.openURL(
`https://github.com/dedis/popstellar/releases/tag/${Constants?.expoConfig?.extra?.appVersion}`,
)
}>
{Constants?.expoConfig?.extra?.appVersion}
</Text>
<Text> | </Text>
<Text onPress={() => Linking.openURL(Constants?.expoConfig?.extra?.buildURL)}>
{Constants?.expoConfig?.extra?.shortSHA}
</Text>
<Text> | </Text>
<Text>{Constants?.expoConfig?.extra?.buildDate}</Text>
</Text>
<Text style={styles.link}> | </Text>
<Text
style={styles.link}
onPress={() => Linking.openURL(Constants?.expoConfig?.extra?.buildURL)}>
{Constants?.expoConfig?.extra?.shortSHA}
</Text>
<Text style={styles.link}> | </Text>
{Constants?.expoConfig?.extra?.buildDate}
</View>
);
};
Expand Down
4 changes: 4 additions & 0 deletions fe1-web/src/core/styles/typography.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,7 @@ export const importantCentered: TextStyle = {
...baseCentered,
fontWeight: 'bold',
};

export const uppercase: TextStyle = {
textTransform: 'uppercase',
};

0 comments on commit bb2dec6

Please sign in to comment.