chore(contribute): hide donation CTAs on Android; keep on iOS; add neutral support link to https://alerte-secours.fr for Play policy compliance
This commit is contained in:
parent
5baca61ec3
commit
b24a95e29a
1 changed files with 136 additions and 72 deletions
|
@ -4,6 +4,7 @@ import {
|
||||||
ScrollView,
|
ScrollView,
|
||||||
Linking,
|
Linking,
|
||||||
Alert,
|
Alert,
|
||||||
|
Platform,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
import { MaterialIcons, AntDesign } from "@expo/vector-icons";
|
import { MaterialIcons, AntDesign } from "@expo/vector-icons";
|
||||||
|
@ -31,6 +32,8 @@ export default function Contribute() {
|
||||||
const styles = useStyles();
|
const styles = useStyles();
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
|
|
||||||
|
const donateAllowed = Platform.OS === "ios";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView style={{ flex: 1 }}>
|
<ScrollView style={{ flex: 1 }}>
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
|
@ -42,80 +45,97 @@ export default function Contribute() {
|
||||||
|
|
||||||
{/* Description */}
|
{/* Description */}
|
||||||
<Text style={styles.description}>
|
<Text style={styles.description}>
|
||||||
Alerte-Secours est une application mobile citoyenne, gratuite, sans
|
Alerte-Secours est une application citoyenne d'intérêt général, elle
|
||||||
publicité ni exploitation de données.
|
est gratuite, sans publicité ni exploitation de données.
|
||||||
{"\n\n"}
|
{"\n"}
|
||||||
Si vous souhaitez contribuer à son développement, sa maintenance et
|
{donateAllowed
|
||||||
son indépendance :
|
? `Si vous souhaitez contribuer à son développement, sa maintenance et son indépendance :`
|
||||||
|
: ""}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
{/* Liberapay Button */}
|
<View style={styles.donationSection}>
|
||||||
<TouchableOpacity
|
{donateAllowed ? (
|
||||||
style={[
|
<>
|
||||||
styles.donationButton,
|
<Text style={styles.sectionTitle}>Soutenir le projet</Text>
|
||||||
styles.buttonContent,
|
{/* Liberapay Button */}
|
||||||
styles.liberapayButton,
|
<TouchableOpacity
|
||||||
]}
|
style={[
|
||||||
onPress={() => openURL("https://liberapay.com/alerte-secours")}
|
styles.donationButton,
|
||||||
activeOpacity={0.8}
|
styles.buttonContent,
|
||||||
>
|
styles.liberapayButton,
|
||||||
<View style={styles.iconContainer}>
|
]}
|
||||||
<MaterialIcons name="circle" style={styles.iconDonation} />
|
onPress={() => openURL("https://liberapay.com/alerte-secours")}
|
||||||
</View>
|
activeOpacity={0.8}
|
||||||
<View style={styles.buttonTextContainer}>
|
>
|
||||||
<Text style={styles.buttonLabel}>Liberapay – Soutien régulier</Text>
|
<View style={styles.iconContainer}>
|
||||||
<Text style={styles.buttonDescription}>
|
<MaterialIcons name="circle" style={styles.iconDonation} />
|
||||||
Pour un soutien récurrent et engagé. Chaque don contribue à
|
</View>
|
||||||
assurer la stabilité du service sur le long terme.
|
<View style={styles.buttonTextContainer}>
|
||||||
</Text>
|
<Text style={styles.buttonLabel}>
|
||||||
</View>
|
Liberapay – Soutien régulier
|
||||||
</TouchableOpacity>
|
</Text>
|
||||||
|
<Text style={styles.buttonDescription}>
|
||||||
|
Pour un soutien récurrent et engagé. Chaque don contribue à
|
||||||
|
assurer la stabilité du service sur le long terme.
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
|
||||||
{/* Buy Me a Coffee Button */}
|
{/* Buy Me a Coffee Button */}
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={[
|
style={[
|
||||||
styles.donationButton,
|
styles.donationButton,
|
||||||
styles.buttonContent,
|
styles.buttonContent,
|
||||||
styles.buymeacoffeeButton,
|
styles.buymeacoffeeButton,
|
||||||
]}
|
]}
|
||||||
onPress={() => openURL("https://buymeacoffee.com/alertesecours")}
|
onPress={() =>
|
||||||
activeOpacity={0.8}
|
openURL("https://buymeacoffee.com/alertesecours")
|
||||||
>
|
}
|
||||||
<View style={styles.iconContainer}>
|
activeOpacity={0.8}
|
||||||
<MaterialIcons name="local-cafe" style={styles.iconDonation} />
|
>
|
||||||
</View>
|
<View style={styles.iconContainer}>
|
||||||
<View style={styles.buttonTextContainer}>
|
<MaterialIcons
|
||||||
<Text style={styles.buttonLabel}>
|
name="local-cafe"
|
||||||
Buy Me a Coffee – Don ponctuel
|
style={styles.iconDonation}
|
||||||
</Text>
|
/>
|
||||||
<Text style={styles.buttonDescription}>
|
</View>
|
||||||
Pour un coup de pouce ponctuel, un café virtuel pour encourager le
|
<View style={styles.buttonTextContainer}>
|
||||||
travail accompli !
|
<Text style={styles.buttonLabel}>
|
||||||
</Text>
|
Buy Me a Coffee – Don ponctuel
|
||||||
</View>
|
</Text>
|
||||||
</TouchableOpacity>
|
<Text style={styles.buttonDescription}>
|
||||||
|
Pour un coup de pouce ponctuel, un café virtuel pour
|
||||||
|
encourager le travail accompli !
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
|
||||||
{/* GitHub Sponsors Button */}
|
{/* GitHub Sponsors Button */}
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={[
|
style={[
|
||||||
styles.donationButton,
|
styles.donationButton,
|
||||||
styles.buttonContent,
|
styles.buttonContent,
|
||||||
styles.githubButton,
|
styles.githubButton,
|
||||||
]}
|
]}
|
||||||
onPress={() => openURL("https://github.com/sponsors/alerte-secours")}
|
onPress={() =>
|
||||||
activeOpacity={0.8}
|
openURL("https://github.com/sponsors/alerte-secours")
|
||||||
>
|
}
|
||||||
<View style={styles.iconContainer}>
|
activeOpacity={0.8}
|
||||||
<AntDesign name="github" style={styles.iconDonation} />
|
>
|
||||||
</View>
|
<View style={styles.iconContainer}>
|
||||||
<View style={styles.buttonTextContainer}>
|
<AntDesign name="github" style={styles.iconDonation} />
|
||||||
<Text style={styles.buttonLabel}>GitHub Sponsors</Text>
|
</View>
|
||||||
<Text style={styles.buttonDescription}>
|
<View style={styles.buttonTextContainer}>
|
||||||
Pour les développeurs et utilisateurs de GitHub : soutenez le
|
<Text style={styles.buttonLabel}>GitHub Sponsors</Text>
|
||||||
projet directement via votre compte.
|
<Text style={styles.buttonDescription}>
|
||||||
</Text>
|
Pour les développeurs et utilisateurs de GitHub : soutenez
|
||||||
</View>
|
le projet directement via votre compte.
|
||||||
</TouchableOpacity>
|
</Text>
|
||||||
|
</View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
</View>
|
||||||
|
|
||||||
{/* Collaboration Section */}
|
{/* Collaboration Section */}
|
||||||
<View style={styles.collaborationSection}>
|
<View style={styles.collaborationSection}>
|
||||||
|
@ -138,6 +158,18 @@ export default function Contribute() {
|
||||||
<MaterialIcons name="email" style={styles.contactIcon} />
|
<MaterialIcons name="email" style={styles.contactIcon} />
|
||||||
<Text style={styles.contactText}>contact@alertesecours.fr</Text>
|
<Text style={styles.contactText}>contact@alertesecours.fr</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
{!donateAllowed && (
|
||||||
|
<Text style={styles.supportFooterText}>
|
||||||
|
Vous pouvez aussi nous soutenir financièrement, pour en savoir
|
||||||
|
plus, rendez-vous sur notre site{" "}
|
||||||
|
<Text
|
||||||
|
style={styles.linkText}
|
||||||
|
onPress={() => openURL("https://alerte-secours.fr")}
|
||||||
|
>
|
||||||
|
alerte-secours.fr
|
||||||
|
</Text>
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
@ -164,7 +196,7 @@ const useStyles = createStyles(({ theme: { colors, custom } }) => ({
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 26,
|
lineHeight: 26,
|
||||||
color: colors.onBackground,
|
color: colors.onBackground,
|
||||||
marginBottom: 36,
|
marginBottom: 0,
|
||||||
textAlign: "left",
|
textAlign: "left",
|
||||||
},
|
},
|
||||||
donationButton: {
|
donationButton: {
|
||||||
|
@ -229,9 +261,41 @@ const useStyles = createStyles(({ theme: { colors, custom } }) => ({
|
||||||
githubButton: {
|
githubButton: {
|
||||||
backgroundColor: custom.donation.github,
|
backgroundColor: custom.donation.github,
|
||||||
},
|
},
|
||||||
|
// Android support link (no CTA styling)
|
||||||
|
androidSupportContainer: {
|
||||||
|
marginVertical: 8,
|
||||||
|
marginBottom: 24,
|
||||||
|
paddingVertical: 8,
|
||||||
|
},
|
||||||
|
androidSupportText: {
|
||||||
|
fontSize: 15,
|
||||||
|
color: colors.primary,
|
||||||
|
textAlign: "left",
|
||||||
|
},
|
||||||
|
linkText: {
|
||||||
|
color: colors.primary,
|
||||||
|
textDecorationLine: "underline",
|
||||||
|
},
|
||||||
|
supportFooterText: {
|
||||||
|
marginTop: 12,
|
||||||
|
fontSize: 15,
|
||||||
|
color: colors.onSurfaceVariant,
|
||||||
|
textAlign: "center",
|
||||||
|
},
|
||||||
|
// Donation section
|
||||||
|
sectionTitle: {
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "700",
|
||||||
|
color: colors.primary,
|
||||||
|
marginTop: 12,
|
||||||
|
marginBottom: 12,
|
||||||
|
},
|
||||||
|
donationSection: {
|
||||||
|
marginBottom: 24,
|
||||||
|
},
|
||||||
// Collaboration section styles
|
// Collaboration section styles
|
||||||
collaborationSection: {
|
collaborationSection: {
|
||||||
marginTop: 40,
|
marginTop: 32,
|
||||||
padding: 20,
|
padding: 20,
|
||||||
backgroundColor: colors.surfaceVariant,
|
backgroundColor: colors.surfaceVariant,
|
||||||
borderRadius: 16,
|
borderRadius: 16,
|
||||||
|
|
Loading…
Add table
Reference in a new issue