chore: update
This commit is contained in:
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user