diff options
Diffstat (limited to 'src/view/shell/desktop/LeftNav.tsx')
-rw-r--r-- | src/view/shell/desktop/LeftNav.tsx | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx index f3c8c1d11..b27898828 100644 --- a/src/view/shell/desktop/LeftNav.tsx +++ b/src/view/shell/desktop/LeftNav.tsx @@ -239,24 +239,26 @@ function ComposeBtn() { return null } return ( - <TouchableOpacity - disabled={isFetchingHandle} - style={[styles.newPostBtn]} - onPress={onPressCompose} - accessibilityRole="button" - accessibilityLabel={_(msg`New post`)} - accessibilityHint=""> - <View style={styles.newPostBtnIconWrapper}> - <ComposeIcon2 - size={19} - strokeWidth={2} - style={styles.newPostBtnLabel} - /> - </View> - <Text type="button" style={styles.newPostBtnLabel}> - <Trans>New Post</Trans> - </Text> - </TouchableOpacity> + <View style={styles.newPostBtnContainer}> + <TouchableOpacity + disabled={isFetchingHandle} + style={styles.newPostBtn} + onPress={onPressCompose} + accessibilityRole="button" + accessibilityLabel={_(msg`New post`)} + accessibilityHint=""> + <View style={styles.newPostBtnIconWrapper}> + <ComposeIcon2 + size={19} + strokeWidth={2} + style={styles.newPostBtnLabel} + /> + </View> + <Text type="button" style={styles.newPostBtnLabel}> + <Trans context="action">New Post</Trans> + </Text> + </TouchableOpacity> + </View> ) } @@ -440,10 +442,11 @@ export function DesktopLeftNav() { const styles = StyleSheet.create({ leftNav: { - position: 'absolute', + // @ts-ignore web only + position: 'fixed', top: 10, // @ts-ignore web only - right: 'calc(50vw + 312px)', + left: 'calc(50vw - 300px - 220px - 20px)', width: 220, // @ts-ignore web only maxHeight: 'calc(100vh - 10px)', @@ -512,6 +515,9 @@ const styles = StyleSheet.create({ fontSize: 14, }, + newPostBtnContainer: { + flexDirection: 'row', + }, newPostBtn: { flexDirection: 'row', alignItems: 'center', |