mirror of
https://github.com/infinition/Bjorn.git
synced 2026-03-19 10:10:24 +00:00
feat: Implement package management utilities with JSON endpoints for listing and uninstalling packages feat: Create plugin management utilities with endpoints for listing, configuring, and installing plugins feat: Develop schedule and trigger management utilities with CRUD operations for schedules and triggers
413 lines
9.5 KiB
CSS
413 lines
9.5 KiB
CSS
/* ==========================================================================
|
|
Page-specific styles for all SPA page modules.
|
|
Each section is scoped under the page's wrapper class to avoid conflicts.
|
|
========================================================================== */
|
|
|
|
/* ===== Page-specific variables (extends global.css tokens) ===== */
|
|
:root {
|
|
/* Bridge aliases used by multiple pages (Credentials, Loot, Files, Attacks) */
|
|
--_bg: var(--bg);
|
|
--_panel: var(--c-panel-2);
|
|
--_panel-hi: color-mix(in oklab, var(--c-panel-2) 96%, transparent);
|
|
--_panel-lo: color-mix(in oklab, var(--c-panel-2) 86%, transparent);
|
|
--_border: var(--c-border);
|
|
--_ink: var(--ink);
|
|
--_muted: var(--muted);
|
|
--_acid: var(--acid);
|
|
--_acid2: var(--acid-2);
|
|
--_shadow: var(--shadow);
|
|
|
|
/* NetKB chip colors */
|
|
--kb-hostname-bg: color-mix(in oklab, var(--acid) 16%, transparent);
|
|
--kb-ip-bg: color-mix(in oklab, var(--acid-2) 18%, transparent);
|
|
--kb-mac-bg: color-mix(in oklab, var(--muted) 10%, transparent);
|
|
--kb-vendor-bg: color-mix(in oklab, #b18cff 16%, transparent);
|
|
--kb-ports-bg: color-mix(in oklab, #5fd1ff 16%, transparent);
|
|
--kb-essid-bg: color-mix(in oklab, #00e6c3 16%, transparent);
|
|
--kb-offline-bg: color-mix(in oklab, var(--bg-2) 88%, black 12%);
|
|
--kb-offline-brd: color-mix(in oklab, var(--c-border-strong) 60%, transparent);
|
|
--kb-offline-ring: color-mix(in oklab, #ff5b5b 30%, transparent);
|
|
--kb-badge-shimmer: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
|
|
|
|
/* Attacks page */
|
|
--tile-min: 160px;
|
|
--ok-glow: rgba(34, 197, 94, .45);
|
|
--ko-glow: rgba(239, 68, 68, .45);
|
|
}
|
|
|
|
/* ===== Shared sidebar layout (SPA parity with web_old) ===== */
|
|
.page-with-sidebar {
|
|
--page-sidebar-w: 280px;
|
|
position: relative;
|
|
display: flex;
|
|
gap: 12px;
|
|
min-height: calc(100vh - var(--h-topbar, 56px) - var(--h-bottombar, 56px) - 24px);
|
|
align-items: stretch;
|
|
}
|
|
|
|
.page-with-sidebar .page-sidebar {
|
|
width: var(--page-sidebar-w);
|
|
flex: 0 0 var(--page-sidebar-w);
|
|
position: sticky;
|
|
top: 0;
|
|
align-self: flex-start;
|
|
max-height: calc(100vh - var(--h-topbar, 56px) - var(--h-bottombar, 56px) - 24px);
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
border: 1px solid var(--c-border);
|
|
border-radius: 12px;
|
|
background: var(--grad-card);
|
|
box-shadow: var(--shadow);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.page-with-sidebar .page-main {
|
|
min-width: 0;
|
|
flex: 1;
|
|
min-height: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.page-with-sidebar .sidebar-toggle-btn {
|
|
display: inline-flex;
|
|
margin-bottom: 0;
|
|
align-self: auto;
|
|
}
|
|
|
|
.page-with-sidebar .sidebar-fab {
|
|
position: fixed;
|
|
right: 14px;
|
|
bottom: calc(var(--h-bottombar, 56px) + 14px);
|
|
z-index: 82;
|
|
border-radius: 999px;
|
|
width: 38px;
|
|
height: 38px;
|
|
min-width: 38px;
|
|
min-height: 38px;
|
|
padding: 0;
|
|
font-size: 16px;
|
|
color: var(--ink);
|
|
background: color-mix(in oklab, var(--c-panel) 88%, transparent);
|
|
border: 1px solid var(--c-border-strong);
|
|
box-shadow: 0 6px 16px rgba(0, 0, 0, .28);
|
|
opacity: .88;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
line-height: 1;
|
|
}
|
|
|
|
.page-with-sidebar .sidebar-fab:hover {
|
|
opacity: 1;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.page-with-sidebar .sidebar-fab:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.page-sidebar-backdrop {
|
|
display: none;
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
top: var(--h-topbar, 56px);
|
|
bottom: var(--h-bottombar, 56px);
|
|
background: rgba(0, 0, 0, .52);
|
|
border: 0;
|
|
z-index: 79;
|
|
}
|
|
|
|
.page-with-sidebar .sidehead {
|
|
padding: 10px;
|
|
border-bottom: 1px dashed var(--c-border);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 5;
|
|
background: var(--grad-card);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.page-with-sidebar .sidetitle {
|
|
font-weight: 800;
|
|
color: var(--acid);
|
|
letter-spacing: .05em;
|
|
}
|
|
|
|
.page-with-sidebar .sidecontent {
|
|
padding: 10px;
|
|
overflow: auto;
|
|
min-height: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.page-with-sidebar.sidebar-collapsed .page-sidebar {
|
|
width: 0;
|
|
flex-basis: 0;
|
|
padding: 0;
|
|
border-width: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ===== Condition Builder ===== */
|
|
|
|
.cond-editor { padding: 4px 0; }
|
|
|
|
.cond-group {
|
|
border-left: 3px solid var(--acid);
|
|
padding: 8px 8px 8px 12px;
|
|
margin: 4px 0;
|
|
border-radius: 4px;
|
|
background: color-mix(in oklab, var(--c-panel-2) 50%, transparent);
|
|
}
|
|
.cond-group-or { border-left-color: #f59e0b; }
|
|
.cond-group-and { border-left-color: var(--acid); }
|
|
|
|
.cond-group-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.cond-op-toggle {
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
border: 1px solid var(--c-border);
|
|
background: var(--c-panel);
|
|
color: var(--ink);
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.cond-children { display: flex; flex-direction: column; gap: 4px; }
|
|
|
|
.cond-item-wrapper {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 4px;
|
|
}
|
|
.cond-item-wrapper > .cond-group,
|
|
.cond-item-wrapper > .cond-block { flex: 1; min-width: 0; }
|
|
|
|
.cond-block {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 6px 8px;
|
|
border: 1px solid var(--c-border);
|
|
border-radius: 4px;
|
|
background: var(--c-panel);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.cond-source-select {
|
|
padding: 2px 6px;
|
|
border: 1px solid var(--c-border);
|
|
border-radius: 4px;
|
|
background: var(--bg);
|
|
color: var(--ink);
|
|
font-size: 11px;
|
|
min-width: 120px;
|
|
}
|
|
|
|
.cond-params {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.cond-param-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 3px;
|
|
font-size: 11px;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.cond-param-name { white-space: nowrap; }
|
|
|
|
.cond-param-input {
|
|
padding: 2px 6px;
|
|
border: 1px solid var(--c-border);
|
|
border-radius: 3px;
|
|
background: var(--bg);
|
|
color: var(--ink);
|
|
font-size: 11px;
|
|
width: 80px;
|
|
}
|
|
.cond-param-input[type="number"] { width: 60px; }
|
|
select.cond-param-input { width: auto; min-width: 60px; }
|
|
|
|
.cond-delete-btn {
|
|
flex-shrink: 0;
|
|
width: 20px;
|
|
height: 20px;
|
|
padding: 0;
|
|
border: none;
|
|
border-radius: 3px;
|
|
background: transparent;
|
|
color: var(--muted);
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
line-height: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.cond-delete-btn:hover { color: #ef4444; background: rgba(239,68,68,.12); }
|
|
|
|
.cond-group-actions {
|
|
display: flex;
|
|
gap: 6px;
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.cond-add-btn {
|
|
padding: 2px 10px;
|
|
border: 1px dashed var(--c-border);
|
|
border-radius: 4px;
|
|
background: transparent;
|
|
color: var(--muted);
|
|
font-size: 11px;
|
|
cursor: pointer;
|
|
}
|
|
.cond-add-btn:hover { color: var(--acid); border-color: var(--acid); }
|
|
|
|
/* ===== Package Manager (actions page sidebar) ===== */
|
|
|
|
.pkg-list { list-style: none; padding: 0; margin: 0; }
|
|
.pkg-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 6px 0;
|
|
border-bottom: 1px solid color-mix(in oklab, var(--c-border) 40%, transparent);
|
|
font-size: 12px;
|
|
}
|
|
.pkg-item:last-child { border-bottom: none; }
|
|
.pkg-name { font-weight: 600; color: var(--ink); }
|
|
.pkg-version { color: var(--muted); font-size: 11px; margin-left: 6px; }
|
|
.pkg-uninstall-btn {
|
|
padding: 2px 8px;
|
|
border: 1px solid var(--c-border);
|
|
border-radius: 3px;
|
|
background: transparent;
|
|
color: var(--muted);
|
|
font-size: 10px;
|
|
cursor: pointer;
|
|
}
|
|
.pkg-uninstall-btn:hover { color: #ef4444; border-color: #ef4444; }
|
|
|
|
.pkg-install-form {
|
|
display: flex;
|
|
gap: 6px;
|
|
margin-bottom: 10px;
|
|
}
|
|
.pkg-install-input {
|
|
flex: 1;
|
|
padding: 4px 8px;
|
|
border: 1px solid var(--c-border);
|
|
border-radius: 4px;
|
|
background: var(--bg);
|
|
color: var(--ink);
|
|
font-size: 12px;
|
|
}
|
|
.pkg-install-btn {
|
|
padding: 4px 12px;
|
|
border: 1px solid var(--acid);
|
|
border-radius: 4px;
|
|
background: color-mix(in oklab, var(--acid) 15%, transparent);
|
|
color: var(--acid);
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
}
|
|
.pkg-install-btn:hover { background: color-mix(in oklab, var(--acid) 25%, transparent); }
|
|
|
|
.pkg-console {
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
padding: 6px 8px;
|
|
border: 1px solid var(--c-border);
|
|
border-radius: 4px;
|
|
background: var(--bg);
|
|
font-family: var(--font-mono);
|
|
font-size: 10px;
|
|
color: var(--muted);
|
|
margin-top: 8px;
|
|
display: none;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
}
|
|
.pkg-console.active { display: block; }
|
|
|
|
@media (max-width: 900px) {
|
|
.page-with-sidebar {
|
|
min-height: calc(100vh - var(--h-topbar, 56px) - var(--h-bottombar, 56px) - 12px);
|
|
}
|
|
|
|
.page-with-sidebar .sidebar-fab {
|
|
right: 10px;
|
|
bottom: calc(var(--h-bottombar, 56px) + 10px);
|
|
}
|
|
|
|
.sidebar-fab-unified {
|
|
position: fixed;
|
|
z-index: 82;
|
|
border-radius: 999px;
|
|
width: 38px;
|
|
height: 38px;
|
|
min-width: 38px;
|
|
min-height: 38px;
|
|
padding: 0;
|
|
font-size: 16px;
|
|
color: var(--ink);
|
|
background: color-mix(in oklab, var(--c-panel) 88%, transparent);
|
|
border: 1px solid var(--c-border-strong);
|
|
box-shadow: 0 6px 16px rgba(0, 0, 0, .28);
|
|
opacity: .88;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
line-height: 1;
|
|
}
|
|
|
|
.sidebar-fab-unified:hover {
|
|
opacity: 1;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.sidebar-fab-unified:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.page-with-sidebar .page-sidebar {
|
|
position: fixed;
|
|
top: var(--h-topbar, 56px);
|
|
bottom: var(--h-bottombar, 56px);
|
|
left: 0;
|
|
z-index: 80;
|
|
width: min(86vw, 320px);
|
|
flex-basis: auto;
|
|
transform: translateX(-105%);
|
|
transition: transform .2s ease;
|
|
}
|
|
|
|
.page-with-sidebar.sidebar-open .page-sidebar {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.page-with-sidebar.sidebar-open .page-sidebar-backdrop {
|
|
display: block;
|
|
}
|
|
}
|
|
|