Merge branch 'fix/donate-button-fork' into 'master'

Cleanup donation button fork on iOS & update the link to the website

Closes #572 and #566

See merge request bloodyhealth/drip!412
This commit is contained in:
bl00dymarie
2022-07-10 17:27:59 +00:00
4 changed files with 14 additions and 20 deletions
+3 -3
View File
@@ -1,11 +1,11 @@
# drip, the open-source cycle tracking app # drip, the open-source cycle tracking app
A menstrual cycle tracking app that's open-source and leaves your data on your phone. Use it to track your menstrual cycle and/or for fertility awareness! A menstrual cycle tracking app that's open-source and leaves your data on your phone. Use it to track your menstrual cycle and/or for fertility awareness!
Find more information on [our website](https://bloodyhealth.gitlab.io/). Find more information on [our website](http://dripapp.org/).
[<img src="https://bloodyhealth.gitlab.io/assets/get.png" [<img src="http://dripapp.org/assets/get.png"
alt="Get it here" alt="Get it here"
height="55">](https://bloodyhealth.gitlab.io/release/8.apk) height="55">](http://dripapp.org/release/8.apk)
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" [<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
alt="Get it on F-Droid" alt="Get it on F-Droid"
height="80">](https://f-droid.org/packages/com.drip/) height="80">](https://f-droid.org/packages/com.drip/)
+1 -8
View File
@@ -11,21 +11,19 @@ const Button = ({
children, children,
iconName, iconName,
isCTA, isCTA,
isVisible,
isSmall, isSmall,
onPress, onPress,
testID, testID,
...props ...props
}) => { }) => {
const buttonStyle = isCTA ? styles.cta : styles.regular const buttonStyle = isCTA ? styles.cta : styles.regular
const buttonDisplay = isVisible ? styles.isVisible : null
const textCTA = isCTA ? styles.buttonTextBold : styles.buttonTextRegular const textCTA = isCTA ? styles.buttonTextBold : styles.buttonTextRegular
const textStyle = [textCTA, isSmall ? textSmall : text] const textStyle = [textCTA, isSmall ? textSmall : text]
return ( return (
<TouchableOpacity <TouchableOpacity
onPress={onPress} onPress={onPress}
style={[buttonStyle, buttonDisplay]} style={buttonStyle}
testID={testID} testID={testID}
{...props} {...props}
> >
@@ -39,7 +37,6 @@ Button.propTypes = {
children: PropTypes.node, children: PropTypes.node,
iconName: PropTypes.string, iconName: PropTypes.string,
isCTA: PropTypes.bool, isCTA: PropTypes.bool,
isVisible: PropTypes.bool,
isSmall: PropTypes.bool, isSmall: PropTypes.bool,
onPress: PropTypes.func, onPress: PropTypes.func,
testID: PropTypes.string, testID: PropTypes.string,
@@ -79,10 +76,6 @@ const styles = StyleSheet.create({
borderRadius: 25, borderRadius: 25,
...button, ...button,
}, },
isVisible: {
display: 'none',
...button,
},
buttonTextBold: { buttonTextBold: {
color: 'white', color: 'white',
fontFamily: Fonts.bold, fontFamily: Fonts.bold,
+2 -1
View File
@@ -36,14 +36,15 @@ const AboutSection = () => {
</Segment> </Segment>
<Segment title={labels.donate.title}> <Segment title={labels.donate.title}>
<AppText>{labels.donate.note}</AppText> <AppText>{labels.donate.note}</AppText>
{Platform.OS !== 'ios' && (
<Button <Button
isVisible={Platform.OS === 'ios' ? true : false}
isCTA isCTA
isSmall isSmall
onPress={() => Linking.openURL(links.donate.url)} onPress={() => Linking.openURL(links.donate.url)}
> >
{links.donate.text} {links.donate.text}
</Button> </Button>
)}
</Segment> </Segment>
<Segment title={labels.version.title} last> <Segment title={labels.version.title} last>
<AppText>{require('../../package.json').version}</AppText> <AppText>{require('../../package.json').version}</AppText>
+1 -1
View File
@@ -12,7 +12,7 @@ export default {
text: 'our wiki', text: 'our wiki',
}, },
website: { website: {
url: 'https://bloodyhealth.gitlab.io/', url: 'http://dripapp.org/',
text: 'Website', text: 'Website',
}, },
donate: { donate: {