Commit bb52fcfb authored by Wietse Kuipers's avatar Wietse Kuipers
Browse files

Merge branch 'feature/improve-profile-styles' into 'master'

Improve iOS styling of profiles

See merge request thalia/ThaliApp-react!90
parents f90f7582 0dee4e56
......@@ -150,13 +150,15 @@ class Profile extends Component {
const textPosBottom = this.scrollY.interpolate({
inputRange: [0, HEADER_SCROLL_DISTANCE / 2, HEADER_SCROLL_DISTANCE],
outputRange: [20, 20, (HEADER_MIN_HEIGHT - this.textHeight - STATUSBAR_HEIGHT) / 2],
outputRange: [16, 16, (HEADER_MIN_HEIGHT - this.textHeight - STATUSBAR_HEIGHT) / 2],
extrapolate: 'clamp',
});
let textStyle = {
fontSize: textSize,
};
let appBarBorderStyle = {
};
if (Platform.OS === 'android') {
textStyle = {
...textStyle,
......@@ -170,6 +172,16 @@ class Profile extends Component {
width: '100%',
textAlign: 'center',
};
const appBarBorder = this.props.success ? this.scrollY.interpolate({
inputRange: [0, HEADER_SCROLL_DISTANCE / 2, HEADER_SCROLL_DISTANCE],
outputRange: [0, 0, 1],
extrapolate: 'clamp',
}) : (HEADER_MIN_HEIGHT - 24) / 2;
appBarBorderStyle = {
borderBottomWidth: appBarBorder,
};
}
return (
......@@ -186,7 +198,7 @@ class Profile extends Component {
>
<LinearGradient colors={['#55000000', '#000000']} style={styles.overlayGradient} />
</Animated.Image>
<Animated.View style={styles.appBar}>
<Animated.View style={[styles.appBar, appBarBorderStyle]}>
<TouchableOpacity
onPress={this.props.back}
>
......
......@@ -150,7 +150,7 @@ const styles = create({
bottom: 0,
left: 0,
right: 0,
opacity: 0.3,
opacity: 0.5,
},
errorText: {
marginTop: HEADER_MIN_HEIGHT,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment