chore: remove dead code, unused CSS, unused components, and clean up git tracking
- Remove storage/logs/ and prod.log from git tracking; add to .gitignore - Remove unused AvatarCarousel and ArticleSlider components - Remove unused SkeletonTable export from ui.tsx - Remove unused ChevronDown import from admin layout - Remove 13 unused CSS classes (icon-base, nav-*, navigation-icon*, .app.dark, text-body, transition-base, card-base, admin-info-grid, .coin.*) - Remove duplicate translation keys (openMenu/closeMenu in en.json) - Fix admin-bans to use Prisma-generated bans_type enum - Create shared AdminPageHeader component and formatDate utility - Add logger and generateRequestId for structured logging - All 58 tests pass, typecheck clean, build succeeds
This commit is contained in:
1 parent
c5db7f5156
commit
fc57fb06d1
18 files changed
+40
-2551
No files matched your search
@@ -6,3 +6,7 @@ next-env.d.ts
|
||||
*.tsbuildinfo
|
||||
# Prisma client is generated by `prisma generate`
|
||||
src/generated/
|
||||
# Runtime logs (not part of the codebase)
|
||||
storage/logs/
|
||||
prod.log
|
||||
*.log
|
||||
@@ -1,14 +0,0 @@
|
||||
|
||||
> atomcms-next@ start /var/www/atom-nexst
|
||||
> next start
|
||||
|
||||
▲ Next.js 16.2.10
|
||||
- Local: http://localhost:3000
|
||||
- Network: http://5.252.100.130:3000
|
||||
✓ Ready in 108ms
|
||||
prisma:error
|
||||
Invalid `prisma.websiteLoginLogs.create()` invocation:
|
||||
|
||||
|
||||
The table `website_login_logs` does not exist in the current database.
|
||||
ELIFECYCLE Command failed.
|
||||
@@ -5,8 +5,9 @@ import { requireStaffRateLimited as requireStaff } from "@/lib/admin/guard";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
import { rcon } from "@/lib/services/rcon";
|
||||
import { logStaffActivity } from "@/lib/services/staff-activity";
|
||||
import type { $Enums } from "@/generated/prisma/client";
|
||||
|
||||
type BanType = "account" | "ip" | "machine" | "super";
|
||||
type BanType = $Enums.bans_type;
|
||||
const BAN_TYPES: ReadonlySet<string> = new Set(["account", "ip", "machine", "super"]);
|
||||
const PERMANENT_SECONDS = 100 * 365 * 24 * 3600;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
Store, ShoppingCart, Receipt, Ticket, CreditCard, Gem, Award, Trophy, Calendar,
|
||||
Radio, History,
|
||||
Terminal, Monitor, Bell, FileText, Filter, Wrench, Settings, DoorOpen, Mail, Palette, Cog,
|
||||
ChevronDown, LogOut,
|
||||
LogOut,
|
||||
} from "lucide-react";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
+1
-80
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,21 @@
|
||||
import type { LucideIcon } from "lucide-react";
|
||||
|
||||
interface AdminPageHeaderProps {
|
||||
icon: LucideIcon;
|
||||
title: string;
|
||||
subtitle: string;
|
||||
}
|
||||
|
||||
export function AdminPageHeader({ icon: Icon, title, subtitle }: AdminPageHeaderProps) {
|
||||
return (
|
||||
<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">
|
||||
<Icon size={20} className="text-[var(--color-primary)]" />
|
||||
</div>
|
||||
<div>
|
||||
<h1 className="m-0 text-xl font-extrabold text-[var(--color-text)]">{title}</h1>
|
||||
<p className="m-0 text-xs text-[var(--color-text-muted)] mt-0.5">{subtitle}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -135,26 +135,4 @@ export function SkeletonCard({ lines = 3 }: { lines?: number }) {
|
||||
);
|
||||
}
|
||||
|
||||
export function SkeletonTable({ rows = 5 }: { rows?: number }) {
|
||||
return (
|
||||
<div className="content-card" style={{ padding: "0.5rem 1rem 1rem" }}>
|
||||
{Array.from({ length: rows }).map((_, i) => (
|
||||
<div key={i} style={{ display: "flex", alignItems: "center", gap: "0.75rem", padding: "0.6rem 0", borderTop: i > 0 ? "1px solid color-mix(in srgb, var(--color-text-muted) 12%, transparent)" : undefined }}>
|
||||
{i === 0 ? (
|
||||
<>
|
||||
<Skeleton style={{ height: "12px", width: "30%" }} />
|
||||
<Skeleton style={{ height: "12px", width: "20%" }} />
|
||||
<Skeleton style={{ height: "12px", width: "25%", marginLeft: "auto" }} />
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Skeleton style={{ width: "28px", height: "28px", borderRadius: "8px" }} />
|
||||
<Skeleton style={{ height: "14px", width: "35%" }} />
|
||||
<Skeleton style={{ height: "14px", width: "20%", marginLeft: "auto" }} />
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/** Format a Date as 'YYYY-MM-DD HH:MM:SS' — used across admin and radio pages. */
|
||||
export function formatDateTime(d: Date | null | undefined): string {
|
||||
return d ? d.toISOString().slice(0, 19).replace("T", " ") : "";
|
||||
}
|
||||
|
||||
/** Format a Date as 'YYYY-MM-DD' — used across radio list pages. */
|
||||
export function formatDate(d: Date | null | undefined): string {
|
||||
return d ? d.toISOString().slice(0, 10) : "";
|
||||
}
|
||||
@@ -21,9 +21,7 @@
|
||||
"admin": "Admin",
|
||||
"openMenu": "Open menu",
|
||||
"closeMenu": "Close menu",
|
||||
"drawBadge": "Draw badge",
|
||||
"openMenu": "Open menu",
|
||||
"closeMenu": "Close menu"
|
||||
"drawBadge": "Draw badge"
|
||||
},
|
||||
"header": {
|
||||
"online": "{count} {hotel} online",
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<!-- To: [email protected] | From: | Subject: Verify your email · Epicnabbo -->
|
||||
<div style="font-family:sans-serif;line-height:1.5;color:#0f172a">
|
||||
<h2 style="margin:0 0 0.5rem">Verify your email</h2>
|
||||
<p>Welcome to Epicnabbo! Confirm this email address to finish setting up your account.</p>
|
||||
<p style="margin:1.25rem 0">
|
||||
<a href="https://epicnabbo.nl/verify?token=5e21ef6e09952e9bb7257d54c1fe896713c0f05e6d92a1f8669869d875ab2693&email=juanedavid%40hotmail.com"
|
||||
style="display:inline-block;padding:0.6rem 1.2rem;border-radius:8px;background:#eeb425;color:#1a1a2e;font-weight:700;text-decoration:none">
|
||||
Verify email
|
||||
</a>
|
||||
</p>
|
||||
<p style="color:#64748b;font-size:0.875rem">If the button doesn't work, paste this link into your browser:</p>
|
||||
<p style="color:#64748b;font-size:0.875rem;word-break:break-all">https://epicnabbo.nl/verify?token=5e21ef6e09952e9bb7257d54c1fe896713c0f05e6d92a1f8669869d875ab2693&email=juanedavid%40hotmail.com</p>
|
||||
</div>
|
||||
@@ -1,74 +0,0 @@
|
||||
[H[2J[3J[1;36m
|
||||
|
||||
╔═══════════════════════════════════════════════════════════════════════════╗
|
||||
║ ║
|
||||
║ ███████╗███╗ ███╗ █████╗ ██████╗ ████████╗ ║
|
||||
║ ██╔════╝████╗ ████║██╔══██╗██╔══██╗╚══██╔══╝ ║
|
||||
║ █████╗ ██╔████╔██║███████║██████╔╝ ██║ ║
|
||||
║ ██╔══╝ ██║╚██╔╝██║██╔══██║██╔══██╗ ██║ ║
|
||||
║ ███████╗██║ ╚═╝ ██║██║ ██║██║ ██║ ██║ ║
|
||||
║ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ║
|
||||
║ ║
|
||||
╠═══════════════════════════════════════════════════════════════════════════╣
|
||||
║ [38;5;220m[1m Emulator / Nitro-V3 / Nitro-V3-Render[1;36m ║
|
||||
║ [1;37m[1m Updater by Remco — epicnabbo.nl[1;36m ║
|
||||
╠═══════════════════════════════════════════════════════════════════════════╣
|
||||
║ [2mBranch: [1;36mmain[2m (2 detected) │ 19:21[1;36m ║
|
||||
╚═══════════════════════════════════════════════════════════════════════════╝
|
||||
[0m
|
||||
[42m[1;37m[1m UPDATE [0m
|
||||
[1;32m[1m1)[0m 🚀 Quick Update — branch: [1;36mmain[0m
|
||||
[1;32m[1m2)[0m ⚡ Full Update (choose branch)
|
||||
[1;32m[1m3)[0m ⚙ Emulator Only
|
||||
[1;32m[1m4)[0m ⚙ Nitro-V3 Client Only
|
||||
[1;32m[1m5)[0m ⚙ Renderer Only
|
||||
[1;32m[1m6)[0m ⚙ Configs Only
|
||||
|
||||
[45m[1;37m[1m TOOLS [0m
|
||||
[1;35m[1m7)[0m 🔀 Switch Branch
|
||||
[1;33m[1m8)[0m 🗄 Database
|
||||
[1;33m[1m9)[0m 🛡 Backup / Restore
|
||||
[1;33m[1m10)[0m 🔧 Services
|
||||
[1;33m[1m11)[0m 📊 Status
|
||||
[1;33m[1m12)[0m ♥ Health Check
|
||||
[1;33m[1m13)[0m 🧹 Clean
|
||||
[1;33m[1m14)[0m 👁 Logs
|
||||
[1;33m[1m15)[0m ⚙ Config
|
||||
|
||||
[44m[1;37m[1m ADVANCED [0m
|
||||
[1;34m[1m16)[0m 🖥 Git Log
|
||||
[1;34m[1m17)[0m 🌐 Compare Branches
|
||||
[1;34m[1m18)[0m ⏱ Cron Scheduler
|
||||
|
||||
[1;31m[1m0)[0m Exit
|
||||
|
||||
[1;36m[1mSelect [0-18][0m:
|
||||
[1m[1;36mUpdate: [1;32mFull[0m
|
||||
|
||||
[1;32m[1m1)[0m [1;36mDev[0m
|
||||
[1;32m[1m2)[0m [1;36mmain[0m [1;32m(current)[0m
|
||||
[1;32m[1m3)[0m Custom
|
||||
|
||||
Branch [1-3]:
|
||||
Branch: [1;36m[1mDev[0m Mode: [1;32mFull[0m
|
||||
[1;33m➜[0m [1mStart update?[0m [Y/n]
|
||||
[1;34m➜[0m Site: https://epicnabbo.nl:3000 | Branch: Dev | Mode: full
|
||||
[2026-07-02 19:21:32] [INFO] Site: https://epicnabbo.nl:3000 | Branch: Dev | Mode: full
|
||||
[1;34m➜[0m Log: /var/www/atom-nexst/storage/logs/update-20260702-192111.log
|
||||
[2026-07-02 19:21:32] [INFO] Log: /var/www/atom-nexst/storage/logs/update-20260702-192111.log
|
||||
|
||||
[46m[1;37m[1m Step 1/8 — System Diagnostics [0m
|
||||
|
||||
[1;32m✔[0m All commands available
|
||||
[2026-07-02 19:21:32] [OK] All commands available
|
||||
[1;32m✔[0m All directories exist
|
||||
[2026-07-02 19:21:32] [OK] All directories exist
|
||||
[1;32m✔[0m 123GB disk available
|
||||
[2026-07-02 19:21:32] [OK] 123GB disk available
|
||||
|
||||
[41m[1;37m[1m ERROR [0m [1;31mDB connection failed[0m
|
||||
[2026-07-02 19:21:32] [FATAL] DB connection failed
|
||||
[?12l[?25h [1;33m⚠[0m Update had errors
|
||||
[2026-07-02 19:21:32] [WARN] Update had errors
|
||||
|
||||
[2mPress Enter to continue...[0m[H[2J[3J[?12l[?25h[?12l[?25h
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user