feat: add SVG brand icons for payment methods

Replace emoji icons with proper SVG brand-colored icons for all 12
payment providers (YooKassa, CloudPayments, CryptoBot, Telegram Stars,
Heleket, MulenPay, PAL24, Platega, WATA, Freekassa, Tribute, Kassa AI).
This commit is contained in:
Fringg
2026-02-07 03:36:25 +03:00
parent 83aeae81b8
commit c4f228fba6
4 changed files with 184 additions and 42 deletions

View File

@@ -6,6 +6,7 @@ import { adminPaymentMethodsApi } from '../api/adminPaymentMethods';
import type { PromoGroupSimple } from '../types';
import { usePlatform } from '../platform/hooks/usePlatform';
import { createNumberInputHandler, toNumber } from '../utils/inputHelpers';
import PaymentMethodIcon from '@/components/PaymentMethodIcon';
const BackIcon = () => (
<svg
@@ -19,21 +20,6 @@ const BackIcon = () => (
</svg>
);
const METHOD_ICONS: Record<string, string> = {
telegram_stars: '⭐',
tribute: '🎁',
cryptobot: '🪙',
heleket: '⚡',
yookassa: '🏦',
mulenpay: '💳',
pal24: '💸',
platega: '💰',
wata: '💧',
freekassa: '💵',
cloudpayments: '☁️',
kassa_ai: '🏦',
};
const METHOD_LABELS: Record<string, string> = {
telegram_stars: 'Telegram Stars',
tribute: 'Tribute',
@@ -195,7 +181,6 @@ export default function AdminPaymentMethodEdit() {
}
const displayName = config.display_name || config.default_display_name;
const icon = METHOD_ICONS[config.method_id] || '💳';
return (
<div className="space-y-6">
@@ -210,8 +195,8 @@ export default function AdminPaymentMethodEdit() {
<BackIcon />
</button>
)}
<div className="flex h-10 w-10 items-center justify-center rounded-xl bg-dark-700/50 text-xl">
{icon}
<div className="flex h-10 w-10 items-center justify-center">
<PaymentMethodIcon method={config.method_id} className="h-10 w-10" />
</div>
<div>
<h1 className="text-2xl font-bold text-dark-50">{displayName}</h1>