Add admin panel web UI (Svelte 5)
Dashboard with launch stats, instance manager with Modrinth/CurseForge search and zip import, player and group management, launcher design editor with live preview, and sign-in settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ARcGWxLx21FwXJ3yfGriS
This commit is contained in:
32 files changed
+4084
No files matched your search
@@ -0,0 +1,311 @@
|
||||
:root {
|
||||
--bg: #090a12;
|
||||
--bg-2: #0e1019;
|
||||
--surface: #12141f;
|
||||
--surface-2: #181b29;
|
||||
--surface-3: #20243a;
|
||||
--line: rgba(255, 255, 255, 0.07);
|
||||
--line-strong: rgba(255, 255, 255, 0.13);
|
||||
--text: #eef0ff;
|
||||
--text-2: #b7bbdb;
|
||||
--muted: #7d82a8;
|
||||
--accent: #8b6cff;
|
||||
--accent-2: #22d3ee;
|
||||
--accent-soft: rgba(139, 108, 255, 0.14);
|
||||
--good: #34d399;
|
||||
--warn: #fbbf24;
|
||||
--bad: #f43f5e;
|
||||
--radius: 14px;
|
||||
--radius-sm: 9px;
|
||||
--shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
|
||||
--font: 'Outfit Variable', system-ui, sans-serif;
|
||||
--mono: 'JetBrains Mono Variable', ui-monospace, monospace;
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: var(--font);
|
||||
font-size: 15px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
body {
|
||||
background:
|
||||
radial-gradient(1200px 600px at 110% -10%, rgba(139, 108, 255, 0.12), transparent 60%),
|
||||
radial-gradient(900px 500px at -10% 110%, rgba(34, 211, 238, 0.07), transparent 60%),
|
||||
var(--bg);
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--accent-2);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4 {
|
||||
margin: 0;
|
||||
font-weight: 650;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
h1 { font-size: 1.75rem; }
|
||||
h2 { font-size: 1.2rem; }
|
||||
h3 { font-size: 1rem; }
|
||||
|
||||
p { margin: 0; }
|
||||
|
||||
code, .mono {
|
||||
font-family: var(--mono);
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: rgba(139, 108, 255, 0.4);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar { width: 10px; height: 10px; }
|
||||
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
|
||||
::-webkit-scrollbar-track { background: transparent; }
|
||||
|
||||
/* ---------- layout primitives ---------- */
|
||||
|
||||
.page {
|
||||
padding: 32px 40px 64px;
|
||||
max-width: 1320px;
|
||||
margin: 0 auto;
|
||||
animation: fade-in 0.25s ease;
|
||||
}
|
||||
|
||||
.page-head {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
margin-bottom: 28px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.page-head p {
|
||||
color: var(--muted);
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.row { display: flex; gap: 12px; align-items: center; }
|
||||
.row.wrap { flex-wrap: wrap; }
|
||||
.col { display: flex; flex-direction: column; gap: 12px; }
|
||||
.spacer { flex: 1; }
|
||||
.grid { display: grid; gap: 16px; }
|
||||
.muted { color: var(--muted); }
|
||||
.small { font-size: 0.85rem; }
|
||||
.tiny { font-size: 0.75rem; }
|
||||
|
||||
.card {
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)), var(--surface);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.card.hover {
|
||||
transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
.card.hover:hover {
|
||||
border-color: var(--line-strong);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.section-title .hint {
|
||||
margin-left: auto;
|
||||
font-size: 0.8rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* ---------- controls ---------- */
|
||||
|
||||
button, .btn {
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--line-strong);
|
||||
background: var(--surface-2);
|
||||
color: var(--text);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 9px 16px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
font-weight: 550;
|
||||
transition: background 0.15s, border-color 0.15s, transform 0.08s, box-shadow 0.15s, opacity 0.15s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
button:hover { background: var(--surface-3); }
|
||||
button:active { transform: translateY(1px); }
|
||||
button:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
button.primary {
|
||||
background: linear-gradient(135deg, var(--accent), #6a4cf0);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 8px 24px -10px rgba(139, 108, 255, 0.8);
|
||||
}
|
||||
button.primary:hover { filter: brightness(1.1); }
|
||||
|
||||
button.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
|
||||
button.ghost:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
|
||||
button.danger { color: #ff8a9e; border-color: rgba(244, 63, 94, 0.3); background: rgba(244, 63, 94, 0.08); }
|
||||
button.danger:hover { background: rgba(244, 63, 94, 0.16); }
|
||||
button.icon { padding: 8px; }
|
||||
button.sm { padding: 6px 11px; font-size: 0.85rem; }
|
||||
|
||||
input, select, textarea {
|
||||
font: inherit;
|
||||
width: 100%;
|
||||
background: var(--bg-2);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--line-strong);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 10px 12px;
|
||||
transition: border-color 0.15s, background 0.15s;
|
||||
}
|
||||
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, 0.2); }
|
||||
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: #0c0e18; outline: none; }
|
||||
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
|
||||
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
|
||||
input[type='color'] { padding: 0; width: 42px; height: 42px; border-radius: 10px; cursor: pointer; overflow: hidden; }
|
||||
input[type='color']::-webkit-color-swatch-wrapper { padding: 0; }
|
||||
input[type='color']::-webkit-color-swatch { border: none; }
|
||||
input[type='range'] { padding: 0; accent-color: var(--accent); border: none; background: transparent; }
|
||||
input[type='checkbox'] { width: auto; accent-color: var(--accent); }
|
||||
|
||||
label.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 7px;
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-2);
|
||||
font-weight: 500;
|
||||
}
|
||||
label.field .help { color: var(--muted); font-weight: 400; font-size: 0.78rem; }
|
||||
|
||||
.badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
padding: 3px 9px;
|
||||
border-radius: 999px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
color: var(--text-2);
|
||||
border: 1px solid var(--line);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.badge.accent { background: var(--accent-soft); color: #c4b5ff; border-color: rgba(139, 108, 255, 0.3); }
|
||||
.badge.good { background: rgba(52, 211, 153, 0.12); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.25); }
|
||||
.badge.warn { background: rgba(251, 191, 36, 0.12); color: #fcd34d; border-color: rgba(251, 191, 36, 0.25); }
|
||||
.badge.bad { background: rgba(244, 63, 94, 0.12); color: #fda4af; border-color: rgba(244, 63, 94, 0.25); }
|
||||
|
||||
.segmented {
|
||||
display: inline-flex;
|
||||
background: var(--bg-2);
|
||||
border: 1px solid var(--line-strong);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 3px;
|
||||
gap: 2px;
|
||||
}
|
||||
.segmented button {
|
||||
border: none;
|
||||
background: transparent;
|
||||
padding: 7px 14px;
|
||||
border-radius: 7px;
|
||||
color: var(--muted);
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
.segmented button.active { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
margin-bottom: 24px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.tabs button {
|
||||
background: none;
|
||||
border: none;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-radius: 0;
|
||||
color: var(--muted);
|
||||
padding: 12px 16px;
|
||||
}
|
||||
.tabs button:hover { color: var(--text); background: none; }
|
||||
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
|
||||
|
||||
table.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.table th {
|
||||
text-align: left;
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
font-size: 0.78rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.table td {
|
||||
padding: 12px 14px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
vertical-align: middle;
|
||||
}
|
||||
.table tr:last-child td { border-bottom: none; }
|
||||
.table tbody tr { transition: background 0.1s; }
|
||||
.table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
|
||||
|
||||
.empty {
|
||||
text-align: center;
|
||||
padding: 56px 20px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.empty h3 { color: var(--text); margin: 12px 0 6px; }
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0 0 0 0);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.spin { animation: spin 0.9s linear infinite; }
|
||||
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.page { padding: 20px 16px 48px; }
|
||||
}
|
||||
Reference in new issue
Block a user