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