fix: заменить Tailwind green/emerald классы на success из темы

Замена green-*/emerald-* на success-* в 8 файлах:
AdminPolicyEdit, AdminBroadcastDetail, AdminAuditLog, ButtonsTab,
VerifyEmail, BackgroundEditor, AdminPolicies, AdminUpdates
This commit is contained in:
Fringg
2026-03-05 10:56:59 +03:00
parent d526d095de
commit 86f75f25a7
8 changed files with 12 additions and 12 deletions

View File

@@ -365,7 +365,7 @@ export function BackgroundEditor() {
className={cn(
'w-full rounded-xl py-3 text-sm font-medium transition-colors',
saveStatus === 'saved'
? 'bg-green-500/20 text-green-400'
? 'bg-success-500/20 text-success-400'
: 'bg-accent-500 text-white hover:bg-accent-600 disabled:opacity-50',
)}
>

View File

@@ -17,7 +17,7 @@ type StyleValue = 'primary' | 'success' | 'danger' | 'default';
const STYLE_OPTIONS: { value: StyleValue; colorClass: string }[] = [
{ value: 'default', colorClass: 'bg-dark-500' },
{ value: 'primary', colorClass: 'bg-blue-500' },
{ value: 'success', colorClass: 'bg-green-500' },
{ value: 'success', colorClass: 'bg-success-500' },
{ value: 'danger', colorClass: 'bg-red-500' },
];
@@ -222,7 +222,7 @@ export function ButtonsTab() {
cfg.style === 'default'
? 'bg-dark-600 text-dark-300'
: cfg.style === 'success'
? 'bg-green-500 text-white'
? 'bg-success-500 text-white'
: cfg.style === 'danger'
? 'bg-red-500 text-white'
: 'bg-blue-500 text-white'

View File

@@ -184,7 +184,7 @@ interface StatusBadgeProps {
function StatusBadge({ status, label }: StatusBadgeProps) {
const colorMap: Record<string, string> = {
success: 'bg-green-500/20 text-green-400',
success: 'bg-success-500/20 text-success-400',
denied: 'bg-red-500/20 text-red-400',
error: 'bg-amber-500/20 text-amber-400',
};
@@ -205,7 +205,7 @@ interface MethodBadgeProps {
function MethodBadge({ method }: MethodBadgeProps) {
const colorMap: Record<string, string> = {
GET: 'bg-blue-500/20 text-blue-400',
POST: 'bg-green-500/20 text-green-400',
POST: 'bg-success-500/20 text-success-400',
PUT: 'bg-amber-500/20 text-amber-400',
PATCH: 'bg-amber-500/20 text-amber-400',
DELETE: 'bg-red-500/20 text-red-400',

View File

@@ -93,7 +93,7 @@ function ChannelBadge({ channel }: { channel?: BroadcastChannel }) {
}
return (
<span className="flex items-center gap-1 rounded-full bg-green-500/20 px-2 py-0.5 text-xs text-green-400">
<span className="flex items-center gap-1 rounded-full bg-success-500/20 px-2 py-0.5 text-xs text-success-400">
<TelegramIcon />
<span className="mx-0.5">+</span>
<EmailIcon />

View File

@@ -145,7 +145,7 @@ function EffectBadge({ effect, className }: EffectBadgeProps) {
<span
className={`inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-semibold ${
isAllow
? 'border-green-500/30 bg-green-500/10 text-green-400'
? 'border-success-500/30 bg-success-500/10 text-success-400'
: 'border-red-500/30 bg-red-500/10 text-red-400'
} ${className ?? ''}`}
>
@@ -329,7 +329,7 @@ export default function AdminPolicies() {
<div className="text-xs text-dark-400">{t('admin.policies.stats.total')}</div>
</div>
<div className="rounded-xl border border-dark-700 bg-dark-800 p-4">
<div className="text-2xl font-bold text-green-400">
<div className="text-2xl font-bold text-success-400">
{sortedPolicies.filter((p) => p.effect === 'allow').length}
</div>
<div className="text-xs text-dark-400">{t('admin.policies.stats.allow')}</div>

View File

@@ -444,7 +444,7 @@ export default function AdminPolicyEdit() {
onClick={() => setFormData((prev) => ({ ...prev, effect: 'allow' }))}
className={`flex-1 rounded-lg border px-3 py-2 text-sm font-medium transition-colors ${
formData.effect === 'allow'
? 'border-green-500/50 bg-green-500/10 text-green-400'
? 'border-success-500/50 bg-success-500/10 text-success-400'
: 'border-dark-600 bg-dark-900 text-dark-400 hover:border-dark-500'
}`}
>

View File

@@ -183,8 +183,8 @@ function VersionBadge({ hasUpdate }: { hasUpdate: boolean }) {
}
return (
<span className="inline-flex items-center gap-1 rounded-full bg-emerald-500/20 px-2.5 py-0.5 text-xs font-medium text-emerald-400">
<span className="h-1.5 w-1.5 rounded-full bg-emerald-400" />
<span className="inline-flex items-center gap-1 rounded-full bg-success-500/20 px-2.5 py-0.5 text-xs font-medium text-success-400">
<span className="h-1.5 w-1.5 rounded-full bg-success-400" />
{t('adminUpdates.upToDate')}
</span>
);

View File

@@ -86,7 +86,7 @@ export default function VerifyEmail() {
{status === 'success' && (
<div>
<div className="mb-4 text-5xl text-green-500 sm:text-6xl"></div>
<div className="mb-4 text-5xl text-success-500 sm:text-6xl"></div>
<h2 className="text-lg font-semibold text-gray-900 sm:text-xl">
{t('emailVerification.success')}
</h2>