nexus base
This commit is contained in:
@@ -776,6 +776,108 @@ body.has-modal-open {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.nexus-quick-grid {
|
||||
display: grid;
|
||||
gap: 18px;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
margin-top: 22px;
|
||||
}
|
||||
|
||||
.nexus-stat-card {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
align-content: start;
|
||||
}
|
||||
|
||||
.nexus-stat-card strong {
|
||||
font-size: clamp(1.35rem, 2vw, 2rem);
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.dashboard-grid {
|
||||
display: grid;
|
||||
gap: 20px;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.dashboard-widget {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
min-height: 220px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.dashboard-widget__head {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
justify-content: space-between;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.dashboard-widget__head h2 {
|
||||
margin: 6px 0 0;
|
||||
font-size: 1.35rem;
|
||||
}
|
||||
|
||||
.dashboard-widget__head p {
|
||||
margin: 8px 0 0;
|
||||
color: var(--text-soft);
|
||||
}
|
||||
|
||||
.dashboard-widget__meta {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
align-content: start;
|
||||
}
|
||||
|
||||
.dashboard-widget__meta p {
|
||||
margin: 0;
|
||||
color: var(--text-soft);
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.dashboard-widget__frame {
|
||||
width: 100%;
|
||||
min-height: 300px;
|
||||
border: 1px solid color-mix(in srgb, var(--border-soft) 85%, transparent);
|
||||
border-radius: 16px;
|
||||
background: rgba(255, 255, 255, 0.82);
|
||||
}
|
||||
|
||||
.dashboard-widget__frame--page {
|
||||
min-height: 70vh;
|
||||
}
|
||||
|
||||
.dashboard-empty {
|
||||
padding: 18px 20px;
|
||||
border: 1px dashed color-mix(in srgb, var(--border-soft) 85%, transparent);
|
||||
border-radius: 16px;
|
||||
color: var(--text-soft);
|
||||
background: rgba(255, 255, 255, 0.58);
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.dashboard-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.dashboard-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.dashboard-widget {
|
||||
grid-column: auto !important;
|
||||
grid-row: auto !important;
|
||||
}
|
||||
|
||||
.dashboard-widget__head {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.setup-shell {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
|
||||
@@ -24,9 +24,12 @@ $publicPaths = [
|
||||
'auth/me',
|
||||
'module/pi_control/terminal_info',
|
||||
];
|
||||
$requiresGlobalAuth = in_array($uriPath, ['settings', 'users', 'modules', 'modules/install', 'modules/sql-import', 'debug', 'exports/database.sql'], true)
|
||||
$requiresGlobalAuth = in_array($uriPath, ['settings', 'users', 'modules', 'modules/install', 'modules/sql-import', 'debug', 'exports/database.sql', 'dashboard', 'dashboards', 'integrations', 'page-modules'], true)
|
||||
|| str_starts_with($uriPath, 'modules/setup/')
|
||||
|| str_starts_with($uriPath, 'modules/access/');
|
||||
if (str_starts_with($uriPath, 'page-modules/view/')) {
|
||||
$requiresGlobalAuth = true;
|
||||
}
|
||||
if (defined('APP_AUTH_ENABLED') && APP_AUTH_ENABLED && $requiresGlobalAuth && !in_array($uriPath, $publicPaths, true)) {
|
||||
$user = auth_user();
|
||||
if (!$user) {
|
||||
@@ -274,6 +277,17 @@ if (str_starts_with($uriPath, 'modules/install')) {
|
||||
$target = $pagesBase . '/users/settings.php';
|
||||
} elseif ($uriPath === 'users') {
|
||||
$target = $pagesBase . '/users/index.php';
|
||||
} elseif ($uriPath === 'dashboard') {
|
||||
$target = $pagesBase . '/dashboard.php';
|
||||
} elseif ($uriPath === 'dashboards') {
|
||||
$target = $pagesBase . '/dashboards.php';
|
||||
} elseif ($uriPath === 'integrations') {
|
||||
$target = $pagesBase . '/integrations.php';
|
||||
} elseif ($uriPath === 'page-modules') {
|
||||
$target = $pagesBase . '/page_modules.php';
|
||||
} elseif (preg_match('~^page-modules/view/(\d+)$~', $uriPath, $pageModuleMatch)) {
|
||||
$_GET['id'] = (string) $pageModuleMatch[1];
|
||||
$target = $pagesBase . '/page_modules_view.php';
|
||||
} elseif ($uriPath === 'debug') {
|
||||
$target = $pagesBase . '/retool/debug.php';
|
||||
} elseif (preg_match('~^module/([a-zA-Z0-9_-]+)(?:/(.+))?$~', $uriPath, $m)) {
|
||||
|
||||
Reference in New Issue
Block a user