feat: merchant specific fees, TRON & BTC support, coin logos, and bug fixes
This commit is contained in:
@@ -16,7 +16,8 @@ import {
|
||||
export default function AdminSettingsPage() {
|
||||
const [settings, setSettings] = useState({
|
||||
sol_platform_address: '',
|
||||
evm_platform_address: ''
|
||||
evm_platform_address: '',
|
||||
default_fee_percent: '1.0'
|
||||
});
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const [isSaving, setIsSaving] = useState(false);
|
||||
@@ -34,7 +35,8 @@ export default function AdminSettingsPage() {
|
||||
if (data.error) throw new Error(data.error);
|
||||
setSettings({
|
||||
sol_platform_address: data.sol_platform_address || '',
|
||||
evm_platform_address: data.evm_platform_address || ''
|
||||
evm_platform_address: data.evm_platform_address || '',
|
||||
default_fee_percent: data.default_fee_percent || '1.0'
|
||||
});
|
||||
} catch (err: any) {
|
||||
setMessage({ type: 'error', text: 'Ayarlar yüklenemedi: ' + err.message });
|
||||
@@ -65,7 +67,7 @@ export default function AdminSettingsPage() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="max-w-4xl mx-auto space-y-10 animate-in fade-in slide-in-from-bottom-4 duration-700">
|
||||
<div className="max-w-4xl mx-auto space-y-10 animate-in fade-in slide-in-from-bottom-4 duration-700 pb-20">
|
||||
{/* Header */}
|
||||
<div className="flex flex-col md:flex-row md:items-center justify-between gap-6">
|
||||
<div>
|
||||
@@ -80,6 +82,37 @@ export default function AdminSettingsPage() {
|
||||
|
||||
{/* Main Form */}
|
||||
<form onSubmit={handleSave} className="space-y-8">
|
||||
{/* Fee Setting Card */}
|
||||
<div className="bg-white p-10 rounded-[48px] border border-gray-100 shadow-sm space-y-10">
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="w-12 h-12 bg-emerald-50 rounded-2xl flex items-center justify-center text-emerald-600">
|
||||
<Zap size={24} />
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-xl font-black text-gray-900">Komisyon (Fee) Ayarları</h3>
|
||||
<p className="text-xs text-gray-400 font-bold uppercase tracking-widest mt-1">Sistem geneli varsayılan işlem kesintisi</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="max-w-xs space-y-3">
|
||||
<label className="text-[10px] font-black text-gray-400 uppercase tracking-[0.2em] ml-1">Yüzdelik Kesinti (%)</label>
|
||||
<div className="relative">
|
||||
<div className="absolute right-6 top-1/2 -translate-y-1/2 text-gray-400 font-black">%</div>
|
||||
<input
|
||||
type="number"
|
||||
step="0.1"
|
||||
min="0"
|
||||
max="100"
|
||||
required
|
||||
value={settings.default_fee_percent}
|
||||
onChange={(e) => setSettings({ ...settings, default_fee_percent: e.target.value })}
|
||||
className="w-full pl-8 pr-12 py-5 bg-gray-50 border-2 border-transparent focus:border-emerald-500 focus:bg-white rounded-[24px] outline-none transition-all font-black text-gray-900 text-lg"
|
||||
/>
|
||||
</div>
|
||||
<p className="text-[10px] text-gray-400 font-medium px-1">Örn: 1.0 (Yüzde bir), 2.5 (Yüzde iki buçuk)</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Platform Addresses Card */}
|
||||
<div className="bg-white p-10 rounded-[48px] border border-gray-100 shadow-sm space-y-10">
|
||||
<div className="flex items-center gap-4">
|
||||
|
||||
Reference in New Issue
Block a user