fix: enforce semantic contrast across admin
Local Build and Deploy / deploy (push) Successful in 44s
Local Build and Deploy / deploy (push) Successful in 44s
This commit is contained in:
1 parent
45c8178cfa
commit
f0b4bc1630
86 files changed
+438
-338
No files matched your search
@@ -63,11 +63,11 @@ export default async function AdminUserEdit({ params }: { params: Promise<{ id:
|
||||
} catch {
|
||||
return (
|
||||
<main>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">
|
||||
<p className="text-sm theme-text-muted dark:theme-text-muted">
|
||||
<Link href="/admin/users">← {t("title")}</Link>
|
||||
</p>
|
||||
<h1>{t("title")}</h1>
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400">{t("loadError")}</p>
|
||||
<p className="text-xs theme-text-muted dark:theme-text-muted">{t("loadError")}</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@@ -76,7 +76,7 @@ export default async function AdminUserEdit({ params }: { params: Promise<{ id:
|
||||
|
||||
return (
|
||||
<main>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400 mb-2">
|
||||
<p className="text-sm theme-text-muted dark:theme-text-muted mb-2">
|
||||
<Link href={`/admin/users/${user.id}`}>← {user.username}</Link>
|
||||
</p>
|
||||
<div className="flex items-center gap-3 mb-6">
|
||||
@@ -141,7 +141,7 @@ export default async function AdminUserEdit({ params }: { params: Promise<{ id:
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400">{t("hint")}</p>
|
||||
<p className="text-xs theme-text-muted dark:theme-text-muted">{t("hint")}</p>
|
||||
|
||||
<div className="flex gap-2 mt-2">
|
||||
<button type="submit" className="btn btn-primary">
|
||||
|
||||
@@ -127,7 +127,7 @@ export function UserQuickActions({ userId, username, isOnline }: UserQuickAction
|
||||
<Unplug className="mr-2 h-4 w-4" />
|
||||
Disconnect
|
||||
{isOnline && (
|
||||
<Badge variant="default" className="ml-auto text-[10px] bg-green-600">
|
||||
<Badge variant="default" className="ml-auto text-[10px] bg-[var(--color-success-subtle)]">
|
||||
Online
|
||||
</Badge>
|
||||
)}
|
||||
@@ -209,7 +209,7 @@ export function UserQuickActions({ userId, username, isOnline }: UserQuickAction
|
||||
{newPassword}
|
||||
</code>
|
||||
<Button variant="ghost" size="icon" onClick={copyPassword}>
|
||||
{copied ? <Check className="h-4 w-4 text-green-500" /> : <Copy className="h-4 w-4" />}
|
||||
{copied ? <Check className="h-4 w-4 text-[var(--color-success-text-readable)]" /> : <Copy className="h-4 w-4" />}
|
||||
</Button>
|
||||
</div>
|
||||
</DialogContent>
|
||||
|
||||
@@ -82,10 +82,10 @@ export function UserHero({
|
||||
className={`absolute -top-1 -right-1 flex h-4 w-4 ${isOnline ? '' : 'opacity-50'}`}
|
||||
>
|
||||
{isOnline && (
|
||||
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75" />
|
||||
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-[var(--color-success)] opacity-75" />
|
||||
)}
|
||||
<span
|
||||
className={`relative inline-flex rounded-full h-4 w-4 border-2 border-card ${isOnline ? 'bg-green-500' : 'bg-zinc-400'}`}
|
||||
className={`relative inline-flex rounded-full h-4 w-4 border-2 border-card ${isOnline ? 'bg-[var(--color-success-subtle)]' : 'bg-zinc-400'}`}
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@@ -129,7 +129,7 @@ export function UserHero({
|
||||
<Badge>{user.permission.rankName || `Rank ${user.rank}`}</Badge>
|
||||
<Badge
|
||||
variant={isOnline ? 'default' : 'outline'}
|
||||
className={isOnline ? 'bg-green-600' : ''}
|
||||
className={isOnline ? 'bg-[var(--color-success-subtle)]' : ''}
|
||||
>
|
||||
{isOnline ? (
|
||||
<>
|
||||
@@ -143,7 +143,7 @@ export function UserHero({
|
||||
</Badge>
|
||||
{activeBan && <Badge variant="destructive">Banned</Badge>}
|
||||
{user.twoFactorConfirmed ? (
|
||||
<Badge variant="outline" className="border-green-500/50 text-green-600">
|
||||
<Badge variant="outline" className="border-[var(--color-success-border)] text-[var(--color-success-text-readable)]">
|
||||
<Shield className="mr-1 h-3 w-3" /> 2FA
|
||||
</Badge>
|
||||
) : null}
|
||||
@@ -152,12 +152,12 @@ export function UserHero({
|
||||
{/* Currency row */}
|
||||
<div className="flex flex-wrap gap-3 pt-1">
|
||||
<div className="flex items-center gap-1.5 text-sm">
|
||||
<Coins className="h-4 w-4 text-yellow-500" />
|
||||
<Coins className="h-4 w-4 text-[var(--color-warning-text-readable)]" />
|
||||
<span className="font-semibold">{user.credits.toLocaleString()}</span>
|
||||
<span className="text-muted-foreground text-xs">credits</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-1.5 text-sm">
|
||||
<Diamond className="h-4 w-4 text-blue-400" />
|
||||
<Diamond className="h-4 w-4 text-[var(--color-info-text-readable)]" />
|
||||
<span className="font-semibold">{diamonds.toLocaleString()}</span>
|
||||
<span className="text-muted-foreground text-xs">diamonds</span>
|
||||
</div>
|
||||
|
||||
@@ -93,7 +93,7 @@ export default async function MultiAccountsPage({
|
||||
<span className="text-xs text-muted-foreground">#{acc.id}</span>
|
||||
{acc.rank >= 5 && <Badge variant="outline">staff</Badge>}
|
||||
{acc.online === '1' && (
|
||||
<span className="h-1.5 w-1.5 rounded-full bg-green-500" />
|
||||
<span className="h-1.5 w-1.5 rounded-full bg-[var(--color-success-subtle)]" />
|
||||
)}
|
||||
</Link>
|
||||
))}
|
||||
|
||||
@@ -122,7 +122,7 @@ function getColumns(canEdit: boolean): DataTableColumn<UserRow>[] {
|
||||
],
|
||||
render: (value) =>
|
||||
value === '1' ? (
|
||||
<span className="flex items-center gap-1.5 text-green-600">
|
||||
<span className="flex items-center gap-1.5 text-[var(--color-success-text-readable)]">
|
||||
<Wifi className="h-3.5 w-3.5" /> Online
|
||||
</span>
|
||||
) : (
|
||||
|
||||
Reference in new issue
Block a user