mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-05-14 03:15:05 +00:00
- Implemented dashboard audit logging with InsertAuditLog, GetRecentAuditLogs, GetAuditLogsByIP, and CleanupOldAuditLogs methods. - Created dashboard configuration management with GetDashboardConfig and SetDashboardConfig methods. - Added new tables for dashboard_audit_log and dashboard_config in both MySQL and SQLite migrations. - Updated CMakeLists to include Crow and ASIO for dashboard server functionality. - Enhanced existing database classes to support new dashboard features, including character, play key, and property management. - Added new methods for retrieving and managing play keys, properties, and pet names. - Updated TestSQLDatabase to include stubs for new dashboard-related methods. - Modified shared and dashboard configuration files for new settings.
145 lines
7.1 KiB
CSS
145 lines
7.1 KiB
CSS
/*
|
|
* Consolidated NexusDashboard CSS
|
|
* Combined from nexus-theme.css and dashboard.css to provide a single
|
|
* consistent stylesheet for the DarkflameServer dashboard.
|
|
*/
|
|
|
|
/* ------------------------ Nexus theme (dark) variables ------------------------ */
|
|
:root {
|
|
--nexus-dark-bg: #212529;
|
|
--nexus-darker-bg: #1a1d20;
|
|
--nexus-card-bg: #2c3034;
|
|
--nexus-border: #404448;
|
|
--nexus-text: #f8f9fa;
|
|
--nexus-text-muted: #adb5bd;
|
|
--nexus-primary: #0d6efd;
|
|
--nexus-success: #198754;
|
|
--nexus-warning: #ffc107;
|
|
--nexus-danger: #dc3545;
|
|
--nexus-info: #0dcaf0;
|
|
/* legacy dashboard variables */
|
|
--primary-color: #0d6efd;
|
|
--success-color: #198754;
|
|
--warning-color: #ffc107;
|
|
--danger-color: #dc3545;
|
|
--dark-bg: #1a1a1a;
|
|
--light-bg: #f8f9fa;
|
|
}
|
|
|
|
/* ------------------------ Base layout, navbar, cards ------------------------ */
|
|
body {
|
|
background-color: var(--nexus-dark-bg);
|
|
color: var(--nexus-text);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
main { flex: 1; padding-bottom: 60px; }
|
|
.footer { margin-top: auto; border-top: 1px solid var(--nexus-border); background-color: var(--nexus-dark-bg); }
|
|
|
|
/* Ensure footer text is visible on dark background */
|
|
.footer, .footer .text-muted { color: var(--nexus-text-muted) !important; }
|
|
|
|
.navbar { box-shadow: 0 2px 4px rgba(0,0,0,.1); }
|
|
.navbar-brand { font-weight: bold; font-size: 1.25rem; }
|
|
.nav-link { transition: all 0.3s ease; }
|
|
.nav-link:hover { background-color: rgba(255,255,255,0.05); border-radius: 4px; }
|
|
.nav-link.active { background-color: rgba(255,255,255,0.08); border-radius: 4px; }
|
|
|
|
.card { background-color: var(--nexus-card-bg); border-color: var(--nexus-border); color: var(--nexus-text); border: none; box-shadow: 0 2px 8px rgba(0,0,0,0.1); margin-bottom: 1.5rem; transition: transform 0.2s ease, box-shadow 0.2s ease; }
|
|
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
|
|
.card-header { background-color: var(--nexus-darker-bg); border-bottom-color: var(--nexus-border); color: var(--nexus-text); font-weight: 600; }
|
|
|
|
/* ------------------------ Tables and DataTables ------------------------ */
|
|
.table { color: var(--nexus-text); background-color: #1e1e1e; }
|
|
.table thead th { background-color: #242526; color: var(--nexus-text); border-bottom: 1px solid var(--nexus-border); font-weight: 600; }
|
|
.table tbody td { color: var(--nexus-text); }
|
|
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(255,255,255,0.02); }
|
|
.table-hover > tbody > tr:hover > * { background-color: rgba(255,255,255,0.035); }
|
|
|
|
/* DataTables adds `odd`/`even` classes and sometimes doesn't use `.table-striped`.
|
|
Normalize striping across Bootstrap tables and DataTables instances so every
|
|
other row has a visible background in dark mode. Use slightly stronger contrast
|
|
and cover different DOM shapes that DataTables can produce (cells or `*`). */
|
|
.dataTable tbody tr.odd > *,
|
|
.dataTable tbody tr.odd td,
|
|
.table.table-striped tbody tr.odd > *,
|
|
.table.table-striped tbody tr.odd td {
|
|
background-color: rgba(255,255,255,0.03);
|
|
}
|
|
.dataTable tbody tr.even > *,
|
|
.dataTable tbody tr.even td,
|
|
.table.table-striped tbody tr.even > *,
|
|
.table.table-striped tbody tr.even td {
|
|
background-color: transparent;
|
|
}
|
|
|
|
/* Some DataTables setups use nested wrappers (.dataTables_scrollBody) so ensure
|
|
striping still applies inside scroll bodies. */
|
|
.dataTables_scrollBody table tbody tr.odd > *,
|
|
.dataTables_scrollBody table tbody tr.odd td {
|
|
background-color: rgba(255,255,255,0.03);
|
|
}
|
|
.dataTables_scrollBody table tbody tr.even > *,
|
|
.dataTables_scrollBody table tbody tr.even td {
|
|
background-color: transparent;
|
|
}
|
|
|
|
/* Keep hover state clear above striping */
|
|
.dataTable tbody tr:hover > *,
|
|
.table tbody tr:hover > * {
|
|
background-color: rgba(255,255,255,0.05);
|
|
}
|
|
.table > :not(caption) > * > * { border-bottom-color: var(--nexus-border); }
|
|
|
|
/* Light-theme overrides (explicit) */
|
|
@media (prefers-color-scheme: light) {
|
|
body { background-color: var(--light-bg); color: #212529; }
|
|
.card { background-color: #fff; color: #212529; }
|
|
.card-header { background-color: #fff; border-bottom: 2px solid var(--primary-color); color: #212529; }
|
|
.table { background-color: white; color: #212529; }
|
|
.table thead th { background-color: #f8f9fa; color: #212529; border-bottom: 2px solid #dee2e6; font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.5px; }
|
|
.dataTables_wrapper select, .dataTables_wrapper input { background-color: #fff; border-color: #ced4da; color: #212529; }
|
|
}
|
|
|
|
/* Dark mode explicit styling (prefers-color-scheme: dark) */
|
|
@media (prefers-color-scheme: dark) {
|
|
body { background-color: var(--nexus-dark-bg); color: var(--nexus-text); }
|
|
.card { background-color: var(--nexus-card-bg); color: var(--nexus-text); }
|
|
.card-header { background-color: var(--nexus-darker-bg); color: var(--nexus-text); }
|
|
.table { background-color: #1e1e1e; color: var(--nexus-text); }
|
|
.table thead th { background-color: #252525; border-bottom-color: #3a3a3a; color: var(--nexus-text); }
|
|
.dataTables_wrapper select, .dataTables_wrapper input { background-color: var(--nexus-darker-bg); border-color: var(--nexus-border); color: var(--nexus-text); }
|
|
}
|
|
|
|
/* DataTables specific visual rules */
|
|
.dataTables_wrapper { padding: 0; }
|
|
.dataTables_filter input { margin-left: 0.5rem; padding: 0.375rem 0.75rem; border: 1px solid #ced4da; border-radius: 0.25rem; }
|
|
.dataTables_length select { padding: 0.375rem 2rem 0.375rem 0.75rem; border: 1px solid #ced4da; border-radius: 0.25rem; margin: 0 0.5rem; }
|
|
.dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--nexus-text) !important; }
|
|
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--nexus-primary); border-color: var(--nexus-primary); color: white !important; }
|
|
|
|
/* Forms, badges, buttons, utilities */
|
|
.form-control, .form-select { background-color: var(--nexus-darker-bg); border-color: var(--nexus-border); color: var(--nexus-text); }
|
|
.form-control::placeholder { color: var(--nexus-text-muted); }
|
|
.form-label { color: var(--nexus-text); }
|
|
.badge { padding: 0.35em 0.65em; font-weight: 500; }
|
|
.btn { transition: all 0.2s ease; }
|
|
.btn:hover { transform: translateY(-1px); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
|
|
|
|
/* Utilities and accessibility */
|
|
.loading { position: relative; pointer-events: none; opacity: 0.6; }
|
|
.loading::after { content: ""; position: absolute; top: 50%; left: 50%; width: 2rem; height: 2rem; margin: -1rem 0 0 -1rem; border: 0.25rem solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spinner 0.75s linear infinite; }
|
|
@keyframes spinner { to { transform: rotate(360deg); } }
|
|
|
|
/* Responsive tweaks */
|
|
@media (max-width: 768px) { .navbar-brand { font-size: 1rem; } .card { margin-bottom: 1rem; } .alerts-container { left: 10px; right: 10px; max-width: none; } .btn-group { flex-wrap: wrap; } }
|
|
|
|
/* Extra helpers */
|
|
.cursor-pointer { cursor: pointer; }
|
|
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
.ws-nowrap { white-space: nowrap; }
|
|
|
|
/* End of consolidated stylesheet */
|