mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix(admin-wheel): unify prize-order banner buttons + drop hardcoded i18n fallbacks
The unsaved-order banner used ad-hoc inline button classes (rounded-lg bg-warning-500 / border bg-dark-700) instead of the shared btn-primary / btn-secondary, plus t(...) || 'русский текст' fallbacks that would leak Russian to non-RU locales. The keys exist in all four locales, so the fallbacks were dead code — switched to the shared buttons and plain keys.
This commit is contained in:
@@ -777,28 +777,22 @@ export default function AdminWheel() {
|
||||
<div className="flex items-center gap-3 rounded-xl border border-warning-500/30 bg-warning-500/10 p-4">
|
||||
<div className="flex-1">
|
||||
<p className="text-sm font-medium text-warning-400">
|
||||
{t('admin.wheel.prizes.unsavedOrder') || 'Есть несохраненные изменения порядка'}
|
||||
{t('admin.wheel.prizes.unsavedOrder')}
|
||||
</p>
|
||||
<p className="text-xs text-warning-400/70">
|
||||
{t('admin.wheel.prizes.unsavedOrderHint') ||
|
||||
'Сохраните изменения или отмените их'}
|
||||
{t('admin.wheel.prizes.unsavedOrderHint')}
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<button
|
||||
onClick={handleDiscardOrderChanges}
|
||||
className="rounded-lg border border-dark-600 bg-dark-700 px-4 py-2 text-sm text-dark-200 transition-colors hover:bg-dark-600"
|
||||
>
|
||||
{t('common.cancel') || 'Отменить'}
|
||||
<button onClick={handleDiscardOrderChanges} className="btn-secondary">
|
||||
{t('common.cancel')}
|
||||
</button>
|
||||
<button
|
||||
onClick={handleSavePrizeOrder}
|
||||
disabled={reorderPrizesMutation.isPending}
|
||||
className="rounded-lg bg-warning-500 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-warning-600 disabled:opacity-50"
|
||||
className="btn-primary"
|
||||
>
|
||||
{reorderPrizesMutation.isPending
|
||||
? t('common.saving') || 'Сохранение...'
|
||||
: t('common.save') || 'Сохранить'}
|
||||
{reorderPrizesMutation.isPending ? t('common.saving') : t('common.save')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user