chore: update

This commit is contained in:
2026-03-19 09:07:26 +01:00
parent a656ee96c0
commit 35aac29bb4
3 changed files with 26 additions and 1 deletions
+1
View File
@@ -756,6 +756,7 @@ export interface AppSettings {
delivery_schedule: DeliverySchedule;
postal_zones: PostalZone[];
crypto_payment_enabled: boolean;
crypto_only: boolean;
nowpayments_api_key: string;
nowpayments_ipn_secret: string;
nowpayments_currencies: string[];
@@ -655,6 +655,7 @@ export default function SettingsScreen() {
delivery_schedule: DEFAULT_DELIVERY_SCHEDULE,
postal_zones: DEFAULT_POSTAL_ZONES,
crypto_payment_enabled: false,
crypto_only: false,
nowpayments_api_key: "",
nowpayments_ipn_secret: "",
nowpayments_currencies: [],
@@ -1175,6 +1176,29 @@ export default function SettingsScreen() {
/>
</View>
{/* Toggle crypto uniquement */}
<View
pointerEvents={settings.crypto_payment_enabled ? "auto" : "none"}
style={{ opacity: settings.crypto_payment_enabled ? 1 : 0.4 }}
>
<View style={[s.row, { borderTopWidth: 1, borderTopColor: colors.border }]}>
<View style={s.rowLeft}>
<Text style={s.rowLabel}>Crypto uniquement</Text>
<Text style={s.rowDesc}>
Désactive le paiement en espèces seule la crypto est acceptée.
</Text>
</View>
<Switch
value={settings.crypto_only}
onValueChange={(v) =>
setSettings((prev) => ({ ...prev, crypto_only: v }))
}
trackColor={{ false: colors.border, true: "#f7931a" }}
thumbColor="#fff"
/>
</View>
</View>
{/* Config NowPayments */}
<View
pointerEvents={settings.crypto_payment_enabled ? "auto" : "none"}