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"}
|
||||
|
||||
@@ -45,7 +45,7 @@ export default function OrderHistoryScreen() {
|
||||
const [orders, setOrders] = useState<CompletedOrder[]>([]);
|
||||
const [stats, setStats] = useState<ClientStats | null>(null);
|
||||
const [penalties, setPenalties] = useState<PenaltyInfo | null>(null);
|
||||
const [appSettings, setAppSettings] = useState<PublicSettings>({ penalties_enabled: true, show_amende_score: true, points_enabled: true, points_separated: true, referral_enabled: false, pool_names: ['Pool 1', 'Pool 2'], crypto_payment_enabled: false, nowpayments_currencies: [] });
|
||||
const [appSettings, setAppSettings] = useState<PublicSettings>({ penalties_enabled: true, show_amende_score: true, points_enabled: true, points_separated: true, referral_enabled: false, pool_names: ['Pool 1', 'Pool 2'], crypto_payment_enabled: false, nowpayments_currencies: [], crypto_only: false });
|
||||
const [referralBalance, setReferralBalance] = useState(0);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [refreshing, setRefreshing] = useState(false);
|
||||
|
||||
Reference in New Issue
Block a user