@@ -0,0 +1,2 @@
|
||||
export const FEEDBACK_FORM_URL =
|
||||
'https://docs.google.com/forms/d/e/1FAIpQLSdavFRXTdB6tRobaFrRR2A1gv3b-IBHwQkBmNZTRpoqmcrPrQ/viewform?usp=sf_link'
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import VersionNumber from 'react-native-version-number'
|
||||
import {useStores} from '../../state'
|
||||
import {ScreenParams} from '../routes'
|
||||
import {s} from '../lib/styles'
|
||||
@@ -181,6 +182,10 @@ export const Settings = observer(function Settings({
|
||||
title="Debug tools">
|
||||
<Text style={pal.textLight}>Storybook</Text>
|
||||
</Link>
|
||||
<Text type="sm" style={[s.mt10, pal.textLight]}>
|
||||
Build version {VersionNumber.appVersion} ({VersionNumber.buildVersion}
|
||||
)
|
||||
</Text>
|
||||
<View style={s.footerSpacer} />
|
||||
</ScrollView>
|
||||
</View>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import {
|
||||
ScrollView,
|
||||
Linking,
|
||||
StyleProp,
|
||||
StyleSheet,
|
||||
TouchableOpacity,
|
||||
@@ -8,8 +8,12 @@ import {
|
||||
ViewStyle,
|
||||
} from 'react-native'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import VersionNumber from 'react-native-version-number'
|
||||
import {
|
||||
FontAwesomeIcon,
|
||||
FontAwesomeIconStyle,
|
||||
} from '@fortawesome/react-native-fontawesome'
|
||||
import {s, colors} from '../../lib/styles'
|
||||
import {FEEDBACK_FORM_URL} from '../../../lib/constants'
|
||||
import {useStores} from '../../../state'
|
||||
import {
|
||||
HomeIcon,
|
||||
@@ -49,6 +53,11 @@ export const Menu = observer(({onClose}: {onClose: () => void}) => {
|
||||
}
|
||||
}
|
||||
|
||||
const onPressFeedback = () => {
|
||||
track('Menu:FeedbackClicked')
|
||||
Linking.openURL(FEEDBACK_FORM_URL)
|
||||
}
|
||||
|
||||
// rendering
|
||||
// =
|
||||
|
||||
@@ -97,7 +106,13 @@ export const Menu = observer(({onClose}: {onClose: () => void}) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<ScrollView testID="menuView" style={[styles.view, pal.view]}>
|
||||
<View
|
||||
testID="menuView"
|
||||
style={[
|
||||
styles.view,
|
||||
pal.view,
|
||||
store.shell.minimalShellMode && styles.viewMinimalShell,
|
||||
]}>
|
||||
<TouchableOpacity
|
||||
testID="profileCardButton"
|
||||
onPress={() => onNavigate(`/profile/${store.me.handle}`)}
|
||||
@@ -176,20 +191,31 @@ export const Menu = observer(({onClose}: {onClose: () => void}) => {
|
||||
onPress={onDarkmodePress}
|
||||
/>
|
||||
</View>
|
||||
<View style={s.flex1} />
|
||||
<View style={styles.footer}>
|
||||
<Text style={[pal.textLight]}>
|
||||
Build version {VersionNumber.appVersion} ({VersionNumber.buildVersion}
|
||||
)
|
||||
</Text>
|
||||
<MenuItem
|
||||
icon={
|
||||
<FontAwesomeIcon
|
||||
style={pal.text as FontAwesomeIconStyle}
|
||||
size={24}
|
||||
icon={['far', 'message']}
|
||||
/>
|
||||
}
|
||||
label="Feedback"
|
||||
onPress={onPressFeedback}
|
||||
/>
|
||||
</View>
|
||||
<View style={s.footerSpacer} />
|
||||
</ScrollView>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
view: {
|
||||
flex: 1,
|
||||
paddingBottom: 90,
|
||||
},
|
||||
viewMinimalShell: {
|
||||
paddingBottom: 50,
|
||||
},
|
||||
section: {
|
||||
paddingHorizontal: 10,
|
||||
@@ -266,7 +292,6 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
|
||||
footer: {
|
||||
paddingHorizontal: 14,
|
||||
paddingVertical: 18,
|
||||
paddingHorizontal: 10,
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user