Initial upload
This commit is contained in:
1 parent
b0bf3b7167
commit
a022f29e34
65 files changed
+46484
-4339
No files matched your search
+575
-103
File diff suppressed because it is too large.
Load diff
+49
-14
@@ -1,5 +1,5 @@
|
||||
:root {
|
||||
--ui-bg: url("/images/waves.png?v=1776616961314");
|
||||
--ui-bg: url("/images/waves.png?v=1780686309159");
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
@@ -32,6 +32,43 @@
|
||||
filter: brightness(0.96);
|
||||
}
|
||||
|
||||
/* ── Navbar Create pill — overrides for the later-loaded stylesheet ──
|
||||
This file is loaded AFTER dashboard.css, so the pill animation rules
|
||||
must be restated here or .btn-primary above would cancel them
|
||||
(its `transition` omits width/border-radius/padding/gap, which made the
|
||||
expand/collapse look instant). Open state is toggled via JS (.is-open). */
|
||||
.btn-primary.create-btn {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
min-height: 44px;
|
||||
padding: 0;
|
||||
gap: 0;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
justify-content: center;
|
||||
transition:
|
||||
width 0.4s cubic-bezier(0.65, 0, 0.35, 1),
|
||||
border-radius 0.4s cubic-bezier(0.65, 0, 0.35, 1),
|
||||
padding 0.4s cubic-bezier(0.65, 0, 0.35, 1),
|
||||
gap 0.4s cubic-bezier(0.65, 0, 0.35, 1),
|
||||
filter 0.4s ease;
|
||||
}
|
||||
|
||||
.btn-primary.create-btn:hover {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.btn-primary.create-btn.is-open,
|
||||
.btn-primary.create-btn:focus-visible {
|
||||
width: 124px;
|
||||
padding: 0 18px;
|
||||
gap: 9px;
|
||||
border-radius: 999px;
|
||||
filter: brightness(1.06);
|
||||
}
|
||||
|
||||
.btn-ghost {
|
||||
background: rgba(15, 23, 42, 0.85);
|
||||
border: none;
|
||||
@@ -781,10 +818,6 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.faplusbutton {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.footer-inner {
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
@@ -812,6 +845,10 @@
|
||||
background: var(--ui-bg) center/cover no-repeat fixed !important;
|
||||
}
|
||||
|
||||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Quick Action Custom Scale Animation - Independent Element Scaling */
|
||||
.quick-action.qa-anim-scale {
|
||||
position: relative;
|
||||
@@ -909,11 +946,14 @@
|
||||
}
|
||||
|
||||
#topbar-spacer {
|
||||
height: 104px;
|
||||
height: 73px;
|
||||
min-height: 73px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dashboard {
|
||||
margin-top: 46px;
|
||||
margin-top: 20px;
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.top-bar {
|
||||
@@ -972,6 +1012,8 @@
|
||||
}
|
||||
|
||||
.brand-title {
|
||||
font-family: 'Inter', sans-serif;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.012em;
|
||||
}
|
||||
|
||||
@@ -1019,13 +1061,6 @@
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.btn-primary.create-btn {
|
||||
border-radius: 999px;
|
||||
padding-inline: 18px;
|
||||
min-height: 42px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.top-bar .btn-primary.create-btn:focus,
|
||||
.top-bar .btn-primary.create-btn:focus-visible,
|
||||
.top-bar .btn-primary.create-btn:active {
|
||||
|
||||
@@ -0,0 +1,399 @@
|
||||
.adp-ssh-terminal-window {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: min(var(--adp-ssh-w, 960px), calc(100vw - 16px));
|
||||
height: min(var(--adp-ssh-h, 640px), calc(100vh - 16px));
|
||||
min-width: min(360px, calc(100vw - 16px));
|
||||
min-height: 260px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
border-radius: 14px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.24);
|
||||
background: #020617;
|
||||
box-shadow: 0 18px 52px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(15, 23, 42, 0.64);
|
||||
z-index: 2147483000;
|
||||
opacity: 0;
|
||||
transform: translate3d(var(--adp-ssh-x, 24px), var(--adp-ssh-y, 24px), 0) scale(0.985);
|
||||
transform-origin: top left;
|
||||
transition: opacity 140ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
contain: layout paint style;
|
||||
isolation: isolate;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window::before,
|
||||
.adp-ssh-terminal-window::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window::before {
|
||||
inset: 0;
|
||||
z-index: 2;
|
||||
background:
|
||||
radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.17), transparent 28%),
|
||||
linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 32%, rgba(45, 212, 191, 0.08) 72%, transparent);
|
||||
opacity: 0.28;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window::after {
|
||||
inset: -58%;
|
||||
z-index: 6;
|
||||
opacity: 0;
|
||||
background:
|
||||
radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.34), rgba(45, 212, 191, 0.16) 28%, transparent 58%),
|
||||
linear-gradient(105deg, transparent 34%, rgba(255, 255, 255, 0.42) 48%, transparent 62%);
|
||||
transform: translate3d(-42%, -22%, 0) rotate(9deg) scale(0.78);
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-ready {
|
||||
opacity: 1;
|
||||
transform: translate3d(var(--adp-ssh-x, 24px), var(--adp-ssh-y, 24px), 0) scale(1);
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-liquid-motion {
|
||||
will-change: transform, opacity;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-liquid-motion::before {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-liquid-motion::after {
|
||||
animation: adp-ssh-tahoe-sheen 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
||||
will-change: transform, opacity;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-motion-minimize::after {
|
||||
animation-duration: 460ms;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-motion-close::after {
|
||||
animation-duration: 260ms;
|
||||
animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-motion-lite::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-interacting {
|
||||
transition: none;
|
||||
user-select: none;
|
||||
will-change: transform, width, height;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-interacting .adp-ssh-terminal-frame {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-minimized {
|
||||
width: min(380px, calc(100vw - 24px));
|
||||
height: 38px;
|
||||
min-height: 38px;
|
||||
border-radius: 12px;
|
||||
border-color: rgba(45, 212, 191, 0.38);
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-titlebar {
|
||||
position: relative;
|
||||
z-index: 4;
|
||||
height: 34px;
|
||||
flex: 0 0 34px;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 0 8px 0 11px;
|
||||
border-bottom: 1px solid rgba(148, 163, 184, 0.15);
|
||||
background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
|
||||
color: #d1d5db;
|
||||
cursor: grab;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-dragging .adp-ssh-terminal-titlebar {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-title {
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font: 600 12px/1 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
color: rgba(226, 232, 240, 0.92);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-title i {
|
||||
color: #2dd4bf;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-title span {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-grip {
|
||||
width: 58px;
|
||||
height: 4px;
|
||||
border-radius: 999px;
|
||||
background: rgba(148, 163, 184, 0.42);
|
||||
justify-self: center;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-controls {
|
||||
position: relative;
|
||||
z-index: 7;
|
||||
justify-self: end;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-control {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 6px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.18);
|
||||
background: rgba(15, 23, 42, 0.78);
|
||||
color: rgba(226, 232, 240, 0.92);
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-control:hover {
|
||||
background: rgba(51, 65, 85, 0.82);
|
||||
border-color: rgba(148, 163, 184, 0.34);
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-control[data-adp-ssh-close]:hover {
|
||||
background: rgba(239, 68, 68, 0.88);
|
||||
border-color: rgba(248, 113, 113, 0.96);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-frame-wrap {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
min-height: 0;
|
||||
flex: 1 1 auto;
|
||||
overflow: hidden;
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-minimized .adp-ssh-terminal-frame-wrap {
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
min-height: 0;
|
||||
flex: 0 0 1px;
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-frame {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
display: block;
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize {
|
||||
position: absolute;
|
||||
z-index: 5;
|
||||
display: block;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
@keyframes adp-ssh-tahoe-sheen {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translate3d(-42%, -22%, 0) rotate(9deg) scale(0.78);
|
||||
}
|
||||
|
||||
34% {
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: translate3d(34%, 18%, 0) rotate(9deg) scale(1.14);
|
||||
}
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-minimized .adp-ssh-terminal-resize {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize-n {
|
||||
top: 0;
|
||||
left: 16px;
|
||||
right: 16px;
|
||||
height: 7px;
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize-e {
|
||||
top: 16px;
|
||||
right: 0;
|
||||
bottom: 16px;
|
||||
width: 7px;
|
||||
cursor: ew-resize;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize-s {
|
||||
right: 16px;
|
||||
bottom: 0;
|
||||
left: 16px;
|
||||
height: 7px;
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize-w {
|
||||
top: 16px;
|
||||
bottom: 16px;
|
||||
left: 0;
|
||||
width: 7px;
|
||||
cursor: ew-resize;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize-ne,
|
||||
.adp-ssh-terminal-resize-nw,
|
||||
.adp-ssh-terminal-resize-se,
|
||||
.adp-ssh-terminal-resize-sw {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize-ne {
|
||||
top: 0;
|
||||
right: 0;
|
||||
cursor: nesw-resize;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize-nw {
|
||||
top: 0;
|
||||
left: 0;
|
||||
cursor: nwse-resize;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize-se {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
cursor: nwse-resize;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize-sw {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
cursor: nesw-resize;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-launcher {
|
||||
position: fixed;
|
||||
right: 18px;
|
||||
bottom: 18px;
|
||||
z-index: 2147482500;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 8px;
|
||||
border: none;
|
||||
background: rgba(2, 6, 23, 0.86);
|
||||
color: #d1d5db;
|
||||
box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
|
||||
cursor: pointer;
|
||||
transition: transform 140ms ease, color 140ms ease, box-shadow 140ms ease;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-launcher:hover {
|
||||
transform: translateY(-1px) scale(1.03);
|
||||
color: #f8fafc;
|
||||
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-launcher.is-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.adp-ssh-terminal-window {
|
||||
min-width: 280px;
|
||||
min-height: 220px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window.is-minimized {
|
||||
width: min(340px, calc(100vw - 16px));
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-grip {
|
||||
width: 42px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (pointer: coarse) {
|
||||
.adp-ssh-terminal-titlebar {
|
||||
height: 38px;
|
||||
flex-basis: 38px;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize-n,
|
||||
.adp-ssh-terminal-resize-s {
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize-e,
|
||||
.adp-ssh-terminal-resize-w {
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-resize-ne,
|
||||
.adp-ssh-terminal-resize-nw,
|
||||
.adp-ssh-terminal-resize-se,
|
||||
.adp-ssh-terminal-resize-sw {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce), (update: slow) {
|
||||
.adp-ssh-terminal-window,
|
||||
.adp-ssh-terminal-launcher {
|
||||
transition-duration: 60ms;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window {
|
||||
box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(15, 23, 42, 0.58);
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window::before {
|
||||
opacity: 0.28;
|
||||
}
|
||||
|
||||
.adp-ssh-terminal-window::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-transparency: reduce) {
|
||||
.adp-ssh-terminal-window::before,
|
||||
.adp-ssh-terminal-window::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,567 @@
|
||||
/* Admin /status monitoring page styles.
|
||||
* Apple 2026 + Dieter Rams aesthetic.
|
||||
* Less, but better. Honest materials. Tabular numerics. No decoration without purpose.
|
||||
*/
|
||||
|
||||
:root {
|
||||
--monitor-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
|
||||
"Inter", "Manrope", "Segoe UI", system-ui, sans-serif;
|
||||
--monitor-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Menlo", "Consolas", monospace;
|
||||
--monitor-surface: rgba(255, 255, 255, 0.035);
|
||||
--monitor-surface-strong: rgba(255, 255, 255, 0.05);
|
||||
--monitor-border: rgba(255, 255, 255, 0.07);
|
||||
--monitor-border-soft: rgba(255, 255, 255, 0.045);
|
||||
--monitor-text: rgba(255, 255, 255, 0.95);
|
||||
--monitor-text-muted: rgba(255, 255, 255, 0.55);
|
||||
--monitor-text-faint: rgba(255, 255, 255, 0.38);
|
||||
--monitor-accent: #22d3ee;
|
||||
--monitor-accent-soft: rgba(34, 211, 238, 0.18);
|
||||
--monitor-radius-card: 22px;
|
||||
--monitor-radius-row: 14px;
|
||||
}
|
||||
|
||||
/* ===== Page shell ===== */
|
||||
.monitor {
|
||||
width: min(1180px, calc(100% - 48px));
|
||||
margin: 0 auto;
|
||||
padding: 8px 0 40px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 22px;
|
||||
font-family: var(--monitor-font);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* ===== Page header ===== */
|
||||
.monitor-head {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
padding: 4px 2px 0;
|
||||
}
|
||||
.monitor-head h2 {
|
||||
font-size: clamp(1.6rem, 3.2vh, 2.1rem);
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.02em;
|
||||
color: var(--monitor-text);
|
||||
line-height: 1.15;
|
||||
}
|
||||
.monitor-head p {
|
||||
color: var(--monitor-text-muted);
|
||||
font-size: 14px;
|
||||
margin-top: 6px;
|
||||
line-height: 1.5;
|
||||
max-width: 56ch;
|
||||
}
|
||||
.monitor-head__meta {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.monitor-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 9px;
|
||||
padding: 9px 14px;
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
color: var(--monitor-text-muted);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.005em;
|
||||
font-variant-numeric: tabular-nums;
|
||||
-webkit-backdrop-filter: blur(24px) saturate(180%);
|
||||
backdrop-filter: blur(24px) saturate(180%);
|
||||
box-shadow:
|
||||
0 1px 0 rgba(255, 255, 255, 0.12) inset,
|
||||
0 -1px 0 rgba(0, 0, 0, 0.18) inset,
|
||||
0 8px 22px rgba(0, 0, 0, 0.28);
|
||||
transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1),
|
||||
background 0.22s ease, border-color 0.22s ease;
|
||||
}
|
||||
.monitor-chip:hover {
|
||||
background: rgba(255, 255, 255, 0.09);
|
||||
border-color: rgba(255, 255, 255, 0.16);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.monitor-chip strong {
|
||||
color: var(--monitor-text);
|
||||
font-weight: 600;
|
||||
}
|
||||
.monitor-chip i {
|
||||
color: var(--monitor-accent);
|
||||
font-size: 12.5px;
|
||||
width: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ===== Card surface ===== */
|
||||
.monitor-card {
|
||||
background: var(--monitor-surface);
|
||||
border: 1px solid var(--monitor-border-soft);
|
||||
border-radius: var(--monitor-radius-card);
|
||||
padding: 24px 26px;
|
||||
box-shadow:
|
||||
0 1px 0 rgba(255, 255, 255, 0.04) inset,
|
||||
0 18px 40px rgba(0, 0, 0, 0.22);
|
||||
-webkit-backdrop-filter: blur(14px) saturate(140%);
|
||||
backdrop-filter: blur(14px) saturate(140%);
|
||||
}
|
||||
.monitor-card__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 9px;
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: none;
|
||||
color: var(--monitor-text-muted);
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
.monitor-card__title i {
|
||||
color: var(--monitor-accent);
|
||||
font-size: 13px;
|
||||
width: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ===== Metrics Hero Grid (Apple-inspired circular cards) ===== */
|
||||
.metrics-hero {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
gap: 20px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.metric-card {
|
||||
position: relative;
|
||||
background: var(--monitor-surface);
|
||||
border: 1px solid var(--monitor-border-soft);
|
||||
border-radius: var(--monitor-radius-card);
|
||||
padding: 36px 28px 28px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
min-height: 260px;
|
||||
box-shadow:
|
||||
0 1px 0 rgba(255, 255, 255, 0.04) inset,
|
||||
0 18px 40px rgba(0, 0, 0, 0.22);
|
||||
-webkit-backdrop-filter: blur(14px) saturate(140%);
|
||||
backdrop-filter: blur(14px) saturate(140%);
|
||||
transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
|
||||
box-shadow 0.3s ease,
|
||||
border-color 0.3s ease;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.metric-card:hover {
|
||||
transform: translateY(-2px);
|
||||
border-color: rgba(255, 255, 255, 0.12);
|
||||
box-shadow:
|
||||
0 1px 0 rgba(255, 255, 255, 0.06) inset,
|
||||
0 24px 48px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.metric-card__ring {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 240px;
|
||||
height: 240px;
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.metric-card__ring svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.metric-card__ring-fill {
|
||||
transition: stroke-dasharray 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
|
||||
}
|
||||
|
||||
.metric-card__icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
margin-bottom: 14px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.metric-card__label {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--monitor-text-muted);
|
||||
letter-spacing: 0.01em;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.metric-card__value {
|
||||
font-size: 48px;
|
||||
font-weight: 700;
|
||||
color: var(--monitor-text);
|
||||
font-variant-numeric: tabular-nums;
|
||||
letter-spacing: -0.03em;
|
||||
line-height: 1;
|
||||
margin-bottom: 8px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.metric-card__detail {
|
||||
font-size: 12px;
|
||||
color: var(--monitor-text-muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
text-align: center;
|
||||
letter-spacing: 0.01em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* ===== Stats Row (Live metrics) ===== */
|
||||
.stats-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 16px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.stat-pill {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 20px 24px;
|
||||
background: var(--monitor-surface);
|
||||
border: 1px solid var(--monitor-border-soft);
|
||||
border-radius: var(--monitor-radius-card);
|
||||
box-shadow:
|
||||
0 1px 0 rgba(255, 255, 255, 0.04) inset,
|
||||
0 12px 30px rgba(0, 0, 0, 0.18);
|
||||
-webkit-backdrop-filter: blur(14px) saturate(140%);
|
||||
backdrop-filter: blur(14px) saturate(140%);
|
||||
transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1),
|
||||
border-color 0.25s ease;
|
||||
}
|
||||
|
||||
.stat-pill:hover {
|
||||
transform: translateY(-1px);
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.stat-pill__icon {
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.stat-pill__body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.stat-pill__label {
|
||||
font-size: 12px;
|
||||
color: var(--monitor-text-muted);
|
||||
letter-spacing: 0.01em;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.stat-pill__value {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
color: var(--monitor-text);
|
||||
font-variant-numeric: tabular-nums;
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
/* ===== Services grid ===== */
|
||||
.svc-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
.svc-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px 14px;
|
||||
border-radius: var(--monitor-radius-row);
|
||||
background: var(--monitor-surface-strong);
|
||||
border: 1px solid var(--monitor-border-soft);
|
||||
}
|
||||
.svc-row__dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
flex: none;
|
||||
background: var(--monitor-text-faint);
|
||||
transition: background 0.3s ease, box-shadow 0.3s ease;
|
||||
}
|
||||
.svc-row[data-state="ok"] .svc-row__dot {
|
||||
background: #22c55e;
|
||||
box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
|
||||
}
|
||||
.svc-row[data-state="warn"] .svc-row__dot {
|
||||
background: #f59e0b;
|
||||
box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
|
||||
}
|
||||
.svc-row[data-state="bad"] .svc-row__dot {
|
||||
background: #ef4444;
|
||||
box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
|
||||
}
|
||||
.svc-row__body { min-width: 0; }
|
||||
.svc-row__name {
|
||||
font-size: 13.5px;
|
||||
font-weight: 500;
|
||||
color: var(--monitor-text);
|
||||
letter-spacing: -0.005em;
|
||||
}
|
||||
.svc-row__val {
|
||||
font-size: 12px;
|
||||
color: var(--monitor-text-muted);
|
||||
margin-top: 2px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
/* ===== History graph + calendar ===== */
|
||||
.graph-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
}
|
||||
.graph-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.graph-legend {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 4px;
|
||||
border-radius: 999px;
|
||||
background: var(--monitor-surface);
|
||||
border: 1px solid var(--monitor-border-soft);
|
||||
}
|
||||
.graph-legend span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
font-size: 12px;
|
||||
color: var(--monitor-text-muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
padding: 5px 11px;
|
||||
border-radius: 999px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.graph-legend i {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
#graphLabel {
|
||||
font-size: 12.5px;
|
||||
color: var(--monitor-text-muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
#metricsGraph {
|
||||
width: 100%;
|
||||
height: 220px;
|
||||
display: block;
|
||||
border-radius: 14px;
|
||||
background: var(--monitor-surface);
|
||||
border: 1px solid var(--monitor-border-soft);
|
||||
padding: 14px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Calendar */
|
||||
.calendar { margin-top: 4px; }
|
||||
.calendar-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 14px;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.calendar-nav {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 4px;
|
||||
border-radius: 999px;
|
||||
background: var(--monitor-surface);
|
||||
border: 1px solid var(--monitor-border-soft);
|
||||
}
|
||||
.calendar-nav-btn {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 999px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--monitor-text-muted);
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
|
||||
}
|
||||
.calendar-nav-btn:hover:not(:disabled) {
|
||||
background: var(--monitor-surface-strong);
|
||||
color: var(--monitor-text);
|
||||
}
|
||||
.calendar-nav-btn:active:not(:disabled) {
|
||||
transform: scale(0.94);
|
||||
}
|
||||
.calendar-nav-btn:disabled {
|
||||
opacity: 0.3;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.calendar-head__month {
|
||||
font-size: 14.5px;
|
||||
font-weight: 600;
|
||||
color: var(--monitor-text);
|
||||
letter-spacing: -0.01em;
|
||||
padding: 0 10px;
|
||||
min-width: 130px;
|
||||
text-align: center;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.calendar-head__hint {
|
||||
font-size: 12px;
|
||||
color: var(--monitor-text-faint);
|
||||
}
|
||||
|
||||
.cal-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
gap: 6px;
|
||||
}
|
||||
.cal-weekday {
|
||||
text-align: center;
|
||||
font-size: 10.5px;
|
||||
font-weight: 600;
|
||||
color: var(--monitor-text-faint);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
padding: 8px 0 10px;
|
||||
}
|
||||
.cal-cell {
|
||||
position: relative;
|
||||
aspect-ratio: 1 / 1;
|
||||
border-radius: 12px;
|
||||
border: 1px solid var(--monitor-border-soft);
|
||||
background: var(--monitor-surface);
|
||||
color: var(--monitor-text);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
font-family: var(--monitor-font);
|
||||
transition:
|
||||
transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
|
||||
box-shadow 0.2s ease,
|
||||
background 0.2s ease,
|
||||
border-color 0.2s ease;
|
||||
overflow: hidden;
|
||||
}
|
||||
.cal-cell:hover:not(.cal-cell--blank):not(.cal-cell--active) {
|
||||
transform: translateY(-1px);
|
||||
background: var(--monitor-surface-strong);
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.cal-cell--blank {
|
||||
background: transparent;
|
||||
border-color: transparent;
|
||||
cursor: default;
|
||||
}
|
||||
.cal-cell--blank:hover { transform: none; }
|
||||
|
||||
.cal-cell__num {
|
||||
font-size: 13.5px;
|
||||
font-weight: 500;
|
||||
font-variant-numeric: tabular-nums;
|
||||
letter-spacing: -0.01em;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* Active/selected day: same look as unselected, just "pressed" (sunken). */
|
||||
.cal-cell--active {
|
||||
transform: scale(0.9);
|
||||
background: rgba(0, 0, 0, 0.28);
|
||||
border-color: rgba(255, 255, 255, 0.04);
|
||||
box-shadow:
|
||||
inset 0 2px 4px rgba(0, 0, 0, 0.45),
|
||||
inset 0 -1px 0 rgba(255, 255, 255, 0.03);
|
||||
}
|
||||
.cal-cell--active .cal-cell__num { color: var(--monitor-text); }
|
||||
|
||||
/* Heat indicator + today dot are intentionally hidden — minimal cells. */
|
||||
.cal-cell__heat,
|
||||
.cal-cell--today .cal-cell__num::after { display: none; }
|
||||
|
||||
/* ===== Responsive ===== */
|
||||
@media (max-width: 920px) {
|
||||
.metrics-hero {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.monitor-head { align-items: flex-start; }
|
||||
.monitor-head__meta { width: 100%; }
|
||||
.monitor-chip { font-size: 12.5px; padding: 8px 12px; }
|
||||
.calendar-head { flex-direction: column; align-items: flex-start; gap: 8px; }
|
||||
.stats-row {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.monitor { width: calc(100% - 28px); }
|
||||
.monitor-card { padding: 20px 18px; }
|
||||
.metric-card { padding: 32px 24px 28px; min-height: 240px; }
|
||||
.metric-card__value { font-size: 40px; }
|
||||
.metric-card__ring { width: 210px; height: 210px; }
|
||||
.metrics-hero { grid-template-columns: 1fr; gap: 16px; }
|
||||
.cal-cell { padding: 4px 2px 6px; gap: 3px; }
|
||||
.cal-cell__num { font-size: 12.5px; }
|
||||
.cal-cell__heat { height: 2.5px; }
|
||||
.monitor-chip { font-size: 12px; padding: 7px 11px; }
|
||||
.stat-pill { padding: 16px 20px; }
|
||||
}
|
||||
+315
-108
@@ -38,8 +38,8 @@ body {
|
||||
background: url("https://cdn.pixabay.com/photo/2024/07/19/08/16/waves-8905720_1280.png") center/cover no-repeat;
|
||||
background-attachment: fixed;
|
||||
padding: 32px clamp(20px, 6vw, 72px);
|
||||
scroll-snap-type: y mandatory;
|
||||
overflow-y: scroll;
|
||||
overscroll-behavior: none;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
@@ -193,14 +193,14 @@ html.skip-dashboard-splash #splash-screen {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
outline: none;
|
||||
border: none !important;
|
||||
outline: none !important;
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
color: var(--color-text);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
cursor: pointer;
|
||||
transition: transform var(--transition-base), background var(--transition-base), border var(--transition-base);
|
||||
transition: transform var(--transition-base), background var(--transition-base);
|
||||
}
|
||||
|
||||
.icon-button:hover {
|
||||
@@ -217,6 +217,13 @@ html.skip-dashboard-splash #splash-screen {
|
||||
background: rgb(0, 140, 254);
|
||||
}
|
||||
|
||||
.icon-button:focus,
|
||||
.icon-button:focus-visible,
|
||||
.icon-button:active {
|
||||
border: none !important;
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.icon-button:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
@@ -280,12 +287,12 @@ html.skip-dashboard-splash #splash-screen {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
cursor: pointer;
|
||||
transition: transform var(--transition-base), background var(--transition-base), border var(--transition-base);
|
||||
transition: transform var(--transition-base), background var(--transition-base);
|
||||
}
|
||||
|
||||
.icon-butt {
|
||||
border: none;
|
||||
outline: none;
|
||||
border: none !important;
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.icon-butt i {
|
||||
@@ -295,7 +302,15 @@ html.skip-dashboard-splash #splash-screen {
|
||||
.icon-butt:hover:not(:disabled) {
|
||||
transform: translateY(-2px) scale(1.03);
|
||||
background: rgba(255, 0, 0, 0.841);
|
||||
border-color: rgba(0, 255, 213, 0);
|
||||
border: none !important;
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.icon-butt:focus,
|
||||
.icon-butt:focus-visible,
|
||||
.icon-butt:active {
|
||||
border: none !important;
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.icon-butt:disabled {
|
||||
@@ -306,7 +321,7 @@ html.skip-dashboard-splash #splash-screen {
|
||||
.dashboard {
|
||||
margin-top: 32px;
|
||||
display: grid;
|
||||
gap: clamp(28px, 4vw, 48px);
|
||||
gap: 30px;
|
||||
}
|
||||
|
||||
.hero {
|
||||
@@ -314,16 +329,32 @@ html.skip-dashboard-splash #splash-screen {
|
||||
grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
|
||||
gap: clamp(24px, 4vw, 44px);
|
||||
align-items: stretch;
|
||||
scroll-snap-align: start;
|
||||
}
|
||||
|
||||
.hero-copy {
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--color-border);
|
||||
position: relative;
|
||||
background: rgba(30, 30, 35, 0.7);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: clamp(28px, 4vw, 40px);
|
||||
box-shadow: var(--shadow-lg);
|
||||
backdrop-filter: blur(18px);
|
||||
box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
|
||||
backdrop-filter: blur(40px) saturate(180%);
|
||||
-webkit-backdrop-filter: blur(40px) saturate(180%);
|
||||
transition: background var(--transition-base), border-color var(--transition-base);
|
||||
}
|
||||
|
||||
.hero-copy::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: inherit;
|
||||
pointer-events: none;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 25%);
|
||||
}
|
||||
|
||||
.hero-copy:hover {
|
||||
background: rgba(30, 30, 35, 0.78);
|
||||
border-color: rgba(255, 255, 255, 0.14);
|
||||
}
|
||||
|
||||
.hero-copy h2 {
|
||||
@@ -345,40 +376,57 @@ html.skip-dashboard-splash #splash-screen {
|
||||
}
|
||||
|
||||
.pill {
|
||||
border-top: 20px solid black;
|
||||
border-right: 5px solid black;
|
||||
border-bottom: 20px solid black;
|
||||
border-left: 5px solid black;
|
||||
border-radius: 5px;
|
||||
border: none;
|
||||
border-radius: 999px;
|
||||
padding: 10px 22px;
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
background: linear-gradient(135deg, #7c5cff, #4f46e5);
|
||||
color: white;
|
||||
transition: transform var(--transition-base), box-shadow var(--transition-base);
|
||||
transition: background 0.25s ease;
|
||||
transition: filter 0.2s ease-in-out;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.pill--outline {
|
||||
background: transparent;
|
||||
color: var(--color-text);
|
||||
border: 2px solid rgba(255, 255, 255, 0.088);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.pill--outline:hover {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border-color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
/* Buton Create independent cu hover gri */
|
||||
.pill.pill--create-hero {
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.pill.pill--create-hero:hover {
|
||||
background: rgba(255, 255, 255, 0.12) !important;
|
||||
border-color: rgba(255, 255, 255, 0.35) !important;
|
||||
}
|
||||
|
||||
.pill:hover {
|
||||
transform: translateY(-1px);
|
||||
border: 2px solid rgba(255, 255, 255, 0.168);
|
||||
box-shadow: 0 12px 24px rgba(78, 70, 229, 0.129);
|
||||
background: linear-gradient(135deg, #7c5dff, #4f46e6);
|
||||
}
|
||||
|
||||
.pills {
|
||||
border: none;
|
||||
border-radius: 999px;
|
||||
padding: 10px 22px;
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
background: linear-gradient(135deg, #7c5cff, #4f46e5);
|
||||
color: white;
|
||||
transition: transform var(--transition-base), box-shadow var(--transition-base);
|
||||
transition: background 0.25s ease;
|
||||
}
|
||||
|
||||
.pills--outline {
|
||||
@@ -388,8 +436,7 @@ html.skip-dashboard-splash #splash-screen {
|
||||
}
|
||||
|
||||
.pills:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 12px 24px rgba(79, 70, 229, 0.28);
|
||||
background: linear-gradient(135deg, #8c6cff, #6356f5);
|
||||
}
|
||||
|
||||
.hero-stats {
|
||||
@@ -398,55 +445,89 @@ html.skip-dashboard-splash #splash-screen {
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 18px;
|
||||
background: var(--color-surface);
|
||||
gap: 22px;
|
||||
background: rgba(30, 30, 35, 0.7);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 20px;
|
||||
box-shadow: var(--shadow-md);
|
||||
backdrop-filter: blur(20px);
|
||||
box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
||||
backdrop-filter: blur(40px) saturate(180%);
|
||||
-webkit-backdrop-filter: blur(40px) saturate(180%);
|
||||
transition: background var(--transition-base), border-color var(--transition-base);
|
||||
}
|
||||
|
||||
.stat-card::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: inherit;
|
||||
pointer-events: none;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%);
|
||||
}
|
||||
|
||||
.stat-card:hover {
|
||||
background: rgba(30, 30, 35, 0.78);
|
||||
border-color: rgba(255, 255, 255, 0.14);
|
||||
}
|
||||
|
||||
.stat-card__icon {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 18px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-size: 1.3rem;
|
||||
color: white;
|
||||
font-size: 2.2rem;
|
||||
color: #818cf8;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.stat-card__icon--active {
|
||||
background: linear-gradient(135deg, #34d399, #059669);
|
||||
.stat-card:first-child .stat-card__icon {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
.stat-card__icon--uptime {
|
||||
background: linear-gradient(135deg, #38bdf8, #1d4ed8);
|
||||
}
|
||||
|
||||
.stat-card__icon--deploy {
|
||||
background: linear-gradient(135deg, #ffa600, #da4500);
|
||||
.stat-card__content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.stat-card__label {
|
||||
font-size: 0.9rem;
|
||||
color: var(--color-text-muted);
|
||||
margin: 0;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.stat-card__value {
|
||||
font-size: 1.7rem;
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.quick-actions {
|
||||
background: var(--color-surface);
|
||||
position: relative;
|
||||
background: rgba(30, 30, 35, 0.7);
|
||||
border-radius: var(--radius-lg);
|
||||
border: 1px solid var(--color-border);
|
||||
box-shadow: var(--shadow-md);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
||||
padding: clamp(24px, 4vw, 36px);
|
||||
backdrop-filter: blur(14px);
|
||||
backdrop-filter: blur(40px) saturate(180%);
|
||||
-webkit-backdrop-filter: blur(40px) saturate(180%);
|
||||
transition: background var(--transition-base), border-color var(--transition-base);
|
||||
}
|
||||
|
||||
.quick-actions::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: inherit;
|
||||
pointer-events: none;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%);
|
||||
}
|
||||
|
||||
.quick-actions:hover {
|
||||
background: rgba(30, 30, 35, 0.78);
|
||||
border-color: rgba(255, 255, 255, 0.14);
|
||||
}
|
||||
|
||||
.quick-actions h3 {
|
||||
@@ -579,7 +660,7 @@ html.skip-dashboard-splash #splash-screen {
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.section-heading h3 {
|
||||
@@ -627,21 +708,73 @@ html.skip-dashboard-splash #splash-screen {
|
||||
|
||||
.bot-grid {
|
||||
display: grid;
|
||||
gap: 18px;
|
||||
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||
gap: 20px;
|
||||
grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 360px));
|
||||
justify-content: center;
|
||||
row-gap: 40px;
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
.bots .bot-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
||||
gap: 16px;
|
||||
grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 360px));
|
||||
gap: 20px;
|
||||
row-gap: 40px;
|
||||
justify-content: center;
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
justify-items: center;
|
||||
.bot-card:only-child {
|
||||
justify-self: center;
|
||||
max-width: 360px;
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
.bot-grid,
|
||||
.bots .bot-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 401px) and (max-width: 800px) {
|
||||
.bot-grid,
|
||||
.bots .bot-grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(320px, 360px));
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 801px) and (max-width: 1200px) {
|
||||
.bot-grid,
|
||||
.bots .bot-grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(340px, 360px));
|
||||
max-width: 760px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1201px) and (max-width: 1600px) {
|
||||
.bot-grid,
|
||||
.bots .bot-grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(350px, 360px));
|
||||
max-width: 1140px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1601px) {
|
||||
.bot-grid,
|
||||
.bots .bot-grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(360px, 360px));
|
||||
max-width: 1520px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.bots,
|
||||
.quick-actions {
|
||||
scroll-snap-align: start;
|
||||
scroll-margin-top: 20px;
|
||||
}
|
||||
|
||||
@@ -651,48 +784,21 @@ html.skip-dashboard-splash #splash-screen {
|
||||
flex-direction: column;
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
background: radial-gradient(circle at 10% -10%, rgba(34, 211, 238, 0.08), transparent 26%),
|
||||
radial-gradient(circle at 80% -20%, rgba(124, 92, 255, 0.12), transparent 32%),
|
||||
linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
|
||||
background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
|
||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||
cursor: pointer;
|
||||
box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
|
||||
isolation: isolate;
|
||||
transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
|
||||
}
|
||||
|
||||
.bot-card::before,
|
||||
.bot-card::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.25s ease;
|
||||
}
|
||||
|
||||
.bot-card::before {
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(29, 78, 216, 0.12));
|
||||
opacity: 0.35;
|
||||
}
|
||||
|
||||
.bot-card::after {
|
||||
border-radius: inherit;
|
||||
background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 36%),
|
||||
radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.22), transparent 38%);
|
||||
mix-blend-mode: screen;
|
||||
opacity: 0.45;
|
||||
will-change: transform;
|
||||
transform: translateZ(0);
|
||||
backface-visibility: hidden;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.bot-card:hover {
|
||||
transform: translateY(-1px) scale(1.005);
|
||||
transform: translateY(-1px) translateZ(0);
|
||||
box-shadow: 0 22px 52px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.bot-card:hover::after {
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
.bot-card__hero {
|
||||
position: relative;
|
||||
min-height: 210px;
|
||||
@@ -705,7 +811,9 @@ html.skip-dashboard-splash #splash-screen {
|
||||
background: var(--bot-cover);
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
filter: saturate(1.5) brightness(1);
|
||||
opacity: 0.85;
|
||||
will-change: transform;
|
||||
transform: translateZ(0);
|
||||
-webkit-mask-image: linear-gradient(180deg, #fff 0%, #fff 70%, rgba(255, 255, 255, 0.65) 82%, transparent 100%);
|
||||
mask-image: linear-gradient(180deg, #fff 0%, #fff 70%, rgba(255, 255, 255, 0.65) 82%, transparent 100%);
|
||||
}
|
||||
@@ -713,9 +821,7 @@ html.skip-dashboard-splash #splash-screen {
|
||||
.bot-card__hero-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(180deg, rgba(2, 6, 23, 0.02) 0%, rgba(2, 6, 23, 0.373) 20%, rgba(2, 6, 23, 0.581) 20%),
|
||||
radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.26), transparent 70%);
|
||||
mix-blend-mode: lighten;
|
||||
background: linear-gradient(180deg, rgba(2, 6, 23, 0.02) 0%, rgba(2, 6, 23, 0.45) 100%);
|
||||
}
|
||||
|
||||
.bot-card__hero-content {
|
||||
@@ -810,20 +916,20 @@ html.skip-dashboard-splash #splash-screen {
|
||||
|
||||
.bot-card.status-online .bot-card__status-dot {
|
||||
color: #34d399;
|
||||
background: radial-gradient(circle at 35% 35%, #e6fff2 0%, #c1ffd7 30%, #34d399 70%);
|
||||
box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.16), 0 0 22px rgba(52, 211, 153, 0.45);
|
||||
background: #34d399;
|
||||
box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.16), 0 0 12px rgba(52, 211, 153, 0.45);
|
||||
}
|
||||
|
||||
.bot-card.status-stopped .bot-card__status-dot {
|
||||
color: #e64747;
|
||||
background: radial-gradient(circle at 35% 35%, #ffe4e8 0%, #ffc2cb 30%, #e64747 70%);
|
||||
box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.18), 0 0 22px rgba(239, 68, 68, 0.45);
|
||||
background: #e64747;
|
||||
box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.18), 0 0 12px rgba(239, 68, 68, 0.45);
|
||||
}
|
||||
|
||||
.bot-card.status-unknown .bot-card__status-dot {
|
||||
color: #f59e0b;
|
||||
background: radial-gradient(circle at 35% 35%, #fef3c7 0%, #fde68a 30%, #f59e0b 70%);
|
||||
box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.16), 0 0 22px rgba(245, 158, 11, 0.35);
|
||||
background: #f59e0b;
|
||||
box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.16), 0 0 12px rgba(245, 158, 11, 0.35);
|
||||
}
|
||||
|
||||
.bot-card.status-unknown .bot-card__status-dot::before,
|
||||
@@ -841,7 +947,6 @@ html.skip-dashboard-splash #splash-screen {
|
||||
background: rgba(2, 6, 23, 0.6);
|
||||
border-radius: 14px;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.bot-card__meta-row span {
|
||||
@@ -862,7 +967,6 @@ html.skip-dashboard-splash #splash-screen {
|
||||
background: linear-gradient(180deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.96));
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
|
||||
backdrop-filter: blur(18px);
|
||||
}
|
||||
|
||||
.bot-card__stat {
|
||||
@@ -1060,11 +1164,12 @@ html.skip-dashboard-splash #splash-screen {
|
||||
|
||||
.footer {
|
||||
margin-top: 40px;
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--color-border);
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: var(--shadow-md);
|
||||
backdrop-filter: blur(14px);
|
||||
backdrop-filter: blur(14px) saturate(160%);
|
||||
-webkit-backdrop-filter: blur(14px) saturate(160%);
|
||||
}
|
||||
|
||||
.footer-inner {
|
||||
@@ -1230,6 +1335,12 @@ html.skip-dashboard-splash #splash-screen {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.footer .btn-primary:hover {
|
||||
background: linear-gradient(135deg, #10aff0, #1f52dc);
|
||||
filter: none;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.btn-primary.create-btn:hover {
|
||||
transform: none;
|
||||
}
|
||||
@@ -1239,6 +1350,102 @@ html.skip-dashboard-splash #splash-screen {
|
||||
filter: brightness(0.96);
|
||||
}
|
||||
|
||||
/* ── Navbar Create pill — circle → pill expand ────────────────────────── */
|
||||
/* Open/close is driven by JS (.is-open class on mouseenter/leave + focus) so
|
||||
the collapse animation always plays, even after the cursor leaves. */
|
||||
.create-btn {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
/* No horizontal padding in the circle state: the icon is centred purely by
|
||||
flexbox, so the "+" sits dead-centre regardless of the (collapsed) label. */
|
||||
padding: 0;
|
||||
border-radius: 50%;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0;
|
||||
/* 0.4s smooth expand / collapse */
|
||||
transition:
|
||||
width 0.4s cubic-bezier(0.65, 0, 0.35, 1),
|
||||
border-radius 0.4s cubic-bezier(0.65, 0, 0.35, 1),
|
||||
padding 0.4s cubic-bezier(0.65, 0, 0.35, 1),
|
||||
gap 0.4s cubic-bezier(0.65, 0, 0.35, 1),
|
||||
filter 0.4s ease;
|
||||
}
|
||||
|
||||
.create-btn__icon {
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
/* Centred in the circle (no offset); only opacity eases when opening,
|
||||
so the "+" stays dead-centre while still animating like the label. */
|
||||
opacity: 0.9;
|
||||
transition: opacity 0.25s cubic-bezier(0.65, 0, 0.35, 1);
|
||||
}
|
||||
|
||||
.create-btn__label {
|
||||
flex: 0 0 auto;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
/* Collapsed: pulled out of normal flow so it never offsets the centred icon */
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
max-width: 0;
|
||||
opacity: 0;
|
||||
font-family: 'Inter', 'Manrope', system-ui, sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
letter-spacing: 0.01em;
|
||||
transform: translateX(8px);
|
||||
pointer-events: none;
|
||||
/* Closing: label fades/slides out while the box collapses */
|
||||
transition:
|
||||
max-width 0.25s cubic-bezier(0.65, 0, 0.35, 1),
|
||||
opacity 0.2s cubic-bezier(0.65, 0, 0.35, 1),
|
||||
transform 0.25s cubic-bezier(0.65, 0, 0.35, 1);
|
||||
}
|
||||
|
||||
/* Open state — toggled by JS (.is-open) and mirrored on :focus-visible */
|
||||
.create-btn.is-open,
|
||||
.create-btn:focus-visible {
|
||||
width: 124px;
|
||||
border-radius: 999px;
|
||||
/* Even left/right padding centres the icon+label group inside the pill */
|
||||
padding: 0 18px;
|
||||
gap: 9px;
|
||||
filter: brightness(1.06);
|
||||
}
|
||||
|
||||
.create-btn.is-open .create-btn__icon,
|
||||
.create-btn:focus-visible .create-btn__icon {
|
||||
opacity: 1;
|
||||
transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1) 0.08s;
|
||||
}
|
||||
|
||||
.create-btn.is-open .create-btn__label,
|
||||
.create-btn:focus-visible .create-btn__label {
|
||||
/* Back into normal flow when open, so it sits next to the icon */
|
||||
position: static;
|
||||
left: auto;
|
||||
max-width: 64px;
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
pointer-events: auto;
|
||||
/* Opening: text eases in just after the box starts expanding */
|
||||
transition:
|
||||
max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.08s,
|
||||
opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1) 0.12s,
|
||||
transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.08s;
|
||||
}
|
||||
|
||||
.btn-ghost {
|
||||
background: rgba(15, 23, 42, 0.85);
|
||||
border: none;
|
||||
@@ -2735,7 +2942,7 @@ html.skip-dashboard-splash #splash-screen {
|
||||
.account-page {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 40px 24px;
|
||||
padding: 80px 24px 40px;
|
||||
animation: fadeInUp 0.4s ease;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 245 KiB |
File diff suppressed because it is too large.
Load diff
+890
-83
File diff suppressed because it is too large.
Load diff
@@ -908,22 +908,64 @@
|
||||
return els.messages.querySelectorAll(".dashboard-assistant-message--assistant").length;
|
||||
}
|
||||
|
||||
// Minimum viewport height (in CSS pixels) required to safely open the
|
||||
// assistant. Below this the UI is too cramped to be usable (matches a
|
||||
// phone-sized window or an extreme browser zoom-in).
|
||||
const MIN_OPEN_HEIGHT = 480;
|
||||
// Minimum viewport width. Below this the layout would clip horizontally.
|
||||
const MIN_OPEN_WIDTH = 360;
|
||||
|
||||
function canOpenMenu() {
|
||||
const h = window.innerHeight;
|
||||
const w = window.innerWidth;
|
||||
return h >= MIN_OPEN_HEIGHT && w >= MIN_OPEN_WIDTH;
|
||||
}
|
||||
|
||||
function positionMenu() {
|
||||
if (!state.open || !els.menu || !els.trigger) return;
|
||||
const triggerRect = els.trigger.getBoundingClientRect();
|
||||
|
||||
const margin = 12;
|
||||
const topGap = 10;
|
||||
|
||||
// Width: keep the designed width, never scale it. Clamp to viewport.
|
||||
const preferredWidth = state.configured ? 580 : 430;
|
||||
const menuWidth = Math.min(preferredWidth, window.innerWidth - 24);
|
||||
const leftBias = 150;
|
||||
const visualW = Math.min(preferredWidth, window.innerWidth - margin * 2);
|
||||
|
||||
// Center on trigger, then keep the panel fully visible in viewport.
|
||||
const idealLeft = triggerRect.left + (triggerRect.width / 2) - (menuWidth / 2) - leftBias;
|
||||
const left = Math.max(12, Math.min(idealLeft, window.innerWidth - menuWidth - 12));
|
||||
// Height: whatever fits between the trigger bottom and the viewport bottom.
|
||||
// The messages area has `flex: 1` + `overflow-y: auto`, so it scrolls
|
||||
// naturally when content is taller than this — no clipping at the bottom.
|
||||
const availableBelow = window.innerHeight - triggerRect.bottom - topGap - margin;
|
||||
const availableAbove = triggerRect.top - topGap - margin;
|
||||
// Prefer placing it below the trigger; fall back to above if no room.
|
||||
const useAbove = availableBelow < 260 && availableAbove > availableBelow;
|
||||
const visualH = Math.max(
|
||||
260,
|
||||
useAbove ? availableAbove : availableBelow
|
||||
);
|
||||
|
||||
els.menu.style.width = `${menuWidth}px`;
|
||||
// Center horizontally on the trigger, then clamp to viewport.
|
||||
const desiredLeft = triggerRect.left + (triggerRect.width / 2) - (visualW / 2) - 150;
|
||||
const left = Math.max(margin, Math.min(desiredLeft, window.innerWidth - visualW - margin));
|
||||
const top = useAbove
|
||||
? Math.max(margin, triggerRect.top - visualH - topGap)
|
||||
: Math.max(margin, triggerRect.bottom + topGap);
|
||||
|
||||
els.menu.style.width = `${visualW}px`;
|
||||
els.menu.style.height = `${visualH}px`;
|
||||
els.menu.style.left = `${left}px`;
|
||||
els.menu.style.right = 'auto';
|
||||
els.menu.style.top = `${triggerRect.bottom + 20}px`;
|
||||
els.menu.style.bottom = 'auto';
|
||||
els.menu.style.right = "auto";
|
||||
els.menu.style.top = `${top}px`;
|
||||
els.menu.style.bottom = "auto";
|
||||
els.menu.style.transform = "none";
|
||||
els.menu.style.setProperty("--assistant-scale", "1");
|
||||
|
||||
// Relax the messages area's min-height when the viewport is tight,
|
||||
// so the menu can shrink to fit without clipping the composer.
|
||||
if (els.messages) {
|
||||
const tight = visualH < 520;
|
||||
els.messages.style.minHeight = tight ? "0px" : "";
|
||||
}
|
||||
}
|
||||
|
||||
function stopSpeaking() {
|
||||
@@ -1168,6 +1210,10 @@
|
||||
}
|
||||
|
||||
function openMenu() {
|
||||
if (!canOpenMenu()) {
|
||||
showTooSmallNotice();
|
||||
return;
|
||||
}
|
||||
state.open = true;
|
||||
primeSpeechSynthesis();
|
||||
updateButtons();
|
||||
@@ -1178,6 +1224,24 @@
|
||||
});
|
||||
}
|
||||
|
||||
function showTooSmallNotice() {
|
||||
// Flash a transient inline notice near the trigger so the user understands
|
||||
// why the assistant didn't open. Uses the existing status pipeline.
|
||||
if (els.status) {
|
||||
const prevState = els.status.dataset.state;
|
||||
const prevText = els.status.textContent;
|
||||
els.status.dataset.state = "warning";
|
||||
els.status.textContent = "Screen too small to open the assistant. Try a larger window.";
|
||||
els.status.classList.remove("is-hidden");
|
||||
setTimeout(() => {
|
||||
if (!state.open && els.status) {
|
||||
els.status.dataset.state = prevState || "idle";
|
||||
els.status.textContent = prevText || "";
|
||||
}
|
||||
}, 3500);
|
||||
}
|
||||
}
|
||||
|
||||
function closeMenu() {
|
||||
state.open = false;
|
||||
updateButtons();
|
||||
@@ -4696,6 +4760,11 @@
|
||||
els.trigger?.addEventListener("click", (event) => {
|
||||
event.stopPropagation();
|
||||
if (!state.open) {
|
||||
if (!canOpenMenu()) {
|
||||
event.preventDefault();
|
||||
showTooSmallNotice();
|
||||
return;
|
||||
}
|
||||
openMenu();
|
||||
return;
|
||||
}
|
||||
@@ -4860,14 +4929,61 @@
|
||||
};
|
||||
}
|
||||
|
||||
window.addEventListener("resize", positionMenu);
|
||||
window.addEventListener("scroll", positionMenu, true);
|
||||
// Re-position on window resize, scroll, AND browser zoom.
|
||||
// `window.resize` doesn't always fire on Ctrl+/Ctrl- zoom, so we also
|
||||
// listen to `visualViewport.resize` (covers pinch-zoom and most browser
|
||||
// zoom cases) and fall back to a DPR poll for the rest.
|
||||
let lastDpr = window.devicePixelRatio || 1;
|
||||
const refit = () => {
|
||||
if (!state.open) return;
|
||||
if (!canOpenMenu()) {
|
||||
// Viewport shrunk below the safe threshold (e.g. extreme zoom-in).
|
||||
// Auto-close and inform the user.
|
||||
closeMenu();
|
||||
showTooSmallNotice();
|
||||
return;
|
||||
}
|
||||
positionMenu();
|
||||
};
|
||||
window.addEventListener("resize", refit);
|
||||
window.addEventListener("scroll", refit, true);
|
||||
if (window.visualViewport) {
|
||||
window.visualViewport.addEventListener("resize", refit);
|
||||
window.visualViewport.addEventListener("scroll", refit);
|
||||
}
|
||||
// DPR poll: catches the few browsers/configs where neither resize nor
|
||||
// visualViewport fires on zoom. Cheap (rAF-throttled).
|
||||
const dprTick = () => {
|
||||
const dpr = window.devicePixelRatio || 1;
|
||||
if (dpr !== lastDpr) {
|
||||
lastDpr = dpr;
|
||||
refit();
|
||||
}
|
||||
requestAnimationFrame(dprTick);
|
||||
};
|
||||
requestAnimationFrame(dprTick);
|
||||
|
||||
window.addEventListener("beforeunload", () => {
|
||||
stopSpeaking();
|
||||
stopActiveStream();
|
||||
cleanupAudioGraph();
|
||||
cleanupRecognition();
|
||||
});
|
||||
|
||||
// Re-position when the menu's intrinsic size changes (e.g. messages streaming,
|
||||
// config panel toggling, transcript appearing). Debounced with rAF.
|
||||
if (typeof ResizeObserver !== "undefined" && els.menu) {
|
||||
let rafId = 0;
|
||||
const ro = new ResizeObserver(() => {
|
||||
if (!state.open) return;
|
||||
if (rafId) cancelAnimationFrame(rafId);
|
||||
rafId = requestAnimationFrame(() => {
|
||||
rafId = 0;
|
||||
positionMenu();
|
||||
});
|
||||
});
|
||||
ro.observe(els.menu);
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
|
||||
+394
-265
File diff suppressed because it is too large.
Load diff
@@ -94,9 +94,17 @@
|
||||
} else {
|
||||
usedGb = data.disk / 1024; limitGb = 0; pct = 0;
|
||||
}
|
||||
resDiskLabel.textContent = limitGb > 0
|
||||
// adpanel:backup-storage - combined storage (server files + backups);
|
||||
// show the breakdown when backups occupy part of the quota.
|
||||
const serverMb = (typeof data.disk === 'object') ? data.disk.serverMb : null;
|
||||
const backupsMb = (typeof data.disk === 'object') ? data.disk.backupsMb : null;
|
||||
let diskText = limitGb > 0
|
||||
? `${formatBytes(usedGb * 1073741824)} / ${formatBytes(limitGb * 1073741824)} (${Math.round(pct)}%)`
|
||||
: `${formatBytes(usedGb * 1073741824)} / Unlimited`;
|
||||
if (Number.isFinite(backupsMb) && backupsMb > 0 && Number.isFinite(serverMb)) {
|
||||
diskText += ` — files ${formatBytes(serverMb * 1048576)} + backups ${formatBytes(backupsMb * 1048576)}`;
|
||||
}
|
||||
resDiskLabel.textContent = diskText;
|
||||
resDiskBar.style.width = `${pct}%`;
|
||||
} else {
|
||||
resDiskLabel.textContent = '—';
|
||||
|
||||
+3043
-639
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,632 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
const STORAGE_KEY = "adpanel:ssh-terminal-window:v1";
|
||||
const DEFAULT_WIDTH = 960;
|
||||
const DEFAULT_HEIGHT = 640;
|
||||
const MIN_WIDTH = 360;
|
||||
const MIN_HEIGHT = 260;
|
||||
const MINIMIZED_WIDTH = 380;
|
||||
const MINIMIZED_HEIGHT = 38;
|
||||
const MODAL_SELECTOR = [
|
||||
".modal-overlay",
|
||||
".activity-modal",
|
||||
".info-modal",
|
||||
".scheduler-modal",
|
||||
".planner-modal",
|
||||
".ai-help-modal",
|
||||
".clear-console-modal",
|
||||
".notfound-modal",
|
||||
".activity-modal-overlay",
|
||||
].join(",");
|
||||
const MOTION_QUERY = window.matchMedia
|
||||
? window.matchMedia("(prefers-reduced-motion: reduce), (update: slow)")
|
||||
: { matches: false };
|
||||
|
||||
let win = null;
|
||||
let frame = null;
|
||||
let launcher = null;
|
||||
let interaction = null;
|
||||
let raf = 0;
|
||||
let opening = null;
|
||||
let motionId = 0;
|
||||
let modalObserver = null;
|
||||
let launcherVisibilityRaf = 0;
|
||||
let geometry = { x: 24, y: 24, w: DEFAULT_WIDTH, h: DEFAULT_HEIGHT };
|
||||
|
||||
function readState() {
|
||||
try {
|
||||
const raw = localStorage.getItem(STORAGE_KEY);
|
||||
if (!raw) return {};
|
||||
const data = JSON.parse(raw);
|
||||
return data && typeof data === "object" ? data : {};
|
||||
} catch {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
function writeState(patch) {
|
||||
try {
|
||||
const next = Object.assign({}, readState(), patch, { updatedAt: Date.now() });
|
||||
localStorage.setItem(STORAGE_KEY, JSON.stringify(next));
|
||||
} catch { }
|
||||
}
|
||||
|
||||
function viewport() {
|
||||
return {
|
||||
w: Math.max(320, window.innerWidth || document.documentElement.clientWidth || 1280),
|
||||
h: Math.max(240, window.innerHeight || document.documentElement.clientHeight || 720),
|
||||
};
|
||||
}
|
||||
|
||||
function clampSize(w, h) {
|
||||
const vp = viewport();
|
||||
return {
|
||||
w: Math.max(Math.min(MIN_WIDTH, vp.w - 16), Math.min(Number.isFinite(w) ? w : DEFAULT_WIDTH, vp.w - 16)),
|
||||
h: Math.max(Math.min(MIN_HEIGHT, vp.h - 16), Math.min(Number.isFinite(h) ? h : DEFAULT_HEIGHT, vp.h - 16)),
|
||||
};
|
||||
}
|
||||
|
||||
function clampGeometry(x, y, w, h, minimized) {
|
||||
const vp = viewport();
|
||||
const size = clampSize(w, h);
|
||||
const viewW = minimized ? Math.min(MINIMIZED_WIDTH, vp.w - 16) : size.w;
|
||||
const viewH = minimized ? Math.min(MINIMIZED_HEIGHT, vp.h - 16) : size.h;
|
||||
return {
|
||||
x: Math.max(8, Math.min(Number.isFinite(x) ? x : 24, Math.max(8, vp.w - viewW - 8))),
|
||||
y: Math.max(8, Math.min(Number.isFinite(y) ? y : 24, Math.max(8, vp.h - viewH - 8))),
|
||||
w: size.w,
|
||||
h: size.h,
|
||||
};
|
||||
}
|
||||
|
||||
function getGeometryForState(state) {
|
||||
const minimized = !!state.minimized;
|
||||
const size = clampSize(Number(state.w), Number(state.h));
|
||||
if (Number.isFinite(state.x) && Number.isFinite(state.y)) {
|
||||
return clampGeometry(Number(state.x), Number(state.y), size.w, size.h, minimized);
|
||||
}
|
||||
const vp = viewport();
|
||||
const viewW = minimized ? Math.min(MINIMIZED_WIDTH, vp.w - 16) : size.w;
|
||||
const viewH = minimized ? MINIMIZED_HEIGHT : size.h;
|
||||
return clampGeometry(Math.round((vp.w - viewW) / 2), Math.round((vp.h - viewH) / 2), size.w, size.h, minimized);
|
||||
}
|
||||
|
||||
function applyGeometry(next) {
|
||||
if (!win) return;
|
||||
geometry = {
|
||||
x: Math.round(next.x),
|
||||
y: Math.round(next.y),
|
||||
w: Math.round(next.w),
|
||||
h: Math.round(next.h),
|
||||
};
|
||||
win.style.setProperty("--adp-ssh-x", `${geometry.x}px`);
|
||||
win.style.setProperty("--adp-ssh-y", `${geometry.y}px`);
|
||||
win.style.setProperty("--adp-ssh-w", `${geometry.w}px`);
|
||||
win.style.setProperty("--adp-ssh-h", `${geometry.h}px`);
|
||||
}
|
||||
|
||||
function writeWindowState(patch) {
|
||||
writeState(Object.assign({
|
||||
x: geometry.x,
|
||||
y: geometry.y,
|
||||
w: geometry.w,
|
||||
h: geometry.h,
|
||||
}, patch));
|
||||
}
|
||||
|
||||
function resizeCursor(handle) {
|
||||
if (handle === "n" || handle === "s") return "ns-resize";
|
||||
if (handle === "e" || handle === "w") return "ew-resize";
|
||||
if (handle === "ne" || handle === "sw") return "nesw-resize";
|
||||
return "nwse-resize";
|
||||
}
|
||||
|
||||
function setInteractionCursor(cursor) {
|
||||
document.documentElement.style.cursor = cursor;
|
||||
document.body.style.cursor = cursor;
|
||||
if (win) win.style.cursor = cursor;
|
||||
}
|
||||
|
||||
function clearInteractionCursor() {
|
||||
document.documentElement.style.cursor = "";
|
||||
document.body.style.cursor = "";
|
||||
if (win) win.style.cursor = "";
|
||||
}
|
||||
|
||||
function clearMotionClasses(node) {
|
||||
if (!node) return;
|
||||
node.classList.remove("is-liquid-motion", "is-motion-open", "is-motion-minimize", "is-motion-restore", "is-motion-close", "is-motion-lite");
|
||||
}
|
||||
|
||||
function cancelWindowMotion(node = win) {
|
||||
motionId += 1;
|
||||
if (node && node.getAnimations) {
|
||||
node.getAnimations().forEach((animation) => {
|
||||
try { animation.cancel(); } catch { }
|
||||
});
|
||||
}
|
||||
clearMotionClasses(node);
|
||||
}
|
||||
|
||||
function withoutWindowTransition(node, fn) {
|
||||
if (!node) return;
|
||||
const previous = node.style.transition;
|
||||
node.style.transition = "none";
|
||||
fn();
|
||||
void node.offsetWidth;
|
||||
node.style.transition = previous;
|
||||
}
|
||||
|
||||
function shouldUseLiteMotion() {
|
||||
const connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
|
||||
return !!(
|
||||
MOTION_QUERY.matches ||
|
||||
(navigator.hardwareConcurrency && navigator.hardwareConcurrency <= 2) ||
|
||||
(navigator.deviceMemory && navigator.deviceMemory <= 2) ||
|
||||
(connection && connection.saveData)
|
||||
);
|
||||
}
|
||||
|
||||
function visualRectForGeometry(next, minimized) {
|
||||
const vp = viewport();
|
||||
return {
|
||||
left: next.x,
|
||||
top: next.y,
|
||||
width: minimized ? Math.min(MINIMIZED_WIDTH, vp.w - 16) : next.w,
|
||||
height: minimized ? Math.min(MINIMIZED_HEIGHT, vp.h - 16) : next.h,
|
||||
};
|
||||
}
|
||||
|
||||
function rectTransform(rect, layoutRect) {
|
||||
const sx = rect.width / Math.max(1, layoutRect.width);
|
||||
const sy = rect.height / Math.max(1, layoutRect.height);
|
||||
return `translate3d(${rect.left}px, ${rect.top}px, 0) scale(${sx}, ${sy})`;
|
||||
}
|
||||
|
||||
function morphRect(from, to, progress, sx, sy) {
|
||||
return {
|
||||
left: from.left + (to.left - from.left) * progress,
|
||||
top: from.top + (to.top - from.top) * progress,
|
||||
width: to.width * sx,
|
||||
height: to.height * sy,
|
||||
};
|
||||
}
|
||||
|
||||
function motionKeyframes(kind, fromRect, toRect, layoutRect) {
|
||||
const start = rectTransform(fromRect, layoutRect);
|
||||
const end = rectTransform(toRect, layoutRect);
|
||||
|
||||
if (kind === "minimize") {
|
||||
return [
|
||||
{ opacity: 1, transform: start, offset: 0 },
|
||||
{ opacity: 1, transform: rectTransform(morphRect(fromRect, toRect, 0.72, 1.14, 0.68), layoutRect), offset: 0.58 },
|
||||
{ opacity: 1, transform: rectTransform(morphRect(fromRect, toRect, 0.94, 0.96, 1.12), layoutRect), offset: 0.82 },
|
||||
{ opacity: 1, transform: end, offset: 1 },
|
||||
];
|
||||
}
|
||||
|
||||
if (kind === "restore" || kind === "open") {
|
||||
return [
|
||||
{ opacity: kind === "open" ? 0 : 1, transform: start, offset: 0 },
|
||||
{ opacity: 1, transform: rectTransform(morphRect(fromRect, toRect, 1, 1.028, 0.982), layoutRect), offset: 0.54 },
|
||||
{ opacity: 1, transform: rectTransform(morphRect(fromRect, toRect, 1, 0.992, 1.006), layoutRect), offset: 0.78 },
|
||||
{ opacity: 1, transform: end, offset: 1 },
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
{ opacity: 1, transform: start, offset: 0 },
|
||||
{ opacity: 0.86, transform: rectTransform(morphRect(fromRect, toRect, 1, 1.018, 0.9), layoutRect), offset: 0.45 },
|
||||
{ opacity: 0, transform: end, offset: 1 },
|
||||
];
|
||||
}
|
||||
|
||||
function playWindowMotion(kind, fromRect, toRect, node = win) {
|
||||
if (!node) return Promise.resolve();
|
||||
|
||||
cancelWindowMotion(node);
|
||||
const currentMotion = motionId;
|
||||
const lite = shouldUseLiteMotion();
|
||||
const layoutRect = node.getBoundingClientRect();
|
||||
const finalRect = toRect || layoutRect;
|
||||
const initialRect = fromRect || {
|
||||
left: finalRect.left + finalRect.width * 0.04,
|
||||
top: finalRect.top + finalRect.height * 0.035,
|
||||
width: finalRect.width * 0.92,
|
||||
height: finalRect.height * 0.92,
|
||||
};
|
||||
const duration = lite
|
||||
? 140
|
||||
: kind === "restore" || kind === "open"
|
||||
? 520
|
||||
: kind === "minimize"
|
||||
? 460
|
||||
: 260;
|
||||
|
||||
node.classList.add("is-liquid-motion", `is-motion-${kind}`);
|
||||
node.classList.toggle("is-motion-lite", lite);
|
||||
|
||||
const cleanup = (animation) => {
|
||||
if (currentMotion !== motionId) return;
|
||||
if (animation) {
|
||||
try { animation.cancel(); } catch { }
|
||||
}
|
||||
clearMotionClasses(node);
|
||||
};
|
||||
|
||||
if (!node.animate) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
cleanup();
|
||||
resolve();
|
||||
}, duration);
|
||||
});
|
||||
}
|
||||
|
||||
const easing = kind === "close"
|
||||
? "cubic-bezier(0.4, 0, 1, 1)"
|
||||
: "cubic-bezier(0.16, 1, 0.3, 1)";
|
||||
const animation = node.animate(motionKeyframes(kind, initialRect, finalRect, layoutRect), {
|
||||
duration,
|
||||
easing,
|
||||
fill: "both",
|
||||
});
|
||||
|
||||
return animation.finished.catch(() => { }).then(() => cleanup(animation));
|
||||
}
|
||||
|
||||
function ensureWindow() {
|
||||
if (win) return win;
|
||||
|
||||
win = document.createElement("section");
|
||||
win.id = "adpSshTerminalWindow";
|
||||
win.className = "adp-ssh-terminal-window";
|
||||
win.setAttribute("role", "dialog");
|
||||
win.setAttribute("aria-label", "SSH Terminal");
|
||||
win.innerHTML = `
|
||||
<div class="adp-ssh-terminal-titlebar" data-adp-ssh-drag>
|
||||
<div class="adp-ssh-terminal-title">
|
||||
<i class="fa-solid fa-terminal" aria-hidden="true"></i>
|
||||
<span>SSH Terminal</span>
|
||||
</div>
|
||||
<div class="adp-ssh-terminal-grip" aria-hidden="true"></div>
|
||||
<div class="adp-ssh-terminal-controls">
|
||||
<button class="adp-ssh-terminal-control" type="button" data-adp-ssh-minimize title="Minimize terminal" aria-label="Minimize terminal">
|
||||
<i class="fa-solid fa-minus" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button class="adp-ssh-terminal-control" type="button" data-adp-ssh-close title="Close terminal" aria-label="Close terminal">
|
||||
<i class="fa-solid fa-xmark" aria-hidden="true"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="adp-ssh-terminal-frame-wrap">
|
||||
<iframe class="adp-ssh-terminal-frame" title="ADPanel SSH Terminal" loading="eager" referrerpolicy="no-referrer"></iframe>
|
||||
</div>
|
||||
<div class="adp-ssh-terminal-resize adp-ssh-terminal-resize-n" data-adp-ssh-resize="n"></div>
|
||||
<div class="adp-ssh-terminal-resize adp-ssh-terminal-resize-e" data-adp-ssh-resize="e"></div>
|
||||
<div class="adp-ssh-terminal-resize adp-ssh-terminal-resize-s" data-adp-ssh-resize="s"></div>
|
||||
<div class="adp-ssh-terminal-resize adp-ssh-terminal-resize-w" data-adp-ssh-resize="w"></div>
|
||||
<div class="adp-ssh-terminal-resize adp-ssh-terminal-resize-ne" data-adp-ssh-resize="ne"></div>
|
||||
<div class="adp-ssh-terminal-resize adp-ssh-terminal-resize-nw" data-adp-ssh-resize="nw"></div>
|
||||
<div class="adp-ssh-terminal-resize adp-ssh-terminal-resize-se" data-adp-ssh-resize="se"></div>
|
||||
<div class="adp-ssh-terminal-resize adp-ssh-terminal-resize-sw" data-adp-ssh-resize="sw"></div>
|
||||
`;
|
||||
document.body.appendChild(win);
|
||||
updateLauncherVisibility();
|
||||
frame = win.querySelector(".adp-ssh-terminal-frame");
|
||||
|
||||
const state = readState();
|
||||
const nextGeometry = getGeometryForState(state);
|
||||
applyGeometry(nextGeometry);
|
||||
win.classList.toggle("is-minimized", !!state.minimized);
|
||||
|
||||
win.querySelector("[data-adp-ssh-close]")?.addEventListener("click", closeTerminal);
|
||||
win.querySelector("[data-adp-ssh-minimize]")?.addEventListener("click", toggleMinimized);
|
||||
win.querySelector("[data-adp-ssh-drag]")?.addEventListener("pointerdown", startDrag);
|
||||
win.querySelectorAll("[data-adp-ssh-resize]").forEach((handle) => {
|
||||
handle.addEventListener("pointerdown", startResize);
|
||||
});
|
||||
win.querySelector("[data-adp-ssh-drag]")?.addEventListener("dblclick", (event) => {
|
||||
if (event.target.closest("button")) return;
|
||||
toggleMinimized();
|
||||
});
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
if (!win) return;
|
||||
win.classList.add("is-ready");
|
||||
playWindowMotion("open");
|
||||
});
|
||||
return win;
|
||||
}
|
||||
|
||||
async function fetchLaunchUrl() {
|
||||
const res = await fetch("/api/ssh-terminal/session", { credentials: "include" });
|
||||
const data = await res.json().catch(() => ({}));
|
||||
if (!res.ok || !data || !data.launchUrl) {
|
||||
throw new Error((data && data.error) || "Unable to open terminal");
|
||||
}
|
||||
return data.launchUrl;
|
||||
}
|
||||
|
||||
async function openTerminal(options = {}) {
|
||||
if (opening) return opening;
|
||||
opening = (async () => {
|
||||
const node = ensureWindow();
|
||||
const state = readState();
|
||||
const nextGeometry = getGeometryForState(state);
|
||||
applyGeometry(nextGeometry);
|
||||
node.classList.toggle("is-minimized", !!state.minimized);
|
||||
writeWindowState({ open: true, minimized: !!state.minimized });
|
||||
updateLauncherVisibility();
|
||||
|
||||
if (frame && (!frame.getAttribute("src") || frame.getAttribute("src") === "about:blank")) {
|
||||
frame.src = await fetchLaunchUrl();
|
||||
}
|
||||
return node;
|
||||
})();
|
||||
|
||||
try {
|
||||
return await opening;
|
||||
} catch (err) {
|
||||
if (!options.silent) alert(err && err.message ? err.message : "Failed to open SSH terminal.");
|
||||
throw err;
|
||||
} finally {
|
||||
opening = null;
|
||||
}
|
||||
}
|
||||
|
||||
function toggleMinimized() {
|
||||
if (!win) return;
|
||||
if (win.classList.contains("is-liquid-motion")) cancelWindowMotion(win);
|
||||
const node = win;
|
||||
const from = node.getBoundingClientRect();
|
||||
const minimized = !win.classList.contains("is-minimized");
|
||||
const next = clampGeometry(geometry.x, geometry.y, geometry.w, geometry.h, minimized);
|
||||
|
||||
if (minimized) {
|
||||
const to = visualRectForGeometry(next, true);
|
||||
writeState({ open: true, minimized: true, x: next.x, y: next.y, w: next.w, h: next.h, updatedAt: Date.now() });
|
||||
playWindowMotion("minimize", from, to, node).then(() => {
|
||||
if (win !== node) return;
|
||||
withoutWindowTransition(node, () => {
|
||||
node.classList.add("is-minimized");
|
||||
applyGeometry(next);
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
withoutWindowTransition(node, () => {
|
||||
node.classList.remove("is-minimized");
|
||||
applyGeometry(next);
|
||||
});
|
||||
const to = node.getBoundingClientRect();
|
||||
writeWindowState({ open: true, minimized: false });
|
||||
playWindowMotion("restore", from, to, node);
|
||||
}
|
||||
|
||||
function closeTerminal() {
|
||||
if (win && win.classList.contains("is-liquid-motion")) cancelWindowMotion(win);
|
||||
if (frame && frame.contentWindow) {
|
||||
try {
|
||||
frame.contentWindow.postMessage({ type: "adpanel-ssh-terminal-close" }, window.location.origin);
|
||||
} catch { }
|
||||
}
|
||||
|
||||
try {
|
||||
localStorage.setItem("adpanel:ssh-terminal-live:v1", "0");
|
||||
} catch { }
|
||||
writeState({ open: false, minimized: false });
|
||||
|
||||
const old = win;
|
||||
const from = old ? old.getBoundingClientRect() : null;
|
||||
const to = from ? {
|
||||
left: from.left + from.width * 0.04,
|
||||
top: from.top + from.height * 0.08,
|
||||
width: from.width * 0.9,
|
||||
height: from.height * 0.76,
|
||||
} : null;
|
||||
win = null;
|
||||
frame = null;
|
||||
updateLauncherVisibility();
|
||||
if (old) {
|
||||
playWindowMotion("close", from, to, old).then(() => {
|
||||
old.classList.remove("is-ready");
|
||||
const iframe = old.querySelector("iframe");
|
||||
if (iframe) iframe.src = "about:blank";
|
||||
old.remove();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function startDrag(event) {
|
||||
if (!win || event.button !== 0 || event.target.closest("button")) return;
|
||||
if (win.classList.contains("is-liquid-motion")) cancelWindowMotion(win);
|
||||
interaction = {
|
||||
type: "drag",
|
||||
pointerId: event.pointerId,
|
||||
offsetX: event.clientX - geometry.x,
|
||||
offsetY: event.clientY - geometry.y,
|
||||
x: geometry.x,
|
||||
y: geometry.y,
|
||||
w: geometry.w,
|
||||
h: geometry.h,
|
||||
};
|
||||
win.classList.add("is-interacting", "is-dragging");
|
||||
setInteractionCursor("grabbing");
|
||||
try { event.currentTarget.setPointerCapture(event.pointerId); } catch { }
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
function startResize(event) {
|
||||
if (!win || event.button !== 0 || win.classList.contains("is-minimized")) return;
|
||||
if (win.classList.contains("is-liquid-motion")) cancelWindowMotion(win);
|
||||
const handle = event.currentTarget.getAttribute("data-adp-ssh-resize") || "";
|
||||
interaction = {
|
||||
type: "resize",
|
||||
pointerId: event.pointerId,
|
||||
handle,
|
||||
startX: event.clientX,
|
||||
startY: event.clientY,
|
||||
x: geometry.x,
|
||||
y: geometry.y,
|
||||
w: geometry.w,
|
||||
h: geometry.h,
|
||||
next: Object.assign({}, geometry),
|
||||
};
|
||||
win.classList.add("is-interacting", "is-resizing");
|
||||
setInteractionCursor(resizeCursor(handle));
|
||||
try { event.currentTarget.setPointerCapture(event.pointerId); } catch { }
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
function resizeGeometry(start, dx, dy, handle) {
|
||||
const vp = viewport();
|
||||
let left = start.x;
|
||||
let top = start.y;
|
||||
let right = start.x + start.w;
|
||||
let bottom = start.y + start.h;
|
||||
if (handle.includes("e")) right += dx;
|
||||
if (handle.includes("s")) bottom += dy;
|
||||
if (handle.includes("w")) left += dx;
|
||||
if (handle.includes("n")) top += dy;
|
||||
|
||||
if (handle.includes("w")) {
|
||||
left = Math.max(8, Math.min(left, right - Math.min(MIN_WIDTH, vp.w - 16)));
|
||||
} else {
|
||||
right = Math.min(vp.w - 8, Math.max(right, left + Math.min(MIN_WIDTH, vp.w - 16)));
|
||||
}
|
||||
|
||||
if (handle.includes("n")) {
|
||||
top = Math.max(8, Math.min(top, bottom - Math.min(MIN_HEIGHT, vp.h - 16)));
|
||||
} else {
|
||||
bottom = Math.min(vp.h - 8, Math.max(bottom, top + Math.min(MIN_HEIGHT, vp.h - 16)));
|
||||
}
|
||||
|
||||
return clampGeometry(left, top, right - left, bottom - top, false);
|
||||
}
|
||||
|
||||
function moveInteraction(event) {
|
||||
if (!interaction || !win || event.pointerId !== interaction.pointerId) return;
|
||||
const minimized = win.classList.contains("is-minimized");
|
||||
const next = interaction.type === "resize"
|
||||
? resizeGeometry(interaction, event.clientX - interaction.startX, event.clientY - interaction.startY, interaction.handle)
|
||||
: clampGeometry(event.clientX - interaction.offsetX, event.clientY - interaction.offsetY, interaction.w, interaction.h, minimized);
|
||||
interaction.next = next;
|
||||
if (!raf) {
|
||||
raf = requestAnimationFrame(() => {
|
||||
raf = 0;
|
||||
if (interaction && interaction.next) applyGeometry(interaction.next);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function endInteraction(event) {
|
||||
if (!interaction || !win || event.pointerId !== interaction.pointerId) return;
|
||||
const minimized = win.classList.contains("is-minimized");
|
||||
const next = interaction.next || clampGeometry(geometry.x, geometry.y, geometry.w, geometry.h, minimized);
|
||||
applyGeometry(next);
|
||||
writeWindowState({ open: true, minimized });
|
||||
win.classList.remove("is-interacting", "is-dragging", "is-resizing");
|
||||
clearInteractionCursor();
|
||||
interaction = null;
|
||||
}
|
||||
|
||||
function attachLaunchers() {
|
||||
ensureLauncher();
|
||||
document.addEventListener("click", (event) => {
|
||||
const trigger = event.target.closest("[data-open-ssh-terminal], #openSshTerminalBtn");
|
||||
if (!trigger) return;
|
||||
event.preventDefault();
|
||||
if ("disabled" in trigger) trigger.disabled = true;
|
||||
openTerminal().finally(() => {
|
||||
if ("disabled" in trigger) trigger.disabled = false;
|
||||
});
|
||||
});
|
||||
|
||||
const state = readState();
|
||||
if (state.open) {
|
||||
openTerminal({ silent: true }).catch(() => { });
|
||||
}
|
||||
}
|
||||
|
||||
function ensureLauncher() {
|
||||
if (launcher || document.querySelector("[data-open-ssh-terminal], #openSshTerminalBtn")) return;
|
||||
launcher = document.createElement("button");
|
||||
launcher.type = "button";
|
||||
launcher.className = "adp-ssh-terminal-launcher";
|
||||
launcher.setAttribute("data-open-ssh-terminal", "true");
|
||||
launcher.setAttribute("title", "Open SSH Terminal");
|
||||
launcher.setAttribute("aria-label", "Open SSH Terminal");
|
||||
launcher.innerHTML = '<i class="fa-solid fa-terminal" aria-hidden="true"></i>';
|
||||
document.body.appendChild(launcher);
|
||||
updateLauncherVisibility();
|
||||
}
|
||||
|
||||
function updateLauncherVisibility() {
|
||||
if (!launcher) return;
|
||||
const open = !!win || !!readState().open;
|
||||
launcher.classList.toggle("is-hidden", open || hasVisibleModal());
|
||||
}
|
||||
|
||||
function isVisibleModal(node) {
|
||||
if (!node || node === win || node === launcher) return false;
|
||||
if (node.getAttribute("aria-hidden") === "true") return false;
|
||||
if (node.classList.contains("show") || node.getAttribute("aria-hidden") === "false") return true;
|
||||
const styles = window.getComputedStyle(node);
|
||||
if (styles.display === "none" || styles.visibility === "hidden" || styles.opacity === "0") return false;
|
||||
return node.offsetWidth > 0 && node.offsetHeight > 0;
|
||||
}
|
||||
|
||||
function hasVisibleModal() {
|
||||
return Array.from(document.querySelectorAll(MODAL_SELECTOR)).some(isVisibleModal);
|
||||
}
|
||||
|
||||
function scheduleLauncherVisibility() {
|
||||
if (launcherVisibilityRaf) return;
|
||||
launcherVisibilityRaf = requestAnimationFrame(() => {
|
||||
launcherVisibilityRaf = 0;
|
||||
updateLauncherVisibility();
|
||||
});
|
||||
}
|
||||
|
||||
function observeModalVisibility() {
|
||||
if (modalObserver || !document.body) return;
|
||||
modalObserver = new MutationObserver(scheduleLauncherVisibility);
|
||||
modalObserver.observe(document.body, {
|
||||
attributes: true,
|
||||
attributeFilter: ["class", "style", "aria-hidden"],
|
||||
childList: true,
|
||||
subtree: true,
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener("pointermove", moveInteraction, { passive: true });
|
||||
window.addEventListener("pointerup", endInteraction, { passive: true });
|
||||
window.addEventListener("pointercancel", endInteraction, { passive: true });
|
||||
window.addEventListener("resize", () => {
|
||||
if (!win) return;
|
||||
const minimized = win.classList.contains("is-minimized");
|
||||
const next = clampGeometry(geometry.x, geometry.y, geometry.w, geometry.h, minimized);
|
||||
applyGeometry(next);
|
||||
writeWindowState({ open: true, minimized });
|
||||
});
|
||||
|
||||
window.ADPanelSshTerminal = {
|
||||
open: openTerminal,
|
||||
close: closeTerminal,
|
||||
toggleMinimized,
|
||||
};
|
||||
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
attachLaunchers();
|
||||
observeModalVisibility();
|
||||
}, { once: true });
|
||||
} else {
|
||||
attachLaunchers();
|
||||
observeModalVisibility();
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,325 @@
|
||||
/* Admin /status monitoring client.
|
||||
*
|
||||
* - Opens the existing socket.io connection, joins the admin-only "monitor"
|
||||
* room, and renders live bars (CPU/RAM/Storage/Network/RPS) once per second
|
||||
* while the page is open.
|
||||
* - Renders a fixed one-month calendar; clicking a day fetches that day's
|
||||
* per-minute history via REST and draws it into the graph. Default view is
|
||||
* today.
|
||||
* - Everything here is read-only and admin-gated server-side.
|
||||
*/
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var SOCKET = null;
|
||||
var watching = false;
|
||||
|
||||
// ---- helpers -----------------------------------------------------------
|
||||
function $(id) { return document.getElementById(id); }
|
||||
|
||||
function clampPct(n) {
|
||||
n = Number(n);
|
||||
if (!isFinite(n) || n < 0) return 0;
|
||||
if (n > 100) return 100;
|
||||
return n;
|
||||
}
|
||||
|
||||
function fmtBytesPerSec(bps) {
|
||||
bps = Number(bps) || 0;
|
||||
var units = ["B/s", "KB/s", "MB/s", "GB/s"];
|
||||
var i = 0;
|
||||
while (bps >= 1024 && i < units.length - 1) { bps /= 1024; i++; }
|
||||
return (bps < 10 ? bps.toFixed(1) : Math.round(bps)) + " " + units[i];
|
||||
}
|
||||
|
||||
function fmtUptime(ms) {
|
||||
var s = Math.floor((Number(ms) || 0) / 1000);
|
||||
var d = Math.floor(s / 86400); s -= d * 86400;
|
||||
var h = Math.floor(s / 3600); s -= h * 3600;
|
||||
var m = Math.floor(s / 60); s -= m * 60;
|
||||
var parts = [];
|
||||
if (d) parts.push(d + "d");
|
||||
if (h || d) parts.push(h + "h");
|
||||
parts.push(m + "m");
|
||||
parts.push(s + "s");
|
||||
return parts.join(" ");
|
||||
}
|
||||
|
||||
// ---- bar rendering -----------------------------------------------------
|
||||
function setBar(key, percent, valueText) {
|
||||
var fill = document.querySelector('[data-bar-fill="' + key + '"]');
|
||||
var pctEl = document.querySelector('[data-bar-pct="' + key + '"]');
|
||||
var valEl = document.querySelector('[data-bar-value="' + key + '"]');
|
||||
var p = clampPct(percent);
|
||||
|
||||
// Update circular ring progress
|
||||
if (fill) {
|
||||
var circumference = 2 * Math.PI * 15.9155;
|
||||
var offset = circumference - (p / 100) * circumference;
|
||||
fill.style.strokeDasharray = p + ', 100';
|
||||
}
|
||||
|
||||
if (pctEl) pctEl.textContent = p.toFixed(1) + "%";
|
||||
if (valEl && valueText != null) valEl.textContent = valueText;
|
||||
}
|
||||
|
||||
// Network bars are scaled relative to a rolling observed peak so the bar is
|
||||
// meaningful even without a hard cap.
|
||||
var netPeak = { rx: 1024 * 256, tx: 1024 * 256 };
|
||||
function netPercent(dir, bps) {
|
||||
bps = Number(bps) || 0;
|
||||
if (bps > netPeak[dir]) netPeak[dir] = bps;
|
||||
return (bps / netPeak[dir]) * 100;
|
||||
}
|
||||
|
||||
function applySample(s) {
|
||||
if (!s) return;
|
||||
setBar("cpu", s.cpu, (Number(s.cpu) || 0).toFixed(1) + "% of " + (s.cores || 1) + " cores");
|
||||
setBar("mem", s.memPercent, bytesPair(s.memUsed, s.memTotal));
|
||||
setBar("disk", s.diskPercent != null ? s.diskPercent : 0,
|
||||
s.diskUsed != null ? bytesPair(s.diskUsed, s.diskTotal) : "n/a");
|
||||
if (s.netRx != null) setBar("netrx", netPercent("rx", s.netRx), fmtBytesPerSec(s.netRx));
|
||||
if (s.netTx != null) setBar("nettx", netPercent("tx", s.netTx), fmtBytesPerSec(s.netTx));
|
||||
|
||||
var rpsEl = $("metricRps");
|
||||
if (rpsEl) rpsEl.textContent = (Number(s.rps) || 0).toFixed(1);
|
||||
var upEl = $("metricUptime");
|
||||
if (upEl && s.uptimeMs != null) upEl.textContent = fmtUptime(s.uptimeMs);
|
||||
|
||||
if (s.services) applyServices(s.services);
|
||||
pushLive(s);
|
||||
}
|
||||
|
||||
function bytesPair(used, total) {
|
||||
return fmtBytes(used) + " / " + fmtBytes(total);
|
||||
}
|
||||
function fmtBytes(b) {
|
||||
b = Number(b) || 0;
|
||||
var units = ["B", "KB", "MB", "GB", "TB"];
|
||||
var i = 0;
|
||||
while (b >= 1024 && i < units.length - 1) { b /= 1024; i++; }
|
||||
return (b < 10 ? b.toFixed(1) : Math.round(b)) + " " + units[i];
|
||||
}
|
||||
|
||||
// ---- services ----------------------------------------------------------
|
||||
function dot(ok) { return ok ? "ok" : "bad"; }
|
||||
function applyServices(sv) {
|
||||
var db = $("svcDatabase");
|
||||
if (db) {
|
||||
db.dataset.state = dot(sv.database && sv.database.ok);
|
||||
var lat = sv.database && sv.database.latencyMs != null ? sv.database.latencyMs + "ms" : "offline";
|
||||
var dbv = $("svcDatabaseVal"); if (dbv) dbv.textContent = lat;
|
||||
}
|
||||
setSvcText("svcNodes", sv.nodes ? (sv.nodes.online + "/" + sv.nodes.total + " online") : "n/a",
|
||||
sv.nodes && sv.nodes.total > 0 && sv.nodes.online === sv.nodes.total);
|
||||
setSvcText("svcContainers", sv.containers ? (sv.containers.running + " running, " + sv.containers.stopped + " stopped") : "n/a", true);
|
||||
setSvcText("svcSsh", (sv.sshSessions || 0) + " active", true);
|
||||
setSvcText("svcSockets", (sv.activeSockets || 0) + " connected", true);
|
||||
var ver = $("svcVersion");
|
||||
if (ver && sv.panelVersion) ver.textContent = sv.panelVersion;
|
||||
}
|
||||
function setSvcText(id, text, ok) {
|
||||
var el = $(id);
|
||||
if (!el) return;
|
||||
el.textContent = text;
|
||||
var row = el.closest("[data-svc-row]");
|
||||
if (row) row.dataset.state = ok ? "ok" : "warn";
|
||||
}
|
||||
|
||||
// ---- live sparkline buffer (current day, client-side) ------------------
|
||||
var liveBuffer = [];
|
||||
function pushLive(s) {
|
||||
liveBuffer.push({ ts: s.ts, cpu: s.cpu, mem: s.memPercent });
|
||||
if (liveBuffer.length > 600) liveBuffer.shift();
|
||||
}
|
||||
|
||||
// ---- history graph -----------------------------------------------------
|
||||
var graphMode = "today"; // or a YYYY-MM-DD string
|
||||
function drawGraph(points, label) {
|
||||
var canvas = $("metricsGraph");
|
||||
if (!canvas) return;
|
||||
var ctx = canvas.getContext("2d");
|
||||
var w = canvas.width = canvas.clientWidth * (window.devicePixelRatio || 1);
|
||||
var h = canvas.height = canvas.clientHeight * (window.devicePixelRatio || 1);
|
||||
ctx.clearRect(0, 0, w, h);
|
||||
var lbl = $("graphLabel");
|
||||
if (lbl) lbl.textContent = label || "";
|
||||
|
||||
if (!points || !points.length) {
|
||||
ctx.fillStyle = "rgba(255,255,255,0.35)";
|
||||
ctx.font = (14 * (window.devicePixelRatio || 1)) + "px system-ui";
|
||||
ctx.textAlign = "center";
|
||||
ctx.fillText("No data recorded for this day yet", w / 2, h / 2);
|
||||
return;
|
||||
}
|
||||
|
||||
var pad = 8 * (window.devicePixelRatio || 1);
|
||||
function line(series, color) {
|
||||
ctx.beginPath();
|
||||
for (var i = 0; i < points.length; i++) {
|
||||
var x = pad + (i / (points.length - 1 || 1)) * (w - pad * 2);
|
||||
var v = clampPct(points[i][series]);
|
||||
var y = h - pad - (v / 100) * (h - pad * 2);
|
||||
if (i === 0) ctx.moveTo(x, y); else ctx.lineTo(x, y);
|
||||
}
|
||||
ctx.strokeStyle = color;
|
||||
ctx.lineWidth = 2 * (window.devicePixelRatio || 1);
|
||||
ctx.lineJoin = "round";
|
||||
ctx.stroke();
|
||||
}
|
||||
// gridlines
|
||||
ctx.strokeStyle = "rgba(255,255,255,0.06)";
|
||||
ctx.lineWidth = 1;
|
||||
for (var g = 0; g <= 4; g++) {
|
||||
var gy = pad + (g / 4) * (h - pad * 2);
|
||||
ctx.beginPath(); ctx.moveTo(pad, gy); ctx.lineTo(w - pad, gy); ctx.stroke();
|
||||
}
|
||||
line("cpu", "#0EA5E9");
|
||||
line("mem", "#8B5CF6");
|
||||
}
|
||||
|
||||
function loadDay(dayStr) {
|
||||
fetch("/api/status/metrics/day?day=" + encodeURIComponent(dayStr), { credentials: "include" })
|
||||
.then(function (r) { return r.ok ? r.json() : null; })
|
||||
.then(function (data) {
|
||||
if (!data || !data.ok) { drawGraph([], dayStr); return; }
|
||||
drawGraph(data.points, formatDayLabel(dayStr));
|
||||
})
|
||||
.catch(function () { drawGraph([], dayStr); });
|
||||
}
|
||||
|
||||
function formatDayLabel(dayStr) {
|
||||
try {
|
||||
var d = new Date(dayStr + "T00:00:00Z");
|
||||
return d.toLocaleDateString(undefined, { day: "numeric", month: "long", year: "numeric", timeZone: "UTC" });
|
||||
} catch (_) { return dayStr; }
|
||||
}
|
||||
|
||||
// ---- calendar (fixed one month) ----------------------------------------
|
||||
function buildCalendar(summaryDays) {
|
||||
var grid = $("calendarGrid");
|
||||
if (!grid) return;
|
||||
grid.innerHTML = "";
|
||||
|
||||
var now = new Date();
|
||||
var year = now.getUTCFullYear();
|
||||
var month = now.getUTCMonth();
|
||||
var first = new Date(Date.UTC(year, month, 1));
|
||||
var daysInMonth = new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
|
||||
var startWeekday = first.getUTCDay(); // 0=Sun
|
||||
|
||||
var monthLabel = $("calendarMonth");
|
||||
if (monthLabel) {
|
||||
monthLabel.textContent = first.toLocaleDateString(undefined, { month: "long", year: "numeric", timeZone: "UTC" });
|
||||
}
|
||||
|
||||
var summaryByDay = {};
|
||||
(summaryDays || []).forEach(function (d) {
|
||||
var key = new Date(d.ts).toISOString().slice(0, 10);
|
||||
summaryByDay[key] = d;
|
||||
});
|
||||
|
||||
var weekdays = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
||||
weekdays.forEach(function (wd) {
|
||||
var head = document.createElement("div");
|
||||
head.className = "cal-weekday";
|
||||
head.textContent = wd;
|
||||
grid.appendChild(head);
|
||||
});
|
||||
|
||||
for (var i = 0; i < startWeekday; i++) {
|
||||
var blank = document.createElement("div");
|
||||
blank.className = "cal-cell cal-cell--blank";
|
||||
grid.appendChild(blank);
|
||||
}
|
||||
|
||||
var todayKey = now.toISOString().slice(0, 10);
|
||||
for (var day = 1; day <= daysInMonth; day++) {
|
||||
(function (day) {
|
||||
var dateStr = year + "-" + String(month + 1).padStart(2, "0") + "-" + String(day).padStart(2, "0");
|
||||
var cell = document.createElement("button");
|
||||
cell.type = "button";
|
||||
cell.className = "cal-cell";
|
||||
cell.dataset.day = dateStr;
|
||||
if (dateStr === todayKey) cell.classList.add("cal-cell--today");
|
||||
|
||||
var num = document.createElement("span");
|
||||
num.className = "cal-cell__num";
|
||||
num.textContent = day;
|
||||
cell.appendChild(num);
|
||||
|
||||
cell.addEventListener("click", function () {
|
||||
document.querySelectorAll(".cal-cell--active").forEach(function (c) { c.classList.remove("cal-cell--active"); });
|
||||
cell.classList.add("cal-cell--active");
|
||||
graphMode = dateStr;
|
||||
loadDay(dateStr);
|
||||
});
|
||||
|
||||
grid.appendChild(cell);
|
||||
})(day);
|
||||
}
|
||||
}
|
||||
|
||||
function loadSummaryAndCalendar() {
|
||||
fetch("/api/status/metrics/summary", { credentials: "include" })
|
||||
.then(function (r) { return r.ok ? r.json() : null; })
|
||||
.then(function (data) {
|
||||
buildCalendar(data && data.ok ? data.days : []);
|
||||
// default: today's graph + mark today active
|
||||
var todayKey = new Date().toISOString().slice(0, 10);
|
||||
var todayCell = document.querySelector('.cal-cell[data-day="' + todayKey + '"]');
|
||||
if (todayCell) todayCell.classList.add("cal-cell--active");
|
||||
loadDay(todayKey);
|
||||
})
|
||||
.catch(function () { buildCalendar([]); });
|
||||
}
|
||||
|
||||
// ---- socket wiring -----------------------------------------------------
|
||||
function connectSocket() {
|
||||
if (typeof io !== "function") return;
|
||||
SOCKET = window._monitorSocket || io({ withCredentials: true });
|
||||
window._monitorSocket = SOCKET;
|
||||
|
||||
SOCKET.on("connect", subscribe);
|
||||
SOCKET.on("monitor:snapshot", function (snap) { applySample(snap); });
|
||||
SOCKET.on("monitor:sample", function (s) { applySample(s); });
|
||||
SOCKET.on("monitor:error", function (e) {
|
||||
console.warn("[monitor]", e && e.error);
|
||||
});
|
||||
|
||||
if (SOCKET.connected) subscribe();
|
||||
}
|
||||
|
||||
function subscribe() {
|
||||
if (watching) return;
|
||||
watching = true;
|
||||
SOCKET.emit("monitor:subscribe");
|
||||
}
|
||||
function unsubscribe() {
|
||||
if (!watching || !SOCKET) return;
|
||||
watching = false;
|
||||
SOCKET.emit("monitor:unsubscribe");
|
||||
}
|
||||
|
||||
// Pause intensive sampling when the tab is hidden (keeps cost near zero).
|
||||
document.addEventListener("visibilitychange", function () {
|
||||
if (document.hidden) unsubscribe();
|
||||
else if (SOCKET) { watching = false; subscribe(); }
|
||||
});
|
||||
window.addEventListener("beforeunload", unsubscribe);
|
||||
|
||||
function init() {
|
||||
connectSocket();
|
||||
loadSummaryAndCalendar();
|
||||
window.addEventListener("resize", function () {
|
||||
if (graphMode === "today") loadDay(new Date().toISOString().slice(0, 10));
|
||||
else loadDay(graphMode);
|
||||
});
|
||||
}
|
||||
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", init);
|
||||
} else {
|
||||
init();
|
||||
}
|
||||
})();
|
||||
+147
-67
@@ -17,6 +17,20 @@
|
||||
--menu-top: 100rem;
|
||||
--menu-left: -5rem;
|
||||
--watermark-offset-x: 3.5rem;
|
||||
--login-card-width: min(450px, calc(100vw - 48px));
|
||||
--login-form-width: min(380px, calc(100vw - 48px));
|
||||
--login-card-height: 470px;
|
||||
--login-card-height-2fa: 540px;
|
||||
--login-form-top: calc(50% + 20px);
|
||||
--login-form-top-2fa: calc(50% - 4px);
|
||||
--login-icon-top: calc(50% - 190px);
|
||||
--login-icon-top-2fa: calc(50% - 218px);
|
||||
--login-title-top: calc(50% - 104px);
|
||||
--login-title-top-2fa: calc(50% - 130px);
|
||||
--login-desc-top: calc(50% - 66px);
|
||||
--login-desc-top-2fa: calc(50% - 92px);
|
||||
--login-subline-top: calc(50% - 46px);
|
||||
--login-subline-top-2fa: calc(50% - 72px);
|
||||
}
|
||||
|
||||
html,
|
||||
@@ -45,21 +59,23 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
form {
|
||||
.login-form {
|
||||
position: absolute;
|
||||
top: var(--login-form-top);
|
||||
left: 50%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
user-select: none;
|
||||
gap: 10px;
|
||||
width: 300px;
|
||||
margin-top: 300px;
|
||||
gap: 12px;
|
||||
width: var(--login-form-width);
|
||||
margin: 0;
|
||||
transform: translateX(-50%);
|
||||
z-index: 100;
|
||||
transition: top 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
form {
|
||||
margin-top: 270px;
|
||||
}
|
||||
body.login-has-2fa .login-form {
|
||||
top: var(--login-form-top-2fa);
|
||||
}
|
||||
|
||||
.input-icon {
|
||||
@@ -78,8 +94,30 @@ form {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 380px;
|
||||
margin-left: -40px;
|
||||
width: 100%;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.login-two-factor-field {
|
||||
max-height: 48px;
|
||||
opacity: 1;
|
||||
overflow: hidden;
|
||||
transform: translateY(0);
|
||||
transition:
|
||||
max-height 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
|
||||
opacity 220ms ease,
|
||||
transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
|
||||
margin 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
will-change: max-height, opacity, transform;
|
||||
}
|
||||
|
||||
.login-two-factor-field[aria-hidden="true"] {
|
||||
max-height: 0;
|
||||
opacity: 0;
|
||||
margin-top: -6px;
|
||||
margin-bottom: -6px;
|
||||
pointer-events: none;
|
||||
transform: translateY(-8px);
|
||||
}
|
||||
|
||||
.input-holder:hover .input-icon {
|
||||
@@ -144,21 +182,15 @@ button {
|
||||
.get-started {
|
||||
position: relative;
|
||||
border-radius: 12px;
|
||||
/* Smoother curve */
|
||||
height: 48px;
|
||||
/* Slightly taller for touch target size */
|
||||
width: 380px;
|
||||
width: 100%;
|
||||
user-select: none;
|
||||
margin-top: 50px;
|
||||
margin-left: -40px;
|
||||
margin-top: 4px;
|
||||
margin-left: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
/* Apple font */
|
||||
font-size: 16px;
|
||||
/* slightly larger */
|
||||
letter-spacing: -0.01em;
|
||||
/* Tighter tracking */
|
||||
letter-spacing: 0;
|
||||
font-weight: 600;
|
||||
/* Bolder */
|
||||
color: #ffffff;
|
||||
background: linear-gradient(to bottom, #363636, #1a1a1a, #000000);
|
||||
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
|
||||
@@ -168,7 +200,7 @@ button {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0;
|
||||
transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), background 0.6s ease, box-shadow 0.6s ease;
|
||||
transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), background 0.6s ease, box-shadow 0.6s ease, margin-top 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
}
|
||||
|
||||
.get-started__logo {
|
||||
@@ -182,7 +214,7 @@ button {
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.get-started {
|
||||
margin-top: 30px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,16 +238,25 @@ button {
|
||||
|
||||
.menu {
|
||||
position: absolute;
|
||||
width: 390px;
|
||||
height: 480px;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
box-sizing: border-box;
|
||||
width: var(--login-card-width);
|
||||
height: var(--login-card-height);
|
||||
border-radius: 30px;
|
||||
padding: 30px;
|
||||
margin-top: 60px;
|
||||
margin: 0;
|
||||
isolation: isolate;
|
||||
box-shadow: 0px 6px var(--outer-shadow-blur) rgba(0, 0, 0, 0.2);
|
||||
background-color: rgba(var(--tint-color), var(--tint-opacity));
|
||||
border: 1px solid rgba(255, 255, 255, 0.25);
|
||||
pointer-events: none;
|
||||
transform: translate(-50%, -50%);
|
||||
transition: height 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
}
|
||||
|
||||
body.login-has-2fa .menu {
|
||||
height: var(--login-card-height-2fa);
|
||||
}
|
||||
|
||||
.menu::before {
|
||||
@@ -242,24 +283,17 @@ button {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.menu {
|
||||
font-size: 24px;
|
||||
padding: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.forgot-password {
|
||||
position: absolute;
|
||||
position: relative;
|
||||
align-self: flex-end;
|
||||
cursor: pointer;
|
||||
color: #f5f5f7;
|
||||
/* Matching pure white sub-tone */
|
||||
user-select: none;
|
||||
margin-top: 150px;
|
||||
margin-left: 230px;
|
||||
margin: -2px 0 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
opacity: 0.65;
|
||||
@@ -285,62 +319,68 @@ button {
|
||||
}
|
||||
|
||||
.sign-up {
|
||||
position: relative;
|
||||
position: absolute;
|
||||
top: var(--login-title-top);
|
||||
left: 50%;
|
||||
color: #f5f5f7 !important;
|
||||
user-select: none;
|
||||
top: 140px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.015em;
|
||||
letter-spacing: 0;
|
||||
z-index: 1;
|
||||
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
|
||||
transform: translateX(-50%);
|
||||
white-space: nowrap;
|
||||
transition: top 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sign-up {
|
||||
top: 100px;
|
||||
}
|
||||
body.login-has-2fa .sign-up {
|
||||
top: var(--login-title-top-2fa);
|
||||
}
|
||||
|
||||
.sign-up-desc {
|
||||
position: relative;
|
||||
position: absolute;
|
||||
top: var(--login-desc-top);
|
||||
left: 50%;
|
||||
color: #a1a1a6;
|
||||
user-select: none;
|
||||
top: 207px;
|
||||
text-align: center;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.012em;
|
||||
letter-spacing: 0;
|
||||
opacity: 1;
|
||||
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
transform: translateX(-50%);
|
||||
white-space: nowrap;
|
||||
transition: top 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sign-up-desc {
|
||||
top: 170px;
|
||||
}
|
||||
body.login-has-2fa .sign-up-desc {
|
||||
top: var(--login-desc-top-2fa);
|
||||
}
|
||||
|
||||
.sign-up-sublines {
|
||||
position: relative;
|
||||
position: absolute;
|
||||
top: var(--login-subline-top);
|
||||
left: 50%;
|
||||
color: #86868b;
|
||||
user-select: none;
|
||||
top: 245px;
|
||||
text-align: center;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.012em;
|
||||
letter-spacing: 0;
|
||||
opacity: 1;
|
||||
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
transform: translateX(-50%);
|
||||
white-space: nowrap;
|
||||
transition: top 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
}
|
||||
|
||||
@media (max-width: 758px) {
|
||||
.sign-up-sublines {
|
||||
top: 210px;
|
||||
}
|
||||
body.login-has-2fa .sign-up-sublines {
|
||||
top: var(--login-subline-top-2fa);
|
||||
}
|
||||
|
||||
|
||||
@@ -371,27 +411,66 @@ button {
|
||||
|
||||
.circle-icon {
|
||||
position: absolute;
|
||||
top: calc(var(--login-icon-top) - var(--login-form-top));
|
||||
left: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: white;
|
||||
padding: 20px;
|
||||
padding: 0;
|
||||
border-radius: 15px;
|
||||
height: 12px;
|
||||
width: 9px;
|
||||
height: 54px;
|
||||
width: 54px;
|
||||
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
|
||||
margin-top: -210px;
|
||||
margin-left: 120px;
|
||||
margin: 0;
|
||||
border: 1px solid #c4c4c4;
|
||||
box-sizing: border-box;
|
||||
z-index: 101;
|
||||
transform: translateX(-50%);
|
||||
transition: top 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
}
|
||||
|
||||
body.login-has-2fa .circle-icon {
|
||||
top: calc(var(--login-icon-top-2fa) - var(--login-form-top-2fa));
|
||||
}
|
||||
|
||||
.circle-icon__glyph {
|
||||
color: #000;
|
||||
font-size: 25px;
|
||||
margin-top: -50px;
|
||||
margin-left: -10px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.circle-icon {
|
||||
margin-top: -220px;
|
||||
:root {
|
||||
--login-card-width: min(420px, calc(100vw - 32px));
|
||||
--login-form-width: min(360px, calc(100vw - 56px));
|
||||
--login-card-height: 450px;
|
||||
--login-card-height-2fa: 516px;
|
||||
--login-form-top: calc(50% + 18px);
|
||||
--login-form-top-2fa: calc(50% - 4px);
|
||||
--login-icon-top: calc(50% - 182px);
|
||||
--login-icon-top-2fa: calc(50% - 208px);
|
||||
--login-title-top: calc(50% - 98px);
|
||||
--login-title-top-2fa: calc(50% - 124px);
|
||||
--login-desc-top: calc(50% - 60px);
|
||||
--login-desc-top-2fa: calc(50% - 88px);
|
||||
--login-subline-top: calc(50% - 40px);
|
||||
--login-subline-top-2fa: calc(50% - 69px);
|
||||
}
|
||||
|
||||
.login-form {
|
||||
width: var(--login-form-width);
|
||||
}
|
||||
|
||||
.menu {
|
||||
font-size: 24px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.sign-up-desc,
|
||||
.sign-up-sublines {
|
||||
width: calc(100vw - 56px);
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -567,7 +646,8 @@ button {
|
||||
}
|
||||
|
||||
.captcha-modal__widget #recaptchaWidget[hidden],
|
||||
.captcha-modal__widget #cf-turnstile[hidden] {
|
||||
.captcha-modal__widget #cf-turnstile[hidden],
|
||||
.captcha-modal__widget #hcaptchaWidget[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
+942
-50
File diff suppressed because it is too large.
Load diff
+2
-1
@@ -69,7 +69,8 @@ body {
|
||||
.top-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center
|
||||
align-items: center;
|
||||
margin-left: auto
|
||||
}
|
||||
|
||||
.icon-btn {
|
||||
|
||||
Reference in new issue
Block a user