fix: use semantic colors across admin pages
Local Build and Deploy / deploy (push) Successful in 49s
Local Build and Deploy / deploy (push) Successful in 49s
This commit is contained in:
1 parent
0fe482009c
commit
84e4123f09
83 files changed
+466
-455
No files matched your search
@@ -80,14 +80,14 @@ export default async function AdminUserEdit({ params }: { params: Promise<{ id:
|
||||
<Link href={`/admin/users/${user.id}`}>← {user.username}</Link>
|
||||
</p>
|
||||
<div className="flex items-center gap-3 mb-6">
|
||||
<div className="w-10 h-10 rounded-xl bg-gradient-to-br from-[var(--color-primary)]/20 to-[var(--color-primary)]/5 grid place-items-center">
|
||||
<User size={20} className="text-[var(--color-primary)]" />
|
||||
<div className="w-10 h-10 rounded-xl bg-gradient-to-br from-[var(--admin-accent)]/20 to-[var(--admin-accent)]/5 grid place-items-center">
|
||||
<User size={20} className="text-[var(--admin-accent)]" />
|
||||
</div>
|
||||
<div>
|
||||
<h1 className="m-0 text-xl font-extrabold text-[var(--color-text)]">
|
||||
<h1 className="m-0 text-xl font-extrabold text-[var(--admin-text)]">
|
||||
{t("title", { username: user.username })}
|
||||
</h1>
|
||||
<p className="m-0 text-xs text-[var(--color-text-muted)] mt-0.5">{t("idLabel", { id: user.id })}</p>
|
||||
<p className="m-0 text-xs text-[var(--admin-text-muted)] mt-0.5">{t("idLabel", { id: user.id })}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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-[var(--color-success-subtle)]">
|
||||
<Badge variant="default" className="ml-auto text-[10px] bg-[var(--admin-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-[var(--color-success-text-readable)]" /> : <Copy className="h-4 w-4" />}
|
||||
{copied ? <Check className="h-4 w-4 text-[var(--admin-success)]" /> : <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-[var(--color-success)] opacity-75" />
|
||||
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-[var(--admin-success)] opacity-75" />
|
||||
)}
|
||||
<span
|
||||
className={`relative inline-flex rounded-full h-4 w-4 border-2 border-card ${isOnline ? 'bg-[var(--color-success-subtle)]' : 'bg-zinc-400'}`}
|
||||
className={`relative inline-flex rounded-full h-4 w-4 border-2 border-card ${isOnline ? 'bg-[var(--admin-success-subtle)]' : 'bg-[var(--admin-text-muted)]'}`}
|
||||
/>
|
||||
</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-[var(--color-success-subtle)]' : ''}
|
||||
className={isOnline ? 'bg-[var(--admin-success-subtle)]' : ''}
|
||||
>
|
||||
{isOnline ? (
|
||||
<>
|
||||
@@ -143,7 +143,7 @@ export function UserHero({
|
||||
</Badge>
|
||||
{activeBan && <Badge variant="destructive">Banned</Badge>}
|
||||
{user.twoFactorConfirmed ? (
|
||||
<Badge variant="outline" className="border-[var(--color-success-border)] text-[var(--color-success-text-readable)]">
|
||||
<Badge variant="outline" className="border-[var(--admin-success-border)] text-[var(--admin-success)]">
|
||||
<Shield className="mr-1 h-3 w-3" /> 2FA
|
||||
</Badge>
|
||||
) : null}
|
||||
@@ -152,22 +152,22 @@ 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-[var(--color-warning-text-readable)]" />
|
||||
<Coins className="h-4 w-4 text-[var(--admin-warning)]" />
|
||||
<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-[var(--color-info-text-readable)]" />
|
||||
<Diamond className="h-4 w-4 text-[var(--admin-info)]" />
|
||||
<span className="font-semibold">{diamonds.toLocaleString()}</span>
|
||||
<span className="text-muted-foreground text-xs">diamonds</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-1.5 text-sm">
|
||||
<Sparkles className="h-4 w-4 text-purple-400" />
|
||||
<Sparkles className="h-4 w-4 text-[var(--admin-accent-text)]" />
|
||||
<span className="font-semibold">{duckets.toLocaleString()}</span>
|
||||
<span className="text-muted-foreground text-xs">duckets</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-1.5 text-sm">
|
||||
<Gem className="h-4 w-4 text-pink-400" />
|
||||
<Gem className="h-4 w-4 text-[var(--admin-error)]" />
|
||||
<span className="font-semibold">{user.pixels.toLocaleString()}</span>
|
||||
<span className="text-muted-foreground text-xs">pixels</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-[var(--color-success-subtle)]" />
|
||||
<span className="h-1.5 w-1.5 rounded-full bg-[var(--admin-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-[var(--color-success-text-readable)]">
|
||||
<span className="flex items-center gap-1.5 text-[var(--admin-success)]">
|
||||
<Wifi className="h-3.5 w-3.5" /> Online
|
||||
</span>
|
||||
) : (
|
||||
|
||||
Reference in new issue
Block a user