1898 lines
90 KiB
HTML
1898 lines
90 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<link rel="stylesheet" href="dashboard.css?v=1780758357407">
|
|
<title>ADPanel</title>
|
|
<link id="favicon" rel="icon" type="image/webp"
|
|
href="/favicon.ico" />
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"
|
|
integrity="sha384-nRgPTkuX86pH8yjPJUAFuASXQSSl2/bBUiNV47vSYpKFxHJhbcrGnmlYpYJMeD7a"
|
|
crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
|
|
<link rel="stylesheet" href="/css/dashboard.css?v=20261121-local-images">
|
|
<link rel="stylesheet" href="/css/dashboard-assistant.css?v=20260423-assistant-access-gate">
|
|
<link rel="stylesheet" href="/css/ssh-terminal-window.css?v=20260509-floating-terminal-5">
|
|
<style nonce="x">
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
img,
|
|
video,
|
|
canvas {
|
|
-webkit-user-drag: none;
|
|
-khtml-user-drag: none;
|
|
-moz-user-drag: none;
|
|
-o-user-drag: none;
|
|
user-drag: none;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
/* Allow text selection strictly inside credential popups */
|
|
.twofa-modal,
|
|
.twofa-modal *,
|
|
.password-modal,
|
|
.password-modal *,
|
|
.email-modal,
|
|
.email-modal *,
|
|
.recovery-modal,
|
|
.recovery-modal * {
|
|
-webkit-user-select: text !important;
|
|
-moz-user-select: text !important;
|
|
-ms-user-select: text !important;
|
|
user-select: text !important;
|
|
}
|
|
|
|
.twofa-secret-display,
|
|
.twofa-secret-display *,
|
|
.twofa-secret-code,
|
|
#newSecretDisplay {
|
|
-webkit-user-select: text !important;
|
|
-moz-user-select: text !important;
|
|
-ms-user-select: text !important;
|
|
user-select: text !important;
|
|
cursor: text !important;
|
|
}
|
|
|
|
.twofa-modal button,
|
|
.twofa-modal button *,
|
|
.password-modal button,
|
|
.password-modal button *,
|
|
.email-modal button,
|
|
.email-modal button *,
|
|
.recovery-modal button,
|
|
.recovery-modal button *,
|
|
.twofa-modal svg,
|
|
.password-modal svg,
|
|
.email-modal svg,
|
|
.recovery-modal svg {
|
|
-webkit-user-select: none !important;
|
|
-moz-user-select: none !important;
|
|
user-select: none !important;
|
|
}
|
|
</style>
|
|
<style nonce="x">
|
|
.top-bar.nav-shell {
|
|
--nav-option: clamp(40px, 5.8vh, 52px);
|
|
--nav-gap: clamp(6px, 0.7vw, 12px);
|
|
--nav-radius: 999px;
|
|
--nav-ease: cubic-bezier(0.65, 0, 0.35, 1);
|
|
--nav-idle: rgba(255, 255, 255, 0.06);
|
|
--nav-active: radial-gradient(50% 50% at 50% 50%, #009BDE 0%, #006D9C 100%);
|
|
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: clamp(12px, 2vw, 32px);
|
|
width: auto;
|
|
max-width: calc(100% - 40px);
|
|
min-height: 0;
|
|
padding: clamp(14px, 5vh, 20px) clamp(14px, 1.8vw, 26px);
|
|
background: rgba(255, 255, 255, 0.06);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: var(--nav-radius);
|
|
-webkit-backdrop-filter: blur(14px) saturate(160%);
|
|
backdrop-filter: blur(14px) saturate(160%);
|
|
box-shadow: var(--shadow-md);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.nav-brand {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
gap: clamp(6px, 0.5vw, 8px);
|
|
flex: 0 0 auto;
|
|
min-width: 0;
|
|
cursor: pointer;
|
|
border-radius: 12px;
|
|
padding: 4px 8px;
|
|
margin: -4px -8px;
|
|
transition: background 0.18s ease, transform 0.18s ease;
|
|
}
|
|
.nav-brand:hover,
|
|
.nav-brand:focus-visible {
|
|
background: rgba(255, 255, 255, 0.06);
|
|
transform: translateY(-1px);
|
|
outline: none;
|
|
}
|
|
.nav-brand:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.nav-brand__logo {
|
|
width: clamp(42px, 6vh, 58px);
|
|
height: clamp(42px, 6vh, 58px);
|
|
object-fit: contain;
|
|
filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
|
|
}
|
|
|
|
.nav-brand__wordmark {
|
|
font-family: 'Gilroy', 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
font-weight: 500;
|
|
font-size: clamp(1.5rem, 3.4vh, 2.1rem);
|
|
line-height: 1;
|
|
letter-spacing: 0.01em;
|
|
color: #FFFFFF;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.nav-alert {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex: 0 1 auto;
|
|
min-width: 0;
|
|
padding: 6px 14px;
|
|
border-radius: 999px;
|
|
background: rgba(255, 100, 100, 0.1);
|
|
color: #ffcccc;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.nav-alert span {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.top-bar.nav-shell .toolbar {
|
|
flex: 0 1 auto;
|
|
min-width: 0;
|
|
gap: 0;
|
|
}
|
|
|
|
.nav-options {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: var(--nav-gap);
|
|
min-width: 0;
|
|
}
|
|
|
|
.nav-options .nav-option-wrap {
|
|
display: flex;
|
|
align-items: center;
|
|
flex: none;
|
|
}
|
|
|
|
.nav-option {
|
|
order: 5;
|
|
position: relative;
|
|
flex: none;
|
|
height: var(--nav-option);
|
|
min-height: var(--nav-option);
|
|
display: inline-flex;
|
|
flex-direction: row-reverse;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0;
|
|
border: none !important;
|
|
outline: none !important;
|
|
border-radius: var(--nav-radius);
|
|
background: var(--nav-idle);
|
|
color: #FFFFFF;
|
|
cursor: pointer;
|
|
overflow: hidden;
|
|
isolation: isolate;
|
|
transition:
|
|
background 0.4s var(--nav-ease),
|
|
box-shadow 0.4s var(--nav-ease),
|
|
transform 0.4s var(--nav-ease);
|
|
}
|
|
|
|
.nav-option::before {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 0;
|
|
border-radius: inherit;
|
|
background: var(--nav-active);
|
|
opacity: 0;
|
|
z-index: -1;
|
|
transition: opacity 0.4s var(--nav-ease);
|
|
}
|
|
|
|
.nav-option__icon {
|
|
flex: none;
|
|
width: var(--nav-option);
|
|
height: var(--nav-option);
|
|
display: grid;
|
|
place-items: center;
|
|
}
|
|
|
|
.nav-option__icon i {
|
|
font-size: clamp(0.85rem, 1.7vh, 1.1rem);
|
|
line-height: 1;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.nav-option__label {
|
|
display: grid;
|
|
grid-template-columns: 0fr;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
font-family: 'Gilroy', 'Manrope', system-ui, sans-serif;
|
|
font-weight: 500;
|
|
font-size: clamp(0.8rem, 1.6vh, 0.95rem);
|
|
line-height: 1;
|
|
color: #FFFFFF;
|
|
white-space: nowrap;
|
|
padding-left: 0;
|
|
transition:
|
|
grid-template-columns 0.4s var(--nav-ease),
|
|
padding 0.4s var(--nav-ease);
|
|
}
|
|
|
|
.nav-option__label > * {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.nav-option:not(:disabled):hover,
|
|
.nav-option:not(:disabled):focus-visible {
|
|
background: transparent;
|
|
transform: none;
|
|
}
|
|
|
|
.nav-option:not(:disabled):hover::before,
|
|
.nav-option:not(:disabled):focus-visible::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
.nav-option:not(:disabled):hover .nav-option__label,
|
|
.nav-option:not(:disabled):focus-visible .nav-option__label {
|
|
grid-template-columns: 1fr;
|
|
padding-left: clamp(14px, 1.2vw, 18px);
|
|
}
|
|
|
|
.nav-option:not(:disabled):active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.nav-option:disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.nav-option--status { order: 0; }
|
|
.nav-option--account { order: 1; }
|
|
#openSshTerminalBtn.nav-option { order: 2; }
|
|
.nav-options .nav-option-wrap { order: 3; }
|
|
.nav-option[data-href="/settings"],
|
|
.nav-option[title="You are not admin"] { order: 4; }
|
|
.nav-option--logout { order: 6; }
|
|
|
|
.top-bar.nav-shell .account-avatar-btn .nav-option__icon {
|
|
overflow: hidden;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.top-bar.nav-shell .account-avatar-btn .account-btn-avatar {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.nav-option--logout {
|
|
background: rgba(255, 0, 0, 0.2);
|
|
}
|
|
|
|
.nav-option--logout::before {
|
|
background: radial-gradient(50% 50% at 50% 50%, #ff4d4d 0%, #b30000 100%);
|
|
}
|
|
|
|
.nav-option--logout:not(:disabled):hover,
|
|
.nav-option--logout:not(:disabled):focus-visible {
|
|
/* no additional styles needed */
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 720px) {
|
|
.nav-brand__wordmark {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 520px) {
|
|
.nav-option__label {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|
|
<script nonce="x">
|
|
window.__dashboardSplashImage = '/images/hello.webp';
|
|
try {
|
|
const splashKey = `dashboard-splash-cache:${window.location.origin}:${window.__dashboardSplashImage}`;
|
|
window.__dashboardSplashKey = splashKey;
|
|
if (localStorage.getItem(splashKey) === '1') {
|
|
document.documentElement.classList.add('skip-dashboard-splash');
|
|
}
|
|
} catch (_) { }
|
|
|
|
function isSelectable(target) {
|
|
if (!target) return false;
|
|
var el = (target.nodeType === 3 || target.nodeType === 4) ? target.parentElement : target;
|
|
if (!el) return false;
|
|
if (el.tagName === 'INPUT' || el.tagName === 'TEXTAREA') return true;
|
|
if (el.isContentEditable) return true;
|
|
if (el.closest) {
|
|
if (
|
|
el.closest('.twofa-modal, .password-modal, .email-modal, .recovery-modal, .enterprise-modal') ||
|
|
el.closest('.twofa-modal-overlay, .password-modal-overlay, .email-modal-overlay, .recovery-modal-overlay') ||
|
|
el.closest('#twofaModal, #passwordModal, #emailModal, #recoveryModal, #regenRecoveryModal, #statusModal') ||
|
|
el.closest('.twofa-secret-display, .twofa-secret-code, #newSecretDisplay') ||
|
|
el.closest('.dashboard-assistant-menu')
|
|
) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function isSelectionAllowed(e) {
|
|
if (!e) return false;
|
|
if (isSelectable(e.target)) return true;
|
|
try {
|
|
var sel = window.getSelection ? window.getSelection() : null;
|
|
if (sel && sel.toString().length > 0) {
|
|
if (sel.anchorNode && isSelectable(sel.anchorNode)) return true;
|
|
if (sel.focusNode && isSelectable(sel.focusNode)) return true;
|
|
}
|
|
} catch (_) { }
|
|
var openModal = document.querySelector('.twofa-modal-overlay.show, .password-modal-overlay.show, .email-modal-overlay.show, .recovery-modal-overlay.show, .enterprise-modal-overlay.show');
|
|
if (openModal) {
|
|
var t = e.target && (e.target.nodeType === 3 ? e.target.parentElement : e.target);
|
|
if (t && openModal.contains(t)) return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
document.addEventListener('contextmenu', e => {
|
|
if (isSelectionAllowed(e)) return;
|
|
e.preventDefault();
|
|
});
|
|
document.addEventListener('dragstart', e => {
|
|
if (isSelectionAllowed(e)) return;
|
|
e.preventDefault();
|
|
});
|
|
document.addEventListener('selectstart', e => {
|
|
if (isSelectionAllowed(e)) return;
|
|
e.preventDefault();
|
|
});
|
|
document.addEventListener('copy', e => {
|
|
if (isSelectionAllowed(e)) return;
|
|
e.preventDefault();
|
|
});
|
|
document.addEventListener('cut', e => {
|
|
if (isSelectionAllowed(e)) return;
|
|
e.preventDefault();
|
|
});
|
|
document.addEventListener('keydown', e => {
|
|
if (isSelectionAllowed(e)) return;
|
|
if (e.target && e.target.tagName === 'INPUT') return;
|
|
if (e.target && e.target.tagName === 'TEXTAREA') return;
|
|
if (e.target && e.target.closest && e.target.closest('.dashboard-assistant-menu')) return;
|
|
if ((e.ctrlKey || e.metaKey) && (e.key === 'c' || e.key === 'C' || e.key === 'a' || e.key === 'A' || e.key === 's' || e.key === 'S' || e.key === 'u' || e.key === 'U')) {
|
|
e.preventDefault();
|
|
}
|
|
});
|
|
</script>
|
|
</head>
|
|
|
|
<body data-server-start-time="1780758357401">
|
|
<div id="splash-screen" data-splash-image="/images/hello.webp"></div>
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="mysvg">
|
|
<defs>
|
|
<filter id="glass-distortion" x="0%" y="0%" width="100%" height="100%">
|
|
<feTurbulence type="fractalNoise" baseFrequency="0.008 0.008" numOctaves="2" seed="92" result="noise" />
|
|
<feGaussianBlur in="noise" stdDeviation="2" result="blurred" />
|
|
<feDisplacementMap in="SourceGraphic" in2="blurred" scale="77" xChannelSelector="R" yChannelSelector="G" />
|
|
</filter>
|
|
</defs>
|
|
</svg>
|
|
|
|
<header class="top-bar nav-shell" id="topBar">
|
|
<div class="nav-brand" data-href="/" role="link" tabindex="0" aria-label="Go to dashboard">
|
|
<img src="/images/adpanel-dark.svg" alt="ADPanel logo"
|
|
class="nav-brand__logo" />
|
|
<span class="nav-brand__wordmark">Panel</span>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="toolbar">
|
|
<div class="toolbar-actions nav-options">
|
|
|
|
<button class="nav-option nav-option--status" title="Status" data-href="/status">
|
|
<span class="nav-option__icon"><i class="fa-solid fa-gauge-high"></i></span>
|
|
<span class="nav-option__label"><span>Status</span></span>
|
|
</button>
|
|
|
|
|
|
<button id="accountBtn" class="nav-option nav-option--account account-avatar-btn"
|
|
title="Manage account">
|
|
<span class="nav-option__icon">
|
|
<img src="/x.png" alt="Avatar" class="account-btn-avatar" draggable="false">
|
|
</span>
|
|
<span class="nav-option__label"><span>Account</span></span>
|
|
</button>
|
|
|
|
<button id="openSshTerminalBtn" class="nav-option ssh-terminal-btn"
|
|
title="Open SSH Terminal">
|
|
<span class="nav-option__icon"><i class="fa-solid fa-terminal"></i></span>
|
|
<span class="nav-option__label"><span>Terminal</span></span>
|
|
</button>
|
|
|
|
<div class="toolbar-assistant nav-option-wrap">
|
|
<button id="dashboardAssistantButton" class="nav-option dashboard-assistant-trigger"
|
|
title="Open ADPanel Assistant" aria-haspopup="dialog" aria-expanded="false">
|
|
<span class="nav-option__icon"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 512 512" style="fill: #FFFFFF;">
|
|
<path d="M0 0 C0.94177835 -0.00367669 1.8835567 -0.00735338 2.85387379 -0.01114148 C6.01180538 -0.02216036 9.16970405 -0.02601916 12.32765198 -0.02983093 C14.59136052 -0.03609706 16.85506803 -0.042744 19.11877441 -0.04974365 C26.55631292 -0.07077304 33.9938516 -0.08114672 41.43141174 -0.09111023 C43.9945381 -0.09515855 46.55766435 -0.0992755 49.12079048 -0.10346031 C59.78643647 -0.12032896 70.45207907 -0.13496223 81.11773586 -0.14220905 C83.88334594 -0.14411874 86.648956 -0.1460391 89.41456604 -0.147995 C90.4455502 -0.14872061 90.4455502 -0.14872061 91.49736232 -0.14946087 C102.61653024 -0.15775048 113.73559021 -0.18306998 124.85471105 -0.21557567 C136.28841155 -0.2487265 147.72203167 -0.26633295 159.15578514 -0.26985329 C165.56808533 -0.27219944 171.9802149 -0.28110319 178.39246941 -0.30631447 C184.43110991 -0.32967284 190.46946842 -0.33379709 196.50814247 -0.32355309 C198.71631689 -0.32305946 200.92450555 -0.32932821 203.13263702 -0.34310913 C226.60958953 -0.4813493 245.61321943 4.68098597 263.01734924 21.38545227 C282.92724095 42.10937703 284.00209203 67.02931951 283.95094299 94.17842102 C283.95229201 96.70377133 283.95423451 99.22912139 283.95674133 101.75447083 C283.95967712 107.02276111 283.9556359 112.29100022 283.94606018 117.5592804 C283.93513448 123.64033635 283.93873974 129.72125859 283.94971299 135.80231142 C283.95988887 141.67829785 283.95880565 147.55424284 283.95294952 153.43023682 C283.95161595 155.92133605 283.9532505 158.4124387 283.95790863 160.90353394 C283.96298181 164.37611499 283.95525431 167.84843739 283.94410706 171.32099915 C283.94815552 172.34858337 283.95220398 173.3761676 283.95637512 174.43489075 C283.95073547 175.38219055 283.94509583 176.32949036 283.93928528 177.30549622 C283.9381542 178.53426861 283.9381542 178.53426861 283.93700027 179.78786469 C283.54352567 183.47635294 282.51908071 186.28363106 279.93531799 188.95967102 C276.25052277 190.90442405 272.86394906 190.49156535 268.93141174 189.34248352 C268.00457581 188.9892804 267.07773987 188.63607727 266.12281799 188.27217102 C260.59491457 186.29841275 255.3280555 185.40626293 249.49781799 184.83467102 C245.87322528 183.94865947 244.87106434 183.19485148 242.68531799 180.14717102 C242.07972442 176.78523368 242.14240941 173.45356738 242.17115784 170.04536438 C242.1604702 168.50554398 242.1604702 168.50554398 242.14956665 166.93461609 C242.13024389 163.53522136 242.13857646 160.13644646 242.14625549 156.73701477 C242.13634906 154.37010794 242.12440802 152.00320883 242.11051941 149.63632202 C242.07809743 143.39503215 242.06776168 137.15391767 242.06367493 130.91255188 C242.05493614 120.94779387 242.01922915 110.98318071 241.9715004 101.01854134 C241.95897268 97.54719715 241.95966919 94.07603738 241.96177673 90.60467529 C241.95518972 88.45469526 241.94818215 86.30471645 241.94068909 84.15473938 C241.94481308 83.20004257 241.94893707 82.24534576 241.95318604 81.26171875 C241.88531579 69.79221884 240.48012669 59.04671477 232.43531799 50.39717102 C220.82149049 39.57239337 205.44057308 40.85517075 190.61500549 40.88838196 C188.58051936 40.88566889 186.54603421 40.88210619 184.5115509 40.87776184 C179.00749027 40.86867318 173.50350494 40.87216755 167.99944305 40.87852001 C162.22790327 40.88359826 156.45636976 40.87888349 150.68482971 40.87574768 C140.99422554 40.87211335 131.3036519 40.87689314 121.61305237 40.88642883 C110.4238204 40.89731234 99.23466134 40.89378638 88.04543114 40.88277602 C78.42306585 40.87368796 68.80072246 40.87242531 59.17835426 40.87765336 C53.43812999 40.8807647 47.69793994 40.8812054 41.9577179 40.87458038 C36.56009778 40.86878545 31.16257129 40.87284308 25.76496124 40.8843689 C23.78893438 40.88700401 21.81289958 40.88627012 19.83687592 40.88184357 C-1.16708133 40.54162604 -1.16708133 40.54162604 -19.06468201 50.39717102 C-29.99958512 62.15406002 -28.60750467 78.13110813 -28.57347107 93.13154602 C-28.5761848 95.14485297 -28.57974787 97.15815892 -28.58409119 99.17146301 C-28.59317201 104.61355039 -28.58968874 110.05556152 -28.58333302 115.49765015 C-28.57825068 121.20732317 -28.58297066 126.91698991 -28.58610535 132.62666321 C-28.58973849 142.21293808 -28.584963 151.79918209 -28.57542419 161.38545227 C-28.56454092 172.45028533 -28.56806696 183.51504467 -28.57907701 194.57987595 C-28.58816846 204.09951786 -28.58942607 213.61913765 -28.58419967 223.1387825 C-28.58109019 228.81586667 -28.58064247 234.49291625 -28.58727264 240.16999817 C-28.59307253 245.50853914 -28.58900099 250.84698555 -28.57748413 256.18551636 C-28.57485165 258.13854821 -28.57557835 260.0915881 -28.58000946 262.0446167 C-28.98584535 283.54137855 -28.98584535 283.54137855 -19.06468201 301.89717102 C-9.50898083 310.80365259 2.34160779 311.45216214 14.84864807 311.38667297 C16.02225891 311.38868713 17.19586975 311.39070129 18.40504456 311.39277649 C20.93619362 311.3963042 23.46735153 311.39557701 25.99849892 311.39100075 C30.00393372 311.38538343 34.0091871 311.39410914 38.0145874 311.40820312 C49.39661974 311.44578537 60.77856801 311.46410305 72.16065979 311.45259094 C78.46342316 311.44637368 84.76589875 311.45794907 91.0685913 311.48903626 C94.39715492 311.50461515 97.72502319 311.50785503 101.05361366 311.49445534 C104.75918389 311.48016956 108.46346219 311.49635534 112.16896057 311.51948547 C113.2667131 311.50771774 114.36446564 311.49595001 115.4954834 311.48382568 C122.93392606 311.57507991 122.93392606 311.57507991 126.81451416 314.52966309 C128.61876235 317.05405065 130.04694925 319.4698617 131.37281799 322.27217102 C134.29346799 327.93762036 138.09648287 332.08107234 142.61109924 336.54170227 C144.99742141 339.53921053 145.52062488 341.34893599 145.68531799 345.14717102 C143.46178858 350.75893573 143.46178858 350.75893573 140.68531799 352.14717102 C138.7472236 352.25166703 136.80550769 352.29107772 134.86462402 352.30107117 C133.62431931 352.30967163 132.38401459 352.31827209 131.10612488 352.32713318 C129.72358746 352.33156885 128.34104959 352.33586716 126.95851135 352.34004211 C125.50798343 352.34794305 124.05745748 352.35621199 122.60693359 352.36482239 C117.82969547 352.39107728 113.05244853 352.4063688 108.27516174 352.42060852 C106.6268469 352.42596968 104.9785321 352.4313472 103.33021736 352.43674088 C96.46320193 352.45838834 89.59618886 352.47711667 82.72914791 352.48836327 C72.91689158 352.50454123 63.10503519 352.5375464 53.29292959 352.59476411 C46.38142828 352.63367567 39.47003287 352.65302174 32.55842501 352.65828383 C28.43909701 352.66191286 24.32019516 352.67366658 20.20098686 352.70638657 C-7.78527516 352.91780802 -29.27301108 350.30476437 -50.50218201 330.06123352 C-62.75274929 317.18856712 -69.46555782 300.48781868 -69.46185303 282.83248901 C-69.46552972 281.89071066 -69.4692064 280.94893231 -69.47299451 279.97861522 C-69.48401338 276.82068363 -69.48787219 273.66278496 -69.49168396 270.50483704 C-69.49795009 268.2411285 -69.50459702 265.97742099 -69.51159668 263.7137146 C-69.53262607 256.27617609 -69.54299974 248.83863741 -69.55296326 241.40107727 C-69.55701158 238.83795092 -69.56112853 236.27482467 -69.56531334 233.71169853 C-69.58218198 223.04605254 -69.59681526 212.38040994 -69.60406208 201.71475315 C-69.60597177 198.94914308 -69.60789213 196.18353301 -69.60984802 193.41792297 C-69.61033176 192.7306002 -69.6108155 192.04327743 -69.6113139 191.33512669 C-69.6196035 180.21595877 -69.644923 169.09689881 -69.6774287 157.97777797 C-69.71057952 146.54407746 -69.72818598 135.11045735 -69.73170632 123.67670387 C-69.73405247 117.26440369 -69.74295621 110.85227411 -69.7681675 104.44001961 C-69.79152587 98.4013791 -69.79565012 92.3630206 -69.78540611 86.32434654 C-69.78491249 84.11617212 -69.79118124 81.90798346 -69.80496216 79.69985199 C-69.87485006 67.83097857 -69.60494175 57.36876701 -65.31468201 46.14717102 C-65.03969533 45.42474999 -64.76470865 44.70232897 -64.48138905 43.9580164 C-57.04059267 26.09439826 -43.3774657 13.54817041 -26.31468201 5.14717102 C-17.43087696 1.59569596 -9.50600833 -0.00199474 0 0 Z " fill="#ffffff" transform="translate(149.31468200683594,79.85282897949219)"/>
|
|
<path d="M0 0 C2.5625 0.375 2.5625 0.375 4.00317383 1.85131836 C6.2117206 5.42572701 7.59395822 9.20675186 9.07421875 13.12890625 C9.75658864 14.88889407 10.43955094 16.6486523 11.12304688 18.40820312 C12.18488615 21.16127342 13.24182137 23.91592697 14.2878418 26.67504883 C20.96486524 44.23209294 27.7096842 57.62404147 45.67333984 65.85961914 C49.27395615 67.43750618 52.91511989 68.90909292 56.5625 70.375 C60.11657513 71.81039988 63.67017022 73.24695038 67.22265625 74.6862793 C69.67779614 75.68063835 72.13638084 76.66450935 74.59765625 77.64379883 C75.72816406 78.09779053 76.85867188 78.55178223 78.0234375 79.01953125 C79.04228027 79.42534424 80.06112305 79.83115723 81.11083984 80.24926758 C83.5625 81.375 83.5625 81.375 85.5625 83.375 C85.6875 86 85.6875 86 85.5625 88.375 C76.63367126 93.11715443 67.3399721 96.67141288 57.90625 100.26953125 C40.9304089 106.81999168 27.4260233 114.10606013 19.73828125 131.39453125 C17.1771581 137.33501146 14.77568696 143.33953839 12.375 149.34619141 C11.56603953 151.36956489 10.75461804 153.39195626 9.94067383 155.41333008 C9.15938202 157.35670734 8.38551927 159.30309125 7.61987305 161.25268555 C7.26449463 162.13867432 6.90911621 163.02466309 6.54296875 163.9375 C6.23254639 164.72253906 5.92212402 165.50757813 5.60229492 166.31640625 C4.46339097 168.57121681 3.65398304 169.9381448 1.5625 171.375 C-0.94580078 171.42993164 -0.94580078 171.42993164 -3.4375 170.375 C-4.99560547 167.85327148 -4.99560547 167.85327148 -6.3046875 164.49609375 C-7.03921143 162.65954224 -7.03921143 162.65954224 -7.78857422 160.78588867 C-8.03766541 160.13639252 -8.28675659 159.48689636 -8.543396 158.81771851 C-9.31485948 156.80634834 -10.10909357 154.8054608 -10.91064453 152.8059082 C-11.9603367 150.18300149 -13.00192119 147.55716723 -14.03515625 144.92773438 C-21.79067089 125.2797105 -29.54312591 112.31680112 -49.4375 103.375 C-52.35206655 102.18519604 -55.28779553 101.05573297 -58.23046875 99.9375 C-58.99464111 99.64585968 -59.75881348 99.35421936 -60.54614258 99.05374146 C-63.7149451 97.84823853 -66.88441541 96.64651067 -70.06762695 95.47949219 C-72.42249583 94.61232043 -74.76407062 93.71530203 -77.10546875 92.8125 C-78.18963326 92.42783569 -78.18963326 92.42783569 -79.29570007 92.03540039 C-81.30151367 91.24609375 -81.30151367 91.24609375 -84.4375 89.375 C-85.39575195 86.16015625 -85.39575195 86.16015625 -85.4375 83.375 C-81.9307407 80.37097765 -77.99726729 78.83554952 -73.7421875 77.1953125 C-72.62095993 76.75335037 -72.62095993 76.75335037 -71.4770813 76.30245972 C-69.09112511 75.36248299 -66.7021685 74.43049466 -64.3125 73.5 C-36.87242516 63.04302389 -36.87242516 63.04302389 -19.43295288 40.16833496 C-16.84927796 34.10857587 -14.4887842 27.96052003 -12.125 21.8125 C-11.05554446 19.05212578 -9.98274823 16.29315119 -8.90400696 13.53639221 C-8.23808522 11.83258787 -7.57785105 10.12654696 -6.92399597 8.41807556 C-6.47761528 7.27031395 -6.47761528 7.27031395 -6.0222168 6.09936523 C-5.76353317 5.42638901 -5.50484955 4.75341278 -5.23832703 4.06004333 C-3.95117816 1.35171613 -2.97381305 0.4575097 0 0 Z " fill="#ffffff" transform="translate(400.4375,303.625)"/>
|
|
<path d="M0 0 C1.051875 -0.00257813 2.10375 -0.00515625 3.1875 -0.0078125 C4.280625 -0.00007812 5.37375 0.00765625 6.5 0.015625 C7.593125 0.00789062 8.68625 0.00015625 9.8125 -0.0078125 C10.864375 -0.00523437 11.91625 -0.00265625 13 0 C14.43859375 0.00338379 14.43859375 0.00338379 15.90625 0.00683594 C18.70918382 0.28649613 20.14978576 0.7335569 22.5 2.265625 C23.5947876 4.34519958 23.5947876 4.34519958 24.44628906 6.96264648 C24.77761841 7.95569794 25.10894775 8.94874939 25.45031738 9.97189331 C25.79671265 11.05882477 26.14310791 12.14575623 26.5 13.265625 C26.87120972 14.38373566 27.24241943 15.50184631 27.62487793 16.65383911 C28.88750972 20.46806909 30.12555218 24.28966831 31.359375 28.11328125 C31.82575873 29.55373529 32.29230023 30.99413826 32.75898743 32.43449402 C34.00176966 36.27205537 35.24197052 40.11044607 36.48152542 43.9490509 C37.51228165 47.14010693 38.54446931 50.33069927 39.57658863 53.52131462 C47.72835495 78.72317355 55.86514691 103.93051567 63.87548828 129.17773438 C64.98363872 132.66517121 66.11521576 136.14396995 67.26123047 139.61914062 C67.54260361 140.48255066 67.82397675 141.34596069 68.11387634 142.23553467 C68.64227354 143.85638158 69.17723634 145.47511 69.7202301 147.09112549 C71.06820876 151.25534905 71.97644566 154.83292785 71.5 159.265625 C70.84 160.255625 70.18 161.245625 69.5 162.265625 C66.06410924 162.95033501 62.55859261 162.77490461 59.0625 162.765625 C58.09505859 162.79398438 57.12761719 162.82234375 56.13085938 162.8515625 C49.12695465 162.87100429 49.12695465 162.87100429 46.5703125 160.40234375 C46.21710938 159.36722656 45.86390625 158.33210937 45.5 157.265625 C45.21535889 156.49105957 44.93071777 155.71649414 44.63745117 154.91845703 C43.63986268 152.15438472 42.7201093 149.37295531 41.8125 146.578125 C41.49216797 145.61583984 41.17183594 144.65355469 40.84179688 143.66210938 C38.5 136.54684168 38.5 136.54684168 38.5 134.265625 C17.38 134.595625 -3.74 134.925625 -25.5 135.265625 C-28.14 143.515625 -30.78 151.765625 -33.5 160.265625 C-36.37595556 163.14158056 -38.70548555 162.55628723 -42.63867188 162.58789062 C-43.56228516 162.58466797 -44.48589844 162.58144531 -45.4375 162.578125 C-46.81711914 162.60229492 -46.81711914 162.60229492 -48.22460938 162.62695312 C-49.55008789 162.62791992 -49.55008789 162.62791992 -50.90234375 162.62890625 C-51.71179443 162.63188721 -52.52124512 162.63486816 -53.35522461 162.63793945 C-55.5 162.265625 -55.5 162.265625 -57.34985352 161.24291992 C-59.59534645 157.38254055 -57.9381267 152.92317034 -56.85809326 148.83712769 C-56.03904394 146.04705774 -55.164556 143.27961117 -54.2734375 140.51171875 C-53.76984962 138.91968376 -53.76984962 138.91968376 -53.25608826 137.29548645 C-52.13614371 133.76240416 -51.00579696 130.23274752 -49.875 126.703125 C-49.07994268 124.20487337 -48.28527372 121.70649813 -47.4909668 119.20800781 C-40.83217026 98.28903914 -34.07522976 77.40117948 -27.3125 56.515625 C-27.06705193 55.7575996 -26.82160385 54.9995742 -26.56871796 54.21857834 C-22.18332583 40.67811267 -22.18332583 40.67811267 -20.23187256 34.71339417 C-19.90610355 33.71759763 -19.90610355 33.71759763 -19.57375336 32.701684 C-19.14782358 31.39976115 -18.72180517 30.09786728 -18.29569244 28.7960043 C-16.97126443 24.73953302 -15.68260565 20.67310603 -14.41162109 16.59960938 C-14.0969841 15.60886414 -13.78234711 14.6181189 -13.45817566 13.59735107 C-12.88976774 11.8066174 -12.33258608 10.01226063 -11.789505 8.21368408 C-9.97422914 2.56230675 -9.97422914 2.56230675 -7.56575012 1.05554199 C-4.95094289 0.05567243 -2.79761381 0.00658041 0 0 Z M6.5 36.265625 C3.12330468 44.27868527 0.39002249 52.45948309 -2.265625 60.734375 C-2.70809128 62.10541825 -3.15078337 63.47638864 -3.59368896 64.84729004 C-4.51359575 67.69728112 -5.43105621 70.54804408 -6.34667969 73.39941406 C-7.52140159 77.05708953 -8.7019406 80.71285679 -9.88422012 84.3680954 C-10.79569872 87.18801993 -11.70435079 90.00884878 -12.61211395 92.82997131 C-13.04668287 94.17947529 -13.4820883 95.5287102 -13.91834259 96.87767029 C-14.52425524 98.7528157 -15.12600254 100.62930554 -15.72753906 102.50585938 C-16.07077209 103.57267944 -16.41400513 104.63949951 -16.76763916 105.73864746 C-17.59278741 108.14728984 -17.59278741 108.14728984 -17.5 110.265625 C-1.66 110.265625 14.18 110.265625 30.5 110.265625 C28.82831025 102.69647485 28.82831025 102.69647485 26.66821289 95.35375977 C26.31767349 94.2855751 25.96713409 93.21739044 25.60597229 92.11683655 C25.231978 90.9916008 24.8579837 89.86636505 24.47265625 88.70703125 C23.88828041 86.93053444 23.88828041 86.93053444 23.292099 85.1181488 C22.26224363 81.98929146 21.22883945 78.86163879 20.19342041 75.73461914 C18.73933706 71.34071884 17.29134479 66.94480932 15.84361267 62.54881287 C15.07511541 60.21642928 14.30499606 57.88457931 13.53297424 55.55335999 C11.41977276 49.15244229 9.39466184 42.73473054 7.5 36.265625 C7.17 36.265625 6.84 36.265625 6.5 36.265625 Z " fill="#ffffff" transform="translate(208.5,169.734375)"/>
|
|
<path d="M0 0 C0.886875 -0.00257813 1.77375 -0.00515625 2.6875 -0.0078125 C4.0796875 0.00378906 4.0796875 0.00378906 5.5 0.015625 C6.428125 0.00789062 7.35625 0.00015625 8.3125 -0.0078125 C9.6428125 -0.00394531 9.6428125 -0.00394531 11 0 C11.8146875 0.00225586 12.629375 0.00451172 13.46875 0.00683594 C15.5 0.265625 15.5 0.265625 17.5 2.265625 C17.75168228 4.95806122 17.75168228 4.95806122 17.75396729 8.45300293 C17.75708727 9.09441837 17.76020725 9.73583381 17.76342177 10.39668608 C17.77142756 12.55556526 17.76506828 14.71416537 17.75878906 16.87304688 C17.76149779 18.41687689 17.76505805 19.9607056 17.76940918 21.50453186 C17.7785496 25.70485904 17.77498216 29.90508829 17.76865101 34.10541725 C17.76359954 38.49406836 17.76828008 42.88271088 17.77142334 47.2713623 C17.77506548 54.64234935 17.77025739 62.01329637 17.76074219 69.38427734 C17.74985716 77.91509506 17.75338256 86.44581719 17.764395 94.9766326 C17.77346082 102.29130165 17.77475661 109.60594187 17.76951766 116.92061472 C17.76639407 121.29360427 17.76599924 125.66654884 17.77259064 130.03953552 C17.77835325 134.15005929 17.77438722 138.26045941 17.76280212 142.37096977 C17.76014971 143.88270805 17.76093049 145.39445667 17.76532745 146.90619087 C17.77076161 148.9636851 17.76397525 151.02077864 17.75396729 153.07824707 C17.75321323 154.23157784 17.75245918 155.3849086 17.75168228 156.57318878 C17.5 159.265625 17.5 159.265625 15.5 161.265625 C13.46875 161.52441406 13.46875 161.52441406 11 161.53125 C10.113125 161.53382813 9.22625 161.53640625 8.3125 161.5390625 C7.384375 161.53132812 6.45625 161.52359375 5.5 161.515625 C4.571875 161.52335938 3.64375 161.53109375 2.6875 161.5390625 C1.3571875 161.53519531 1.3571875 161.53519531 0 161.53125 C-0.8146875 161.52899414 -1.629375 161.52673828 -2.46875 161.52441406 C-4.5 161.265625 -4.5 161.265625 -6.5 159.265625 C-6.75168228 156.57318878 -6.75168228 156.57318878 -6.75396729 153.07824707 C-6.75864726 152.11612391 -6.75864726 152.11612391 -6.76342177 151.13456392 C-6.77142756 148.97568474 -6.76506828 146.81708463 -6.75878906 144.65820312 C-6.76149779 143.11437311 -6.76505805 141.5705444 -6.76940918 140.02671814 C-6.7785496 135.82639096 -6.77498216 131.62616171 -6.76865101 127.42583275 C-6.76359954 123.03718164 -6.76828008 118.64853912 -6.77142334 114.2598877 C-6.77506548 106.88890065 -6.77025739 99.51795363 -6.76074219 92.14697266 C-6.74985716 83.61615494 -6.75338256 75.08543281 -6.764395 66.5546174 C-6.77346082 59.23994835 -6.77475661 51.92530813 -6.76951766 44.61063528 C-6.76639407 40.23764573 -6.76599924 35.86470116 -6.77259064 31.49171448 C-6.77835325 27.38119071 -6.77438722 23.27079059 -6.76280212 19.16028023 C-6.76014971 17.64854195 -6.76093049 16.13679333 -6.76532745 14.62505913 C-6.77076161 12.5675649 -6.76397525 10.51047136 -6.75396729 8.45300293 C-6.75321323 7.29967216 -6.75245918 6.1463414 -6.75168228 4.95806122 C-6.31387408 0.27449492 -4.18391186 0.0115852 0 0 Z " fill="#ffffff" transform="translate(322.5,170.734375)"/>
|
|
</svg></span>
|
|
<span class="nav-option__label"><span>Assistant</span></span>
|
|
</button>
|
|
</div>
|
|
|
|
|
|
<button class="nav-option" title="Settings" data-href="/settings">
|
|
<span class="nav-option__icon"><i class="fa-solid fa-gear"></i></span>
|
|
<span class="nav-option__label"><span>Settings</span></span>
|
|
</button>
|
|
|
|
<button id="logoutBtn" class="nav-option nav-option--logout" title="Log Out">
|
|
<span class="nav-option__icon"><i class="fa-solid fa-right-from-bracket"></i></span>
|
|
<span class="nav-option__label"><span>Logout</span></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<section id="dashboardAssistantMenu" class="dashboard-assistant-menu" hidden aria-hidden="true"
|
|
aria-label="ADPanel Assistant">
|
|
<div class="dashboard-assistant-head">
|
|
<div style="display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0;">
|
|
<div class="dashboard-assistant-icon">
|
|
<i class="fa-solid fa-wand-magic-sparkles"></i>
|
|
</div>
|
|
<div class="dashboard-assistant-head-copy" style="flex: 1; min-width: 0;">
|
|
<h2 class="dashboard-assistant-title">ADPanel Assistant</h2>
|
|
<p class="dashboard-assistant-subtitle">
|
|
Complexity, simplified.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="dashboard-assistant-head-actions">
|
|
<button id="dashboardAssistantConfigToggle" class="dashboard-assistant-head-btn"
|
|
title="Assistant settings" hidden>
|
|
<i class="fa-solid fa-key"></i>
|
|
</button>
|
|
<button id="dashboardAssistantReset" class="dashboard-assistant-head-btn"
|
|
title="Start a new chat">
|
|
<i class="fa-solid fa-rotate-right"></i>
|
|
</button>
|
|
<button id="dashboardAssistantClose" class="dashboard-assistant-head-close-btn"
|
|
title="Close assistant">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="dashboardAssistantConfig" class="dashboard-assistant-config" hidden>
|
|
<form id="dashboardAssistantTokenForm" class="dashboard-assistant-token-form">
|
|
<label class="dashboard-assistant-token-label" for="dashboardAssistantProviderSelect">
|
|
Select your provider
|
|
</label>
|
|
<div class="dashboard-assistant-custom-dropdown" id="dashboardAssistantProviderDropdown">
|
|
<div class="dashboard-assistant-dropdown-trigger" id="dashboardAssistantProviderTrigger">
|
|
<img id="dashboardAssistantProviderIcon" class="dashboard-assistant-provider-icon" src="/images/groq-icon.svg" alt="Provider icon">
|
|
<span class="dashboard-assistant-dropdown-selected-text" id="dashboardAssistantProviderSelectedText">Groq</span>
|
|
<img class="dashboard-assistant-provider-arrow" src="/images/down-icon.svg" alt="Select arrow">
|
|
</div>
|
|
<div class="dashboard-assistant-dropdown-menu" id="dashboardAssistantProviderMenu" hidden>
|
|
<div class="dashboard-assistant-dropdown-item" data-value="google">
|
|
<img class="dashboard-assistant-item-icon" src="/images/gemini-svg.svg" alt="Gemini">
|
|
<span>Gemini</span>
|
|
</div>
|
|
</div>
|
|
<select id="dashboardAssistantProviderSelect" class="dashboard-assistant-hidden-select">
|
|
<option value="groq" selected>Groq</option>
|
|
<option value="google">Google AI Studio</option>
|
|
</select>
|
|
</div>
|
|
|
|
<label class="dashboard-assistant-token-label" for="dashboardAssistantTokenInput">
|
|
<span id="dashboardAssistantTokenLabel">Groq API Key</span>
|
|
</label>
|
|
<input id="dashboardAssistantTokenInput" class="dashboard-assistant-token-input"
|
|
type="password" placeholder="Paste your api key" autocomplete="off"
|
|
spellcheck="false" autocapitalize="off" autocorrect="off">
|
|
|
|
<label class="dashboard-assistant-token-label">
|
|
Select your intelligence
|
|
</label>
|
|
<div class="dashboard-assistant-custom-dropdown" id="dashboardAssistantModelDropdown">
|
|
<div class="dashboard-assistant-dropdown-trigger" id="dashboardAssistantModelTrigger">
|
|
<span class="dashboard-assistant-dropdown-selected-text" id="dashboardAssistantModelSelectedText">Llama 3.1 8B</span>
|
|
<img class="dashboard-assistant-mark-icon" src="/images/mark-icon.svg" alt="Mark icon">
|
|
<img class="dashboard-assistant-provider-arrow" src="/images/down-icon.svg" alt="Select arrow">
|
|
</div>
|
|
<div class="dashboard-assistant-dropdown-menu" id="dashboardAssistantModelMenu" hidden>
|
|
<div class="dashboard-assistant-dropdown-item" data-value="llama-3.3-70b">
|
|
<span>Llama 3.3 70B</span>
|
|
</div>
|
|
<div class="dashboard-assistant-dropdown-divider"></div>
|
|
<div class="dashboard-assistant-dropdown-item" data-value="gpt-oss-120b">
|
|
<span>GPT OSS 120B</span>
|
|
</div>
|
|
<div class="dashboard-assistant-dropdown-divider"></div>
|
|
<div class="dashboard-assistant-dropdown-item" data-value="gpt-oss-20b">
|
|
<span>GPT OSS 20B</span>
|
|
</div>
|
|
<div class="dashboard-assistant-dropdown-divider"></div>
|
|
<div class="dashboard-assistant-dropdown-item" data-value="compound">
|
|
<span>Compound</span>
|
|
</div>
|
|
<div class="dashboard-assistant-dropdown-divider"></div>
|
|
<div class="dashboard-assistant-dropdown-item" data-value="compound-mini">
|
|
<span>Compound Mini</span>
|
|
</div>
|
|
<div class="dashboard-assistant-dropdown-divider"></div>
|
|
<div class="dashboard-assistant-dropdown-item" data-value="minimax-m3.0">
|
|
<span>MiniMax M3.0</span>
|
|
</div>
|
|
<div class="dashboard-assistant-dropdown-divider"></div>
|
|
<div class="dashboard-assistant-dropdown-item" data-value="qwen-3.6-7b">
|
|
<span>Qwen 3.6 7B</span>
|
|
</div>
|
|
</div>
|
|
<select id="dashboardAssistantModelSelect" class="dashboard-assistant-hidden-select">
|
|
<option value="llama-3.1-8b" selected>Llama 3.1 8B</option>
|
|
<option value="llama-3.3-70b">Llama 3.3 70B</option>
|
|
<option value="gpt-oss-120b">GPT OSS 120B</option>
|
|
<option value="gpt-oss-20b">GPT OSS 20B</option>
|
|
<option value="compound">Compound</option>
|
|
<option value="compound-mini">Compound Mini</option>
|
|
<option value="minimax-m3.0">MiniMax M3.0</option>
|
|
<option value="qwen-3.6-7b">Qwen 3.6 7B</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="dashboard-assistant-access-row">
|
|
<div class="dashboard-assistant-access-copy">
|
|
<p class="dashboard-assistant-access-title">Allow normal users to acces Assistant?</p>
|
|
<p class="dashboard-assistant-access-text">
|
|
Grants or restricts access to the Assistant for normal users.
|
|
</p>
|
|
</div>
|
|
<label class="dashboard-assistant-switch" title="Allow normal users to access Assistant">
|
|
<input type="checkbox" id="dashboardAssistantAllowUsersToggle">
|
|
<span class="dashboard-assistant-switch-slider"></span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="dashboard-assistant-token-foot">
|
|
<span id="dashboardAssistantTokenState" class="dashboard-assistant-token-state">
|
|
No AI provider key has been saved yet.
|
|
</span>
|
|
<button id="dashboardAssistantSaveToken" class="dashboard-assistant-save" type="submit">
|
|
Save
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div id="dashboardAssistantNotice" class="dashboard-assistant-notice" hidden></div>
|
|
|
|
<div id="dashboardAssistantMessages" class="dashboard-assistant-messages" aria-live="polite">
|
|
</div>
|
|
|
|
<div id="dashboardAssistantComposer" class="dashboard-assistant-composer">
|
|
<form id="dashboardAssistantComposerForm" class="dashboard-assistant-text-form">
|
|
<label class="dashboard-assistant-text-label" for="dashboardAssistantTextInput">
|
|
Message
|
|
</label>
|
|
<div class="dashboard-assistant-text-row">
|
|
<textarea id="dashboardAssistantTextInput" class="dashboard-assistant-text-input"
|
|
rows="2" placeholder="Ask ADPanel Assistant..." autocomplete="off"></textarea>
|
|
<button id="dashboardAssistantSend" class="dashboard-assistant-send-btn" type="submit"
|
|
title="Send message">
|
|
<i class="fa-solid fa-paper-plane"></i>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
<div class="dashboard-assistant-voicepad">
|
|
<button id="dashboardAssistantMic" class="dashboard-assistant-voice-btn" type="button"
|
|
title="Start voice input">
|
|
<span class="dashboard-assistant-voice-icon">
|
|
<i class="fa-solid fa-microphone"></i>
|
|
</span>
|
|
<span class="dashboard-assistant-voice-copy">Tap to talk</span>
|
|
</button>
|
|
<button id="dashboardAssistantReplay" class="dashboard-assistant-replay-btn" type="button"
|
|
title="Replay last assistant reply">
|
|
<i class="fa-solid fa-volume-high"></i>
|
|
</button>
|
|
</div>
|
|
<div class="dashboard-assistant-ptt-setting" style="margin-top: 14px; margin-bottom: 4px; font-size: 13px; color: rgba(255,255,255,0.5); text-align: center;">
|
|
Push to talk: <button id="dashboardAssistantPttKeyBtn" type="button" style="background: none; border: none; padding: 0; color: #818cf8; cursor: pointer; font-weight: 600; font-family: inherit; font-size: inherit;">None</button>
|
|
</div>
|
|
<div class="dashboard-assistant-voice-meta">
|
|
<div id="dashboardAssistantVoiceState" class="dashboard-assistant-voice-state">
|
|
Voice replies are on.
|
|
</div>
|
|
<div id="dashboardAssistantSpeaking" class="dashboard-assistant-speaking" hidden>
|
|
<span class="dashboard-assistant-speaking-wave"></span>
|
|
<span class="dashboard-assistant-speaking-wave"></span>
|
|
<span class="dashboard-assistant-speaking-wave"></span>
|
|
</div>
|
|
</div>
|
|
<div id="dashboardAssistantTranscript" class="dashboard-assistant-transcript" hidden></div>
|
|
|
|
</div>
|
|
</section>
|
|
|
|
<div id="topbar-spacer" aria-hidden="true" data-topbar-extra-offset="73"></div>
|
|
|
|
<main class="dashboard" id="mainContent">
|
|
<section class="bots" id="servers">
|
|
<div class="bot-grid" data-bot-grid>
|
|
|
|
<article class="bot-card status-online" data-bot-card
|
|
data-name="t" data-cover=""
|
|
data-href="/server/t">
|
|
<div class="bot-card__offline" data-offline-overlay
|
|
style="display: none;">
|
|
<div class="offline-ring"></div>
|
|
<div class="offline-text">Can't establish connection to the server</div>
|
|
</div>
|
|
<div class="bot-card__body">
|
|
<div class="bot-card__hero">
|
|
<div class="bot-card__hero-bg"></div>
|
|
<div class="bot-card__hero-overlay"></div>
|
|
<div class="bot-card__hero-content">
|
|
<div class="bot-card__title-row">
|
|
<div>
|
|
<h4>
|
|
t
|
|
</h4>
|
|
<p>Node:
|
|
</p>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="bot-card__meta-row">
|
|
<span><i class="fa-solid fa-globe"></i>
|
|
1.2.3.4:22
|
|
</span>
|
|
<span><i class="fa-solid fa-cube"></i>
|
|
Custom
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bot-card__stats">
|
|
<div class="bot-card__stat">
|
|
<div class="bot-card__stat-label">
|
|
<div class="bot-card__stat-icon bot-card__stat-icon--memory"><i class="fa-solid fa-memory"></i>
|
|
</div>
|
|
<div class="bot-card__stat-title">Memory</div>
|
|
<div class="bot-card__stat-chip"><i class="fa-solid fa-wave-pulse"></i><span>
|
|
N/A
|
|
</span></div>
|
|
</div>
|
|
<div class="bot-card__progress">
|
|
<span style="width:0%"></span>
|
|
</div>
|
|
</div>
|
|
<div class="bot-card__stat">
|
|
<div class="bot-card__stat-label">
|
|
<div class="bot-card__stat-icon bot-card__stat-icon--disk"><i
|
|
class="fa-solid fa-hard-drive"></i>
|
|
</div>
|
|
<div class="bot-card__stat-title">Disk</div>
|
|
<div class="bot-card__stat-chip"><i class="fa-solid fa-arrows-rotate"></i><span>
|
|
N/A
|
|
</span></div>
|
|
</div>
|
|
<div class="bot-card__progress"><span
|
|
style="width:0%"></span></div>
|
|
</div>
|
|
<div class="bot-card__stat">
|
|
<div class="bot-card__stat-label">
|
|
<div class="bot-card__stat-icon bot-card__stat-icon--cpu"><i class="fa-solid fa-microchip"></i>
|
|
</div>
|
|
<div class="bot-card__stat-title">CPU</div>
|
|
<div class="bot-card__stat-chip"><i class="fa-solid fa-signal"></i><span>
|
|
N/A
|
|
</span></div>
|
|
</div>
|
|
<div class="bot-card__progress"><span style="width:0%"></span></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bot-card__footer">
|
|
<div class="bot-card__footer-text">Click to view details</div>
|
|
<i class="fa-solid fa-arrow-right bot-card__chevron"></i>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
<div id="accountPage" class="account-page" style="display: none;">
|
|
<div class="account-header">
|
|
<button id="accountBackBtn" class="account-back-btn">
|
|
<i class="fa-solid fa-arrow-left"></i>
|
|
<span>Back to Dashboard</span>
|
|
</button>
|
|
<h2>My Account</h2>
|
|
<p>View and manage your account information</p>
|
|
</div>
|
|
|
|
<div class="account-tabs">
|
|
<button class="account-tab active" data-account-tab="info">
|
|
<i class="fa-solid fa-circle-info"></i>
|
|
<span>Info</span>
|
|
</button>
|
|
<button class="account-tab" data-account-tab="credentials">
|
|
<i class="fa-solid fa-key"></i>
|
|
<span>Credentials</span>
|
|
</button>
|
|
</div>
|
|
|
|
<div id="accountInfoTab" class="account-tab-content active">
|
|
<div class="account-card">
|
|
<div class="account-card-header">
|
|
<div class="account-avatar" id="accountAvatarWrapper" title="Click to change avatar">
|
|
<img id="accountAvatarImg" src="/x.png"
|
|
alt="Avatar">
|
|
<div class="account-avatar-overlay">
|
|
<i class="fa-solid fa-camera"></i>
|
|
<span>Change</span>
|
|
</div>
|
|
</div>
|
|
<div class="account-info">
|
|
<h3 id="accountUsername">Loading...</h3>
|
|
<p id="accountEmail">Loading...</p>
|
|
</div>
|
|
</div>
|
|
|
|
<input type="file" id="avatarFileInput" accept="image/jpeg,image/png,image/gif,image/webp"
|
|
style="display:none;">
|
|
|
|
<div class="account-section-title">
|
|
<i class="fa-solid fa-circle-info"></i>
|
|
Account Details
|
|
</div>
|
|
|
|
<div class="account-row account-row-editable" id="usernameRow">
|
|
<span class="account-row-label">Username</span>
|
|
<div class="account-row-value-wrap">
|
|
<span class="account-row-value" id="accountUsernameValue">—</span>
|
|
<input type="text" class="account-row-input" id="usernameInput" style="display:none;" maxlength="30"
|
|
placeholder="Enter username">
|
|
<button class="account-row-edit-btn" id="usernameEditBtn" title="Edit username">
|
|
<i class="fa-solid fa-pencil"></i>
|
|
</button>
|
|
<button class="account-row-save-btn" id="usernameSaveBtn" style="display:none;" title="Save">
|
|
<i class="fa-solid fa-check"></i>
|
|
</button>
|
|
<button class="account-row-cancel-btn" id="usernameCancelBtn" style="display:none;" title="Cancel">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
</div>
|
|
<div class="account-row-cooldown" id="usernameCooldown" style="display:none;"></div>
|
|
</div>
|
|
|
|
<div class="account-row">
|
|
<span class="account-row-label">Email Address</span>
|
|
<span class="account-row-value" id="accountEmailValue">—</span>
|
|
</div>
|
|
|
|
<div class="account-row">
|
|
<span class="account-row-label">Role</span>
|
|
<span class="account-row-value" id="accountRoleValue">—</span>
|
|
</div>
|
|
|
|
<div class="account-row">
|
|
<span class="account-row-label">User ID</span>
|
|
<span class="account-row-value" id="accountIdValue">—</span>
|
|
</div>
|
|
|
|
<div class="account-row account-row-editable" id="statusRow">
|
|
<span class="account-row-label">Status</span>
|
|
<div class="account-row-value-wrap">
|
|
<span class="account-row-value account-status-value" id="accountStatusValue">
|
|
<span class="status-dot"></span>
|
|
<span id="accountStatusText">Available</span>
|
|
</span>
|
|
<button class="account-row-edit-btn" id="statusEditBtn" title="Edit status">
|
|
<i class="fa-solid fa-pencil"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="accountCredentialsTab" class="account-tab-content">
|
|
<div class="account-card">
|
|
<div class="credentials-card">
|
|
<div class="credentials-info">
|
|
<div class="credentials-icon">
|
|
<img src="/images/adpanel-dark.svg" alt="2FA" draggable="false">
|
|
</div>
|
|
<div class="credentials-text">
|
|
<h4>Two-Factor Authentication</h4>
|
|
<p>Change your authenticator app 2FA code</p>
|
|
</div>
|
|
</div>
|
|
<button class="credentials-btn" id="change2faBtn">
|
|
<i class="fa-solid fa-rotate"></i> Change 2FA
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="account-card">
|
|
<div class="credentials-card">
|
|
<div class="credentials-info">
|
|
<div class="credentials-icon">
|
|
<img src="/images/change-password.webp" alt="Password"
|
|
draggable="false">
|
|
</div>
|
|
<div class="credentials-text">
|
|
<h4>Change Password</h4>
|
|
<p>Update your account password</p>
|
|
</div>
|
|
</div>
|
|
<button class="credentials-btn" id="changePasswordBtn">
|
|
<i class="fa-solid fa-key"></i> Change Password
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="account-card">
|
|
<div class="credentials-card">
|
|
<div class="credentials-info">
|
|
<div class="credentials-icon">
|
|
<img src="/images/email.webp" alt="Email" draggable="false">
|
|
</div>
|
|
<div class="credentials-text">
|
|
<h4>Change Email</h4>
|
|
<p>Update your account email address</p>
|
|
</div>
|
|
</div>
|
|
<button class="credentials-btn" id="changeEmailBtn">
|
|
<i class="fa-solid fa-envelope"></i> Change Email
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="dashboardAssistantDeleteModal" class="enterprise-modal-overlay dashboard-assistant-confirm-overlay"
|
|
aria-hidden="true">
|
|
<div class="enterprise-modal dashboard-assistant-confirm-modal" role="dialog" aria-modal="true"
|
|
aria-labelledby="dashboardAssistantDeleteTitle">
|
|
<div class="enterprise-modal-header">
|
|
<div class="enterprise-modal-icon icon-terminal dashboard-assistant-confirm-icon">
|
|
<i class="fa-solid fa-trash-can"></i>
|
|
</div>
|
|
<div class="enterprise-modal-titles">
|
|
<div class="enterprise-modal-eyebrow">Assistant Confirmation</div>
|
|
<h3 class="enterprise-modal-title" id="dashboardAssistantDeleteTitle">Delete server</h3>
|
|
<p class="enterprise-modal-subtitle" id="dashboardAssistantDeleteSubtitle">
|
|
Confirm this action before the assistant removes the server.
|
|
</p>
|
|
</div>
|
|
<button id="dashboardAssistantDeleteClose" class="enterprise-modal-close" title="Close">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
</div>
|
|
<div class="enterprise-modal-body">
|
|
<div class="dashboard-assistant-confirm-copy">
|
|
<p class="dashboard-assistant-confirm-lead">Do you want to delete server <strong
|
|
id="dashboardAssistantDeleteName">—</strong>?</p>
|
|
<p class="dashboard-assistant-confirm-text">
|
|
This removes the server files and its node container. You need to confirm here before the assistant
|
|
continues.
|
|
</p>
|
|
<div class="dashboard-assistant-verify" id="dashboardAssistantDeleteVerify" hidden>
|
|
<label class="dashboard-assistant-verify-label" for="dashboardAssistantDeleteCredential"
|
|
id="dashboardAssistantDeleteCredentialLabel">Current password</label>
|
|
<input class="dashboard-assistant-verify-input" type="password"
|
|
id="dashboardAssistantDeleteCredential" autocomplete="current-password" spellcheck="false" />
|
|
<p class="dashboard-assistant-verify-hint" id="dashboardAssistantDeleteVerifyHint">
|
|
Confirm this destructive action with your admin credential, like the delete window in Settings.
|
|
</p>
|
|
<p class="dashboard-assistant-verify-feedback" id="dashboardAssistantDeleteFeedback" hidden></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="enterprise-modal-footer dashboard-assistant-confirm-footer">
|
|
<button id="dashboardAssistantDeleteCancel" class="enterprise-btn-secondary" type="button">Keep server</button>
|
|
<button id="dashboardAssistantDeleteConfirm" class="enterprise-btn-primary" type="button">
|
|
<i class="fa-solid fa-trash-can"></i>
|
|
Delete server
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="email-modal-overlay" id="emailModal">
|
|
<div class="email-modal">
|
|
<div class="email-modal-header">
|
|
<div class="email-modal-header-left">
|
|
<div class="email-modal-icon">
|
|
<img src="/images/email.webp" alt="Email" draggable="false">
|
|
</div>
|
|
<div>
|
|
<h3 class="email-modal-title">Change Email</h3>
|
|
<p class="email-modal-subtitle">Update your account email address</p>
|
|
</div>
|
|
</div>
|
|
<button class="email-modal-close" id="emailModalClose">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="email-modal-body">
|
|
<div id="emailStep1">
|
|
<div class="email-step">
|
|
<div class="email-step-label">
|
|
<span class="email-step-num">1</span>
|
|
Enter your password
|
|
</div>
|
|
<div class="email-input-wrap">
|
|
<input type="password" class="email-input" id="emailPasswordInput" placeholder="Current password"
|
|
autocomplete="current-password">
|
|
<button type="button" class="email-toggle-eye" data-target="emailPasswordInput" style="display:none;">
|
|
<i class="fa-solid fa-eye"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="email-step">
|
|
<div class="email-step-label">
|
|
<span class="email-step-num">2</span>
|
|
Enter your 2FA code
|
|
</div>
|
|
<input type="text" class="email-input email-code-input" id="email2faInput" placeholder="000000"
|
|
maxlength="6" autocomplete="off">
|
|
<div class="forgot-code-link" id="emailForgotLink">
|
|
You don't have the code? <span class="forgot-code-click">Click here</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="emailStep2" style="display:none;">
|
|
<div class="email-step">
|
|
<div class="email-step-label">
|
|
<span class="email-step-num">3</span>
|
|
Enter your new email address
|
|
</div>
|
|
<input type="email" class="email-input" id="newEmailInput" placeholder="new@email.com" autocomplete="email">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="email-error" id="emailError"></div>
|
|
<div class="email-success" id="emailSuccess">
|
|
<i class="fa-solid fa-check-circle"></i> Email has been successfully changed!
|
|
</div>
|
|
</div>
|
|
|
|
<div class="email-modal-footer">
|
|
<button class="email-btn email-btn-cancel" id="emailCancelBtn">Cancel</button>
|
|
<button class="email-btn email-btn-confirm" id="emailConfirmBtn">Verify</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="recovery-modal-overlay" id="recoveryModal">
|
|
<div class="recovery-modal">
|
|
<div class="recovery-modal-header">
|
|
<div class="recovery-modal-header-left">
|
|
<div class="recovery-modal-icon">
|
|
<img src="/images/adpanel-dark.svg" alt="Recovery"
|
|
draggable="false">
|
|
</div>
|
|
<div>
|
|
<h3 class="recovery-modal-title">Recovery Code</h3>
|
|
<p class="recovery-modal-subtitle">Use a one-time recovery code</p>
|
|
</div>
|
|
</div>
|
|
<button class="recovery-modal-close" id="recoveryModalClose">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="recovery-modal-body">
|
|
<div class="recovery-step">
|
|
<div class="recovery-step-label">
|
|
<span class="recovery-step-num">1</span>
|
|
Enter one of your recovery codes
|
|
</div>
|
|
<input type="text" class="recovery-input" id="recoveryCodeInput" placeholder="XXXXXXXX" maxlength="8"
|
|
autocomplete="off"
|
|
style="text-transform: uppercase; letter-spacing: 4px; text-align: center; font-family: 'SF Mono', Monaco, monospace; font-size: 18px;">
|
|
</div>
|
|
|
|
<div class="recovery-hint">
|
|
Recovery codes were provided when you created your account. Each code can only be used once.
|
|
</div>
|
|
|
|
<div class="recovery-error" id="recoveryError"></div>
|
|
</div>
|
|
|
|
<div class="recovery-modal-footer">
|
|
<button class="recovery-btn recovery-btn-cancel" id="recoveryCancelBtn">Cancel</button>
|
|
<button class="recovery-btn recovery-btn-confirm" id="recoveryConfirmBtn">Verify Code</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="recovery-modal-overlay" id="statusModal">
|
|
<div class="recovery-modal">
|
|
<div class="recovery-modal-header">
|
|
<div class="recovery-modal-header-left">
|
|
<div class="recovery-modal-icon" style="background: transparent;">
|
|
<img src="/images/clock.webp" alt="Status"
|
|
style="width: 70px; height: 70px;">
|
|
</div>
|
|
<div>
|
|
<h3 class="recovery-modal-title">Update Status</h3>
|
|
<p class="recovery-modal-subtitle">Set a custom status message</p>
|
|
</div>
|
|
</div>
|
|
<button class="recovery-modal-close" id="statusModalClose">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="recovery-modal-body">
|
|
<div class="recovery-step">
|
|
<div class="recovery-step-label">
|
|
<span class="recovery-step-num">1</span>
|
|
Enter your status
|
|
</div>
|
|
<input type="text" class="recovery-input" id="statusInput" placeholder="In a flow..." maxlength="80"
|
|
autocomplete="off" style="text-align: left; letter-spacing: normal; font-family: inherit; font-size: 15px;">
|
|
</div>
|
|
|
|
<div class="recovery-step" style="margin-top: 16px;">
|
|
<div class="recovery-step-label">
|
|
<span class="recovery-step-num">2</span>
|
|
Clear after
|
|
</div>
|
|
<select class="recovery-input" id="statusDuration"
|
|
style="text-align: left; letter-spacing: normal; font-family: inherit; padding: 12px; background: #0a0c14; color: #fff; border: 1px solid rgba(255,255,255,0.12);">
|
|
<option value="86400000">1 day</option>
|
|
<option value="259200000">3 days</option>
|
|
<option value="604800000">1 week</option>
|
|
<option value="2592000000">1 month</option>
|
|
<option value="never">Never</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="recovery-error" id="statusError"></div>
|
|
</div>
|
|
|
|
<div class="recovery-modal-footer">
|
|
<button class="recovery-btn recovery-btn-cancel" id="statusCancelBtn">Cancel</button>
|
|
<button class="recovery-btn recovery-btn-confirm" id="statusSaveBtn">Save Status</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="password-modal-overlay" id="passwordModal">
|
|
<div class="password-modal">
|
|
<div class="password-modal-header">
|
|
<div class="password-modal-header-left">
|
|
<div class="password-modal-icon">
|
|
<img src="/images/change-password.webp" alt="Password"
|
|
draggable="false">
|
|
</div>
|
|
<div>
|
|
<h3 class="password-modal-title">Change Password</h3>
|
|
<p class="password-modal-subtitle">Update your account password</p>
|
|
</div>
|
|
</div>
|
|
<button class="password-modal-close" id="passwordModalClose">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="password-modal-body">
|
|
<div id="passwordStep1">
|
|
<div class="password-step">
|
|
<div class="password-step-label">
|
|
<span class="password-step-num">1</span>
|
|
Enter your current password
|
|
</div>
|
|
<div class="password-input-wrap">
|
|
<input type="password" class="password-input" id="currentPasswordInput" placeholder="Current password"
|
|
autocomplete="current-password">
|
|
<button type="button" class="password-toggle-eye" data-target="currentPasswordInput"
|
|
style="display:none;">
|
|
<i class="fa-solid fa-eye"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="password-step">
|
|
<div class="password-step-label">
|
|
<span class="password-step-num">2</span>
|
|
Enter your 2FA code
|
|
</div>
|
|
<input type="text" class="password-input password-code-input" id="password2faInput" placeholder="000000"
|
|
maxlength="6" autocomplete="off">
|
|
<div class="forgot-code-link" id="passwordForgotLink">
|
|
You don't have the code? <span class="forgot-code-click">Click here</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="passwordStep2" style="display:none;">
|
|
<div class="password-step">
|
|
<div class="password-step-label">
|
|
<span class="password-step-num">3</span>
|
|
Enter your new password
|
|
</div>
|
|
<div class="password-input-wrap">
|
|
<input type="password" class="password-input" id="newPasswordInput" placeholder="New password"
|
|
autocomplete="new-password">
|
|
<button type="button" class="password-toggle-eye" data-target="newPasswordInput" style="display:none;">
|
|
<i class="fa-solid fa-eye"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="password-step">
|
|
<div class="password-step-label">
|
|
<span class="password-step-num">4</span>
|
|
Confirm your new password
|
|
</div>
|
|
<div class="password-input-wrap">
|
|
<input type="password" class="password-input" id="confirmPasswordInput" placeholder="Confirm new password"
|
|
autocomplete="new-password">
|
|
<button type="button" class="password-toggle-eye" data-target="confirmPasswordInput"
|
|
style="display:none;">
|
|
<i class="fa-solid fa-eye"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="password-error" id="passwordError"></div>
|
|
<div class="password-success" id="passwordSuccess">
|
|
<i class="fa-solid fa-check-circle"></i> Password has been successfully changed!
|
|
</div>
|
|
</div>
|
|
|
|
<div class="password-modal-footer">
|
|
<button class="password-btn password-btn-cancel" id="passwordCancelBtn">Cancel</button>
|
|
<button class="password-btn password-btn-confirm" id="passwordConfirmBtn">Verify</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="twofa-modal-overlay" id="twofaModal">
|
|
<div class="twofa-modal">
|
|
<div class="twofa-modal-header">
|
|
<div class="twofa-modal-header-left">
|
|
<div class="twofa-modal-icon">
|
|
<img src="/images/adpanel-dark.svg" alt="2FA" draggable="false"
|
|
width="20px" height="20px">
|
|
</div>
|
|
<div>
|
|
<h3 class="twofa-modal-title">Change 2FA Code</h3>
|
|
<p class="twofa-modal-subtitle">Update your authenticator app</p>
|
|
</div>
|
|
</div>
|
|
<button class="twofa-modal-close" id="twofaModalClose">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="twofa-modal-body">
|
|
<div class="twofa-step" id="twofaStep1">
|
|
<div class="twofa-step-label">
|
|
<span class="twofa-step-num">1</span>
|
|
<span id="twofaStep1Text">Enter your current 2FA code</span>
|
|
</div>
|
|
<input type="text" class="twofa-input" id="currentCodeInput" placeholder="000000" maxlength="6"
|
|
autocomplete="off">
|
|
<div class="forgot-code-link" id="twofaForgotLink">
|
|
You don't have the code? <span class="forgot-code-click">Click here</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="twofa-step" id="qrCodeSection" style="display:none;">
|
|
<div class="twofa-step-label">
|
|
<span class="twofa-step-num">2</span>
|
|
Scan this new QR code with your authenticator
|
|
</div>
|
|
<div class="twofa-qr-wrap">
|
|
<img id="newQrCode" src="" alt="New 2FA QR Code">
|
|
<div class="twofa-qr-hint">Scan with Google Authenticator, Authy, etc.</div>
|
|
</div>
|
|
<div class="twofa-secret-display" style="user-select: text !important; -webkit-user-select: text !important; cursor: text !important;">
|
|
<span class="twofa-secret-code" id="newSecretDisplay" style="user-select: text !important; -webkit-user-select: text !important; cursor: text !important;">—</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="twofa-step" id="confirmSection" style="display:none;">
|
|
<div class="twofa-step-label">
|
|
<span class="twofa-step-num">3</span>
|
|
Enter the code from your new authenticator
|
|
</div>
|
|
<input type="text" class="twofa-input" id="newCodeInput" placeholder="000000" maxlength="6"
|
|
autocomplete="off">
|
|
</div>
|
|
|
|
<div class="twofa-error" id="twofaError"></div>
|
|
<div class="twofa-success" id="twofaSuccess">
|
|
<i class="fa-solid fa-check-circle"></i> 2FA has been successfully updated!
|
|
</div>
|
|
</div>
|
|
|
|
<div class="twofa-modal-footer">
|
|
<button class="twofa-btn twofa-btn-cancel" id="twofaCancelBtn">Cancel</button>
|
|
<button class="twofa-btn twofa-btn-confirm" id="twofaConfirmBtn">Verify Current Code</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<template id="empty-state">
|
|
<div class="empty-state">
|
|
<i class="fa-solid fa-wand-magic-sparkles empty-state__icon"></i>
|
|
<h4>No servers found</h4>
|
|
<p>
|
|
|
|
Try adjusting your search or create a new server.
|
|
|
|
</p>
|
|
</div>
|
|
</template>
|
|
|
|
|
|
<script nonce="x" data-cfasync="false" src="/js/socket.io.min.js?v=4.8.3"></script>
|
|
<script nonce="x" data-cfasync="false" src="/js/ssh-terminal-window.js?v=20260924-ssh-terminal-per-tab-1" defer></script>
|
|
<script nonce="x" data-cfasync="false" src="/js/dashboard.js?v=20260926-avatar-upload-guard1" defer></script>
|
|
|
|
<div class="christmas-modal" id="christmasModal">
|
|
<div class="christmas-glass-layer christmas-glass-layer-1"></div>
|
|
<div class="christmas-glass-layer christmas-glass-layer-3"></div>
|
|
<div class="christmas-popup">
|
|
<button class="christmas-close" id="christmasClose" type="button" aria-label="Close">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
<div class="christmas-content">
|
|
<div class="christmas-brand">
|
|
<img src="/images/adpanel-dark.svg" alt="ADPanel Christmas"
|
|
class="christmas-logo" />
|
|
<span class="christmas-title">ADPanel</span>
|
|
</div>
|
|
<p class="christmas-message">Wish you merry christmas!</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="newyear-modal" id="newyearModal">
|
|
<div class="newyear-glass-layer newyear-glass-layer-1"></div>
|
|
<div class="newyear-glass-layer newyear-glass-layer-3"></div>
|
|
<div class="newyear-popup">
|
|
<button class="newyear-close" id="newyearClose" type="button" aria-label="Close">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
<div class="newyear-content">
|
|
<div class="newyear-brand">
|
|
<img src="/images/adpanel-dark.svg" alt="ADPanel"
|
|
class="newyear-logo" />
|
|
<span class="newyear-title">ADPanel</span>
|
|
</div>
|
|
<p class="newyear-message">You are here to build amazing things 1 more year with ADPanel</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style nonce="x">
|
|
.christmas-modal {
|
|
position: fixed;
|
|
inset: 0;
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 100000;
|
|
perspective: 1200px;
|
|
}
|
|
|
|
.christmas-modal.show {
|
|
display: flex;
|
|
}
|
|
|
|
.christmas-glass-layer {
|
|
position: absolute;
|
|
inset: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.christmas-glass-layer-1 {
|
|
background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.85) 100%);
|
|
opacity: 0;
|
|
animation: christmasLayer1In 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
}
|
|
|
|
.christmas-glass-layer-3 {
|
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 30%, transparent 70%, rgba(255, 255, 255, 0.01) 100%);
|
|
opacity: 0;
|
|
backdrop-filter: blur(8px);
|
|
-webkit-backdrop-filter: blur(8px);
|
|
animation: christmasLayer3In 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
|
|
}
|
|
|
|
@keyframes christmasLayer1In {
|
|
from {
|
|
opacity: 0;
|
|
filter: blur(20px);
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
filter: blur(0);
|
|
}
|
|
}
|
|
|
|
@keyframes christmasLayer3In {
|
|
from {
|
|
opacity: 0;
|
|
filter: blur(10px);
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
filter: blur(0);
|
|
}
|
|
}
|
|
|
|
.christmas-popup {
|
|
position: relative;
|
|
background: linear-gradient(135deg, rgba(20, 25, 30, 0.95) 0%, rgba(15, 18, 22, 0.98) 100%);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 20px;
|
|
padding: 40px 50px;
|
|
min-width: 320px;
|
|
max-width: 90vw;
|
|
text-align: center;
|
|
transform: translateY(30px) scale(0.95);
|
|
opacity: 0;
|
|
animation: christmasPopupIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
|
|
box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
|
|
}
|
|
|
|
@keyframes christmasPopupIn {
|
|
to {
|
|
transform: translateY(0) scale(1);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.christmas-close {
|
|
position: absolute;
|
|
top: 16px;
|
|
right: 16px;
|
|
width: 32px;
|
|
height: 32px;
|
|
border: none;
|
|
background: rgba(255, 255, 255, 0.06);
|
|
border-radius: 8px;
|
|
color: rgba(255, 255, 255, 0.6);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 14px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.christmas-close:hover {
|
|
background: rgba(255, 255, 255, 0.12);
|
|
color: #fff;
|
|
}
|
|
|
|
.christmas-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 20px;
|
|
}
|
|
|
|
.christmas-brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.christmas-logo {
|
|
width: 64px;
|
|
height: 64px;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.christmas-title {
|
|
font-family: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
font-size: 32px;
|
|
font-weight: 800;
|
|
color: #fff;
|
|
letter-spacing: -0.5px;
|
|
}
|
|
|
|
.christmas-message {
|
|
font-family: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
font-size: 18px;
|
|
color: rgba(255, 255, 255, 0.8);
|
|
margin: 0;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.newyear-modal {
|
|
position: fixed;
|
|
inset: 0;
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 100000;
|
|
perspective: 1200px;
|
|
}
|
|
|
|
.newyear-modal.show {
|
|
display: flex;
|
|
}
|
|
|
|
.newyear-glass-layer {
|
|
position: absolute;
|
|
inset: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.newyear-glass-layer-1 {
|
|
background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.85) 100%);
|
|
opacity: 0;
|
|
animation: newyearLayer1In 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
}
|
|
|
|
.newyear-glass-layer-3 {
|
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 30%, transparent 70%, rgba(255, 255, 255, 0.01) 100%);
|
|
opacity: 0;
|
|
backdrop-filter: blur(8px);
|
|
-webkit-backdrop-filter: blur(8px);
|
|
animation: newyearLayer3In 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
|
|
}
|
|
|
|
@keyframes newyearLayer1In {
|
|
from {
|
|
opacity: 0;
|
|
filter: blur(20px);
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
filter: blur(0);
|
|
}
|
|
}
|
|
|
|
@keyframes newyearLayer3In {
|
|
from {
|
|
opacity: 0;
|
|
filter: blur(10px);
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
filter: blur(0);
|
|
}
|
|
}
|
|
|
|
.newyear-popup {
|
|
position: relative;
|
|
background: linear-gradient(135deg, rgba(20, 25, 30, 0.95) 0%, rgba(15, 18, 22, 0.98) 100%);
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 20px;
|
|
padding: 40px 50px;
|
|
min-width: 320px;
|
|
max-width: 90vw;
|
|
text-align: center;
|
|
transform: translateY(30px) scale(0.95);
|
|
opacity: 0;
|
|
animation: newyearPopupIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
|
|
box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
|
|
}
|
|
|
|
@keyframes newyearPopupIn {
|
|
to {
|
|
transform: translateY(0) scale(1);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.newyear-close {
|
|
position: absolute;
|
|
top: 16px;
|
|
right: 16px;
|
|
width: 32px;
|
|
height: 32px;
|
|
border: none;
|
|
background: rgba(255, 255, 255, 0.06);
|
|
border-radius: 8px;
|
|
color: rgba(255, 255, 255, 0.6);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 14px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.newyear-close:hover {
|
|
background: rgba(255, 255, 255, 0.12);
|
|
color: #fff;
|
|
}
|
|
|
|
.newyear-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 20px;
|
|
}
|
|
|
|
.newyear-brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.newyear-logo {
|
|
width: 64px;
|
|
height: 64px;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.newyear-title {
|
|
font-family: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
font-size: 32px;
|
|
font-weight: 800;
|
|
color: #fff;
|
|
letter-spacing: -0.5px;
|
|
}
|
|
|
|
.newyear-message {
|
|
font-family: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
font-size: 18px;
|
|
color: rgba(255, 255, 255, 0.8);
|
|
margin: 0;
|
|
font-weight: 500;
|
|
}
|
|
</style>
|
|
|
|
<script nonce="x">
|
|
(function () {
|
|
const CHRISTMAS_IMG = '/images/ADPanel-christmas.png';
|
|
const NORMAL_IMG = '/images/ADPanel-dark.png';
|
|
|
|
function isChristmasPeriod() {
|
|
const now = new Date();
|
|
const month = now.getMonth();
|
|
const day = now.getDate();
|
|
return month === 11 && day >= 25 && day <= 28;
|
|
}
|
|
|
|
function isChristmasDay() {
|
|
const now = new Date();
|
|
return now.getMonth() === 11 && now.getDate() === 25;
|
|
}
|
|
|
|
function applyChristmasTheme() {
|
|
if (!isChristmasPeriod()) return;
|
|
|
|
const favicon = document.getElementById('favicon') || document.querySelector('link[rel="icon"]');
|
|
if (favicon) favicon.href = CHRISTMAS_IMG;
|
|
|
|
document.querySelectorAll('img').forEach(img => {
|
|
// adpanel:login-dead-assets — the i.imgur.com legacy-CDN default-logo
|
|
// match was removed 2026-11 with the CDN-surface retirement: kept
|
|
// term-consistent with views/index.ejs (this snapshot mirrors it).
|
|
// The ADPanel-owned default-logo match is the case-insensitive,
|
|
// basename-anchored test /(^|\/)adpanel-dark\.(svg|webp)(\?|$)/i,
|
|
// restored to life 2026-11: it themes both shipped spellings of
|
|
// the default logo (the shipped remote-CDN .../adpanel-dark.svg
|
|
// logoUrl and the local /images/adpanel-dark.svg fallback) while
|
|
// an operator's custom upload or avatar is never clobbered — the
|
|
// anchors are load-bearing: an unanchored substring match would
|
|
// also theme URLs that merely EMBED the default filename (e.g.
|
|
// .../logos/adpanel-dark.svg.png, or a proxy URL carrying the
|
|
// name as a query param), so any src whose basename is not
|
|
// exactly the ADPanel-owned default filename never matches. The
|
|
// old ADPanel-dark.webp-only includes() was dead against the
|
|
// shipped svg default.
|
|
if (img.src && /(^|\/)adpanel-dark\.(svg|webp)(\?|$)/i.test(img.src)) {
|
|
img.src = CHRISTMAS_IMG;
|
|
}
|
|
});
|
|
}
|
|
|
|
function showChristmasPopup() {
|
|
if (!isChristmasDay()) return;
|
|
|
|
const today = new Date().toDateString();
|
|
const seenKey = 'ADPanel_christmas_seen_' + today;
|
|
if (localStorage.getItem(seenKey)) return;
|
|
|
|
const modal = document.getElementById('christmasModal');
|
|
if (!modal) return;
|
|
|
|
modal.classList.add('show');
|
|
localStorage.setItem(seenKey, 'true');
|
|
|
|
const closeBtn = document.getElementById('christmasClose');
|
|
if (closeBtn) {
|
|
closeBtn.addEventListener('click', () => modal.classList.remove('show'));
|
|
}
|
|
|
|
modal.addEventListener('click', (e) => {
|
|
if (e.target === modal || e.target.classList.contains('christmas-glass-layer')) {
|
|
modal.classList.remove('show');
|
|
}
|
|
});
|
|
}
|
|
|
|
function isNewYearDay() {
|
|
const now = new Date();
|
|
return now.getMonth() === 0 && now.getDate() === 1;
|
|
}
|
|
|
|
function showNewYearPopup() {
|
|
if (!isNewYearDay()) return;
|
|
|
|
const today = new Date().toDateString();
|
|
const seenKey = 'ADPanel_newyear_seen_' + today;
|
|
if (localStorage.getItem(seenKey)) return;
|
|
|
|
const modal = document.getElementById('newyearModal');
|
|
if (!modal) return;
|
|
|
|
modal.classList.add('show');
|
|
localStorage.setItem(seenKey, 'true');
|
|
|
|
const closeBtn = document.getElementById('newyearClose');
|
|
if (closeBtn) {
|
|
closeBtn.addEventListener('click', () => modal.classList.remove('show'));
|
|
}
|
|
|
|
modal.addEventListener('click', (e) => {
|
|
if (e.target === modal || e.target.classList.contains('newyear-glass-layer')) {
|
|
modal.classList.remove('show');
|
|
}
|
|
});
|
|
}
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
applyChristmasTheme();
|
|
showChristmasPopup();
|
|
showNewYearPopup();
|
|
});
|
|
})();
|
|
</script>
|
|
<script nonce="x" data-cfasync="false" src="/js/dashboard-assistant.js?v=20261003-assistant-delete-intent-ptt-v48" defer></script>
|
|
<div style="text-align: center; margin: 40px 0 20px 0; color: rgba(255, 255, 255, 0.4); font-size: 13px; font-weight: 500;">
|
|
© 2026-2026 ADPanel Dashboard
|
|
</div>
|
|
|
|
<script nonce="x">
|
|
(function () {
|
|
if (window.matchMedia('(hover: none) and (pointer: coarse)').matches) return;
|
|
|
|
// passive:false support (Safari <10)
|
|
var canPF = false;
|
|
try {
|
|
var _o = Object.defineProperty({}, 'passive', { get: function(){ canPF = true; }});
|
|
window.addEventListener('_', null, _o); window.removeEventListener('_', null, _o);
|
|
} catch(_){}
|
|
var PF = canPF ? { passive: false } : false;
|
|
var PT = canPF ? { passive: true } : false;
|
|
|
|
// ── State ─────────────────────────────────────────────────────────────
|
|
var y = window.scrollY || window.pageYOffset; // animated float
|
|
var dest = y; // target destination
|
|
var raf = null;
|
|
var prevT = null;
|
|
|
|
// After wheel stops, coast for COAST_MS then ease to a stop
|
|
var COAST_MS = 200;
|
|
var coastT = null;
|
|
var coasting = false; // true = decelerating after user stopped
|
|
|
|
// Lerp strength: lower = smoother/slower, higher = snappier
|
|
// Active scroll: tight follow. Coasting: loose glide.
|
|
var LERP_ACTIVE = 0.22;
|
|
var LERP_COAST = 0.10;
|
|
|
|
function clamp(v) {
|
|
return Math.max(0, Math.min(document.body.scrollHeight - window.innerHeight, v));
|
|
}
|
|
|
|
// ── RAF loop ──────────────────────────────────────────────────────────
|
|
function loop(now) {
|
|
if (prevT === null) prevT = now;
|
|
var dt = Math.min(now - prevT, 50) / 16.667;
|
|
prevT = now;
|
|
|
|
var lerp = coasting ? LERP_COAST : LERP_ACTIVE;
|
|
var f = 1 - Math.pow(1 - lerp, dt);
|
|
var diff = dest - y;
|
|
|
|
if (Math.abs(diff) < 0.25) {
|
|
y = dest;
|
|
window.scrollTo(0, y);
|
|
raf = null; prevT = null; coasting = false;
|
|
return;
|
|
}
|
|
|
|
y += diff * f;
|
|
window.scrollTo(0, y);
|
|
raf = requestAnimationFrame(loop);
|
|
}
|
|
|
|
function go() {
|
|
if (!raf) { prevT = null; raf = requestAnimationFrame(loop); }
|
|
}
|
|
|
|
// ── Helpers ───────────────────────────────────────────────────────────
|
|
function scrollableAncestor(el) {
|
|
while (el && el !== document.body) {
|
|
var ov = getComputedStyle(el).overflowY;
|
|
if ((ov === 'auto' || ov === 'scroll') && el.scrollHeight > el.clientHeight) return true;
|
|
el = el.parentElement;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function interactive(el) {
|
|
var TAGS = { BUTTON:1, A:1, INPUT:1, TEXTAREA:1, SELECT:1, LABEL:1 };
|
|
while (el && el !== document.body) {
|
|
if (TAGS[el.tagName]) return true;
|
|
var role = el.getAttribute && el.getAttribute('role');
|
|
if (role === 'button' || role === 'link') return true;
|
|
el = el.parentElement;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ── Wheel ─────────────────────────────────────────────────────────────
|
|
window.addEventListener('wheel', function(e) {
|
|
if (e.ctrlKey || e.metaKey) return;
|
|
if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) return;
|
|
if (scrollableAncestor(e.target)) return;
|
|
e.preventDefault();
|
|
|
|
var d = e.deltaY;
|
|
if (e.deltaMode === 1) d *= 32;
|
|
else if (e.deltaMode === 2) d *= window.innerHeight;
|
|
|
|
// Move dest by exactly what the browser would — no amplification
|
|
dest = clamp(dest + d);
|
|
coasting = false;
|
|
|
|
// After COAST_MS of silence, switch to loose lerp for a smooth finish
|
|
clearTimeout(coastT);
|
|
coastT = setTimeout(function() {
|
|
coasting = true;
|
|
}, COAST_MS);
|
|
|
|
go();
|
|
}, PF);
|
|
|
|
// ── Drag-to-scroll ────────────────────────────────────────────────────
|
|
var drag = null;
|
|
|
|
document.addEventListener('mousedown', function(e) {
|
|
if (e.button !== 0) return;
|
|
if (interactive(e.target)) return;
|
|
if (scrollableAncestor(e.target)) return;
|
|
|
|
dest = y;
|
|
drag = { startY: e.clientY, startScroll: y, lastY: e.clientY, lastT: performance.now(), vel: 0 };
|
|
clearTimeout(coastT); coasting = false;
|
|
document.body.style.userSelect = 'none';
|
|
document.body.style.cursor = 'grabbing';
|
|
e.preventDefault();
|
|
}, PF);
|
|
|
|
document.addEventListener('mousemove', function(e) {
|
|
if (!drag) return;
|
|
var now = performance.now();
|
|
var dt = now - drag.lastT || 1;
|
|
drag.vel = (e.clientY - drag.lastY) / dt;
|
|
drag.lastY = e.clientY;
|
|
drag.lastT = now;
|
|
|
|
y = clamp(drag.startScroll + (drag.startY - e.clientY));
|
|
dest = y;
|
|
window.scrollTo(0, y);
|
|
}, PT);
|
|
|
|
function endDrag() {
|
|
if (!drag) return;
|
|
document.body.style.userSelect = '';
|
|
document.body.style.cursor = '';
|
|
// Throw with momentum, then coast to stop
|
|
var throw_ = -drag.vel * 16.667 * 1.2;
|
|
dest = clamp(y + throw_);
|
|
coasting = true;
|
|
drag = null;
|
|
if (Math.abs(throw_) > 1) go();
|
|
}
|
|
|
|
document.addEventListener('mouseup', endDrag);
|
|
document.addEventListener('mouseleave', endDrag);
|
|
|
|
// Sync when external code scrolls (scrollIntoView, account page, etc.)
|
|
window.addEventListener('scroll', function() {
|
|
if (!raf && !drag) {
|
|
y = window.scrollY || window.pageYOffset;
|
|
dest = y;
|
|
}
|
|
}, PT);
|
|
})();
|
|
</script>
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|