Fix: apply .gitignore and remove untracked files

This commit is contained in:
antonn committed 2026-05-08 19:09:25 +00:00
commit b0bf3b7167
94 files changed
+123744

No files matched your search

+316
View File
@@ -0,0 +1,316 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= (branding && branding.appName) ? branding.appName : 'ADPanel' %> - Not Found</title>
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<link rel="icon" type="image/webp" href="<%= (branding && branding.faviconUrl) ? branding.faviconUrl : '/auth-assets/favicon' %>">
<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">
<style nonce="<%= cspNonce %>">
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
height: 100%;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
background: #0a0c10;
color: #fff;
overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
img {
-webkit-user-drag: none;
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
user-drag: none;
pointer-events: none;
}
.page-container {
min-height: 100vh;
display: flex;
flex-direction: column;
position: relative;
}
.grid-pattern {
position: fixed;
inset: 0;
background-image:
linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
background-size: 60px 60px;
pointer-events: none;
z-index: 0;
}
.orb {
position: fixed;
border-radius: 50%;
filter: blur(80px);
pointer-events: none;
z-index: 0;
}
.orb-1 {
width: 500px;
height: 500px;
background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
top: 20%;
left: 10%;
}
.orb-2 {
width: 400px;
height: 400px;
background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
bottom: 10%;
right: 15%;
}
.orb-3 {
width: 300px;
height: 300px;
background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
top: 60%;
left: 60%;
}
.geo-shape {
position: fixed;
border: 1px solid rgba(255, 255, 255, 0.04);
pointer-events: none;
z-index: 0;
}
.geo-1 {
width: 200px;
height: 200px;
border-radius: 24px;
top: 15%;
right: 20%;
transform: rotate(15deg);
}
.geo-2 {
width: 120px;
height: 120px;
border-radius: 50%;
bottom: 25%;
left: 15%;
}
.geo-3 {
width: 80px;
height: 80px;
border-radius: 16px;
top: 70%;
right: 10%;
transform: rotate(-20deg);
}
.geo-4 {
width: 60px;
height: 60px;
border-radius: 50%;
top: 30%;
left: 8%;
background: rgba(99, 102, 241, 0.03);
}
.header {
padding: 32px 0 0 48px;
position: relative;
z-index: 10;
}
.header-logo {
width: 65px;
height: auto;
pointer-events: auto;
}
.header a {
display: inline-block;
pointer-events: auto;
}
.main-content {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 0 40px;
margin-top: -60px;
position: relative;
z-index: 10;
}
.error-wrapper {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
.error-code {
font-size: 220px;
font-weight: 800;
line-height: 1;
letter-spacing: -0.06em;
position: relative;
display: inline-block;
background: linear-gradient(to top,
rgba(255, 255, 255, 1) 0%,
rgba(255, 255, 255, 1) 10%,
rgba(255, 255, 255, 0.4) 30%,
rgba(255, 255, 255, 0) 80%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
.error-title {
font-size: 28px;
font-weight: 600;
color: rgba(255, 255, 255, 0.9);
margin-top: 16px;
margin-bottom: 32px;
}
.back-btn {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 16px 32px;
background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
color: #fff;
font-size: 15px;
font-weight: 600;
border: none;
border-radius: 14px;
text-decoration: none;
cursor: pointer;
transition: transform 0.2s ease, opacity 0.2s ease;
pointer-events: auto;
}
.back-btn:hover {
transform: scale(1.05);
opacity: 0.95;
}
.back-btn:active {
transform: scale(0.98);
}
.back-btn i {
font-size: 16px;
}
.deco-line {
position: fixed;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
height: 1px;
pointer-events: none;
z-index: 0;
}
.deco-line-1 {
width: 40%;
top: 30%;
left: 0;
}
.deco-line-2 {
width: 30%;
bottom: 35%;
right: 0;
}
.deco-line-3 {
width: 25%;
top: 65%;
left: 10%;
}
.corner-accent {
position: fixed;
width: 100px;
height: 100px;
pointer-events: none;
z-index: 0;
}
.corner-accent-tl {
top: 0;
left: 0;
border-top: 1px solid rgba(255, 255, 255, 0.03);
border-left: 1px solid rgba(255, 255, 255, 0.03);
border-top-left-radius: 20px;
}
.corner-accent-br {
bottom: 0;
right: 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
border-right: 1px solid rgba(255, 255, 255, 0.03);
border-bottom-right-radius: 20px;
}
body {
-webkit-touch-callout: none;
}
</style>
</head>
<body oncontextmenu="return false;">
<div class="grid-pattern"></div>
<div class="orb orb-1"></div>
<div class="orb orb-2"></div>
<div class="orb orb-3"></div>
<div class="geo-shape geo-1"></div>
<div class="geo-shape geo-2"></div>
<div class="geo-shape geo-3"></div>
<div class="geo-shape geo-4"></div>
<div class="deco-line deco-line-1"></div>
<div class="deco-line deco-line-2"></div>
<div class="deco-line deco-line-3"></div>
<div class="corner-accent corner-accent-tl"></div>
<div class="corner-accent corner-accent-br"></div>
<div class="page-container">
<header class="header">
<a href="/">
<img src="https://cdn.jsdelivr.net/gh/antonndev/ADCDn/adpanel-dark.webp" alt="ADPanel" class="header-logo"
draggable="false">
</a>
</header>
<main class="main-content">
<div class="error-wrapper">
<div class="error-code">404</div>
<div class="error-title">Not Found</div>
<a href="/" class="back-btn">
<i class="fa-solid fa-arrow-left"></i>
<span>Back to Dashboard</span>
</a>
</div>
</main>
</div>
</body>
</html>
+158
View File
@@ -0,0 +1,158 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%= (branding && branding.appName) ? branding.appName : 'ADPanel' %> - Access Denied</title>
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/css/bot.css?v=<%= typeof themeVersion !== 'undefined' ? themeVersion : Date.now() %>">
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<link id="favicon" rel="icon" type="image/webp" href="<%= (branding && branding.faviconUrl) ? branding.faviconUrl : '/auth-assets/favicon' %>" />
<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" />
<style nonce="<%= cspNonce %>">
*,
*::before,
*::after {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
img,
video,
canvas {
-webkit-user-drag: none;
user-drag: none;
}
</style>
<script nonce="<%= cspNonce %>">
document.addEventListener('contextmenu', e => e.preventDefault());
document.addEventListener('dragstart', e => e.preventDefault());
document.addEventListener('selectstart', e => e.preventDefault());
document.addEventListener('copy', e => e.preventDefault());
document.addEventListener('cut', e => e.preventDefault());
document.addEventListener('keydown', e => {
if ((e.ctrlKey || e.metaKey) && ['c', 'C', 'a', 'A', 's', 'S', 'u', 'U'].includes(e.key)) e.preventDefault();
});
</script>
</head>
<body>
<div class="access-denied-container">
<div class="access-denied-particles">
<div class="access-denied-particle"></div>
<div class="access-denied-particle"></div>
<div class="access-denied-particle"></div>
<div class="access-denied-particle"></div>
<div class="access-denied-particle"></div>
<div class="access-denied-particle"></div>
<div class="access-denied-particle"></div>
<div class="access-denied-particle"></div>
<div class="access-denied-particle"></div>
</div>
<div class="access-denied-card">
<div class="access-denied-decor access-denied-decor-1"></div>
<div class="access-denied-decor access-denied-decor-2"></div>
<div class="sad-robot-container">
<svg class="sad-robot" viewBox="0 0 130 140" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="robot-head-gradient" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color:#4b5563" />
<stop offset="50%" style="stop-color:#374151" />
<stop offset="100%" style="stop-color:#1f2937" />
</linearGradient>
<linearGradient id="robot-body-gradient" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color:#374151" />
<stop offset="100%" style="stop-color:#1f2937" />
</linearGradient>
<filter id="glow">
<feGaussianBlur stdDeviation="3" result="coloredBlur" />
<feMerge>
<feMergeNode in="coloredBlur" />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
</defs>
<ellipse class="sad-robot-shadow" cx="65" cy="135" rx="35" ry="5" />
<rect class="sad-robot-antenna" x="62" y="15" width="6" height="15" rx="2" />
<circle class="sad-robot-antenna-ball" cx="65" cy="12" r="8" filter="url(#glow)" />
<rect class="sad-robot-head" x="25" y="30" width="80" height="65" rx="12" fill="url(#robot-head-gradient)" />
<rect x="32" y="40" width="66" height="45" rx="8" fill="#1e293b" opacity="0.6" />
<g class="sad-robot-eye" transform-origin="50 58">
<ellipse cx="50" cy="58" rx="10" ry="12" fill="#1e293b" />
<ellipse class="sad-robot-eye-glow" cx="50" cy="58" rx="6" ry="8" fill="#ef4444" />
<ellipse cx="48" cy="55" rx="2" ry="2" fill="#fff" opacity="0.6" />
</g>
<g class="sad-robot-eye" transform-origin="80 58">
<ellipse cx="80" cy="58" rx="10" ry="12" fill="#1e293b" />
<ellipse class="sad-robot-eye-glow" cx="80" cy="58" rx="6" ry="8" fill="#ef4444" />
<ellipse cx="78" cy="55" rx="2" ry="2" fill="#fff" opacity="0.6" />
</g>
<path d="M 40 48 Q 50 52 58 48" stroke="#6b7280" stroke-width="2" fill="none" stroke-linecap="round" />
<path d="M 72 48 Q 80 52 90 48" stroke="#6b7280" stroke-width="2" fill="none" stroke-linecap="round" />
<path class="sad-robot-mouth" d="M 50 78 Q 65 68 80 78" stroke="#374151" stroke-width="3" fill="none"
stroke-linecap="round" />
<g class="sad-robot-tear" transform-origin="50 70">
<ellipse cx="50" cy="72" rx="3" ry="5" fill="#60a5fa" />
</g>
<g class="sad-robot-tear" transform-origin="80 70">
<ellipse cx="80" cy="72" rx="3" ry="5" fill="#60a5fa" />
</g>
<rect x="35" y="100" width="60" height="30" rx="6" fill="url(#robot-body-gradient)" />
<circle cx="55" cy="112" r="4" fill="#4b5563" />
<circle cx="75" cy="112" r="4" fill="#4b5563" />
<rect x="50" y="120" width="30" height="4" rx="2" fill="#4b5563" />
<rect x="15" y="50" width="10" height="20" rx="3" fill="#374151" />
<rect x="105" y="50" width="10" height="20" rx="3" fill="#374151" />
</svg>
</div>
<h1 class="access-denied-code">403</h1>
<h2 class="access-denied-title">No Access</h2>
<div class="access-denied-divider"></div>
<p class="access-denied-message">
You're logged in, but your account is not allowed<br>
to view or control this server.
</p>
<div class="access-denied-server">
<i class="fa-solid fa-server"></i>
<span>
<%= typeof bot !=='undefined' ? bot : 'Unknown Server' %>
</span>
</div>
<a href="/" class="access-denied-btn">
<i class="fa-solid fa-arrow-left"></i>
<span>Back to Home</span>
</a>
<div class="access-denied-footer">
<p class="access-denied-footer-text">
<i class="fa-solid fa-shield-halved"></i>
Contact an administrator if you believe this is an error
</p>
</div>
</div>
</div>
</body>
</html>
+2093
View File
File diff suppressed because it is too large. Load diff
+187
View File
@@ -0,0 +1,187 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Opening <%= serviceLabel %>...</title>
<style>
:root {
color-scheme: light;
}
html, body {
margin: 0;
padding: 0;
font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
background: #0b1220;
color: #e7eefc;
height: 100%;
}
.wrap {
min-height: 100%;
display: grid;
place-items: center;
padding: 24px;
box-sizing: border-box;
}
.card {
width: min(560px, 100%);
background: linear-gradient(160deg, rgba(18, 28, 48, 0.96), rgba(13, 20, 34, 0.98));
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 16px;
padding: 24px;
box-sizing: border-box;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}
.title {
font-size: 20px;
font-weight: 700;
margin: 0 0 8px;
letter-spacing: 0.2px;
}
.subtitle {
margin: 0;
color: #b6c5e5;
font-size: 14px;
line-height: 1.55;
}
.status {
margin-top: 18px;
display: flex;
align-items: center;
gap: 10px;
color: #d5e2ff;
font-size: 14px;
}
.spinner {
width: 16px;
height: 16px;
border-radius: 999px;
border: 2px solid rgba(255, 255, 255, 0.26);
border-top-color: #8fc8ff;
animation: spin 0.9s linear infinite;
}
.error {
margin-top: 16px;
display: none;
color: #ffd4d4;
background: rgba(255, 80, 80, 0.14);
border: 1px solid rgba(255, 80, 80, 0.28);
border-radius: 10px;
padding: 10px 12px;
font-size: 13px;
line-height: 1.5;
white-space: pre-wrap;
word-break: break-word;
}
.actions {
margin-top: 16px;
display: none;
gap: 10px;
flex-wrap: wrap;
}
.btn {
border: 0;
border-radius: 10px;
padding: 10px 14px;
color: #eaf1ff;
background: #2a3c5f;
text-decoration: none;
font-size: 13px;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 8px;
}
.btn.secondary {
background: #192742;
border: 1px solid rgba(255, 255, 255, 0.14);
}
@keyframes spin {
to { transform: rotate(360deg); }
}
</style>
</head>
<body>
<div class="wrap">
<div class="card" data-service="<%= service %>">
<h1 class="title">Opening <%= serviceLabel %></h1>
<p class="subtitle">Generating a secure one-time link and preparing a safe session for this tab.</p>
<div class="status"><span class="spinner"></span><span id="statusText">Requesting secure token...</span></div>
<div id="errorBox" class="error"></div>
<div id="actionBox" class="actions">
<button id="retryBtn" class="btn" type="button">Retry</button>
<a class="btn secondary" href="/settings">Back to Settings</a>
</div>
</div>
</div>
<script nonce="<%= cspNonce %>">
(function () {
'use strict';
const card = document.querySelector('.card');
const service = String(card?.dataset?.service || '').trim();
const statusText = document.getElementById('statusText');
const errorBox = document.getElementById('errorBox');
const actionBox = document.getElementById('actionBox');
const retryBtn = document.getElementById('retryBtn');
async function start() {
if (!service) {
showError('Missing service identifier.');
return;
}
setStatus('Requesting secure token...');
hideError();
try {
const res = await fetch('/api/settings/database/access-token', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ service })
});
const payload = await res.json().catch(function () { return {}; });
if (!res.ok || !payload || !payload.url) {
throw new Error(payload?.error || 'Failed to generate secure link.');
}
setStatus('Redirecting to secure session...');
window.location.replace(payload.url);
} catch (err) {
showError(err && err.message ? err.message : 'Unexpected error while opening database tool.');
}
}
function setStatus(msg) {
if (statusText) statusText.textContent = msg;
}
function showError(msg) {
setStatus('Unable to open secure session.');
if (errorBox) {
errorBox.style.display = 'block';
errorBox.textContent = msg;
}
if (actionBox) actionBox.style.display = 'flex';
}
function hideError() {
if (errorBox) {
errorBox.style.display = 'none';
errorBox.textContent = '';
}
if (actionBox) actionBox.style.display = 'none';
}
if (retryBtn) {
retryBtn.addEventListener('click', function () {
start();
});
}
start();
})();
</script>
</body>
</html>
+74
View File
@@ -0,0 +1,74 @@
<!DOCTYPE html>
<head>
<title>Forgot password?</title>
<link id="favicon" rel="icon" type="image/webp" href="<%= (branding && branding.faviconUrl) ? branding.faviconUrl : '/auth-assets/favicon' %>" />
<style nonce="<%= cspNonce %>">
strong {
background-color: gray;
color: white;
}
</style>
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<script nonce="<%= cspNonce %>">
(function () {
const CHRISTMAS_IMG = '/auth-assets/christmas-logo';
function isChristmasPeriod() {
const now = new Date();
const month = now.getMonth();
const day = now.getDate();
return month === 11 && day >= 25 && day <= 28;
}
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 => {
if (img.src && (img.src.includes('ADPanel-dark.webp') || img.src.includes('i.imgur.com/k5agjYf'))) {
img.src = CHRISTMAS_IMG;
}
});
}
document.addEventListener('DOMContentLoaded', applyChristmasTheme);
})();
</script>
<style nonce="<%= cspNonce %>">
*,
*::before,
*::after {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
img,
video,
canvas {
-webkit-user-drag: none;
user-drag: none;
}
</style>
<script nonce="<%= cspNonce %>">
document.addEventListener('contextmenu', e => e.preventDefault());
document.addEventListener('dragstart', e => e.preventDefault());
document.addEventListener('selectstart', e => e.preventDefault());
document.addEventListener('copy', e => e.preventDefault());
document.addEventListener('cut', e => e.preventDefault());
document.addEventListener('keydown', e => {
if ((e.ctrlKey || e.metaKey) && ['c', 'C', 'a', 'A', 's', 'S', 'u', 'U'].includes(e.key)) e.preventDefault();
});
</script>
</head>
<body>
<html>
<p>
[Dashboard] Due to security reasons you can only reset your password
directly from the terminal using the command
<strong>bash initialize.sh</strong> from the ADPanel directory or switching to an admin account and resetting it for the specific user from Accounts settings category.
</p>
<p>This panel version doesn't support change password feature directly from normal user UI.</p>
</html>
</body>
+1979
View File
File diff suppressed because it is too large. Load diff
+629
View File
@@ -0,0 +1,629 @@
<% const loginBackgroundType=(branding && branding.loginBackgroundType) ? branding.loginBackgroundType : 'video' ; const
loginBackgroundUrl='/auth-assets/background' ; const protectedLoginWatermarkUrl='/auth-assets/watermark' ; const
loginBackgroundMimeType=(branding && branding.loginBackgroundMimeType) ? branding.loginBackgroundMimeType
: 'video/webm' ; %>
<!DOCTYPE html>
<html lang="ro">
<head>
<meta charset="UTF-8" />
<title>Login - <%= (branding && branding.appName) ? branding.appName : 'Panel' %></title>
<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 id="favicon" rel="icon" type="image/webp" sizes="16x16"
href="<%= (branding && branding.faviconUrl) ? branding.faviconUrl : '/auth-assets/favicon' %>" />
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<% if (loginBackgroundType==='image' && loginBackgroundUrl) { %>
<link rel="preload" as="image" href="<%= loginBackgroundUrl %>" fetchpriority="high" />
<% } %>
<script nonce="<%= cspNonce %>">
(function () {
const CHRISTMAS_IMG = '/auth-assets/christmas-logo';
function isChristmasPeriod() {
const now = new Date();
const month = now.getMonth();
const day = now.getDate();
return month === 11 && day >= 25 && day <= 28;
}
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 => {
if (img.src && (img.src.includes('/auth-assets/logo') || img.src.includes('ADPanel-dark.webp') || img.src.includes('i.imgur.com/k5agjYf'))) {
img.src = CHRISTMAS_IMG;
}
});
}
document.addEventListener('DOMContentLoaded', applyChristmasTheme);
})();
</script>
<style nonce="<%= cspNonce %>">
<%- loginCss || "" %>
*,
*::before,
*::after {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
img,
video,
canvas {
-webkit-user-drag: none;
user-drag: none;
}
<% if (loginBackgroundType === 'image' && loginBackgroundUrl) { %>
body.login-body--image {
background-image: url(<%- JSON.stringify(String(loginBackgroundUrl)) %>);
}
<% } %>
</style>
<script nonce="<%= cspNonce %>">
document.addEventListener('contextmenu', e => e.preventDefault());
document.addEventListener('dragstart', e => e.preventDefault());
document.addEventListener('selectstart', e => e.preventDefault());
document.addEventListener('copy', e => e.preventDefault());
document.addEventListener('cut', e => e.preventDefault());
document.addEventListener('keydown', e => {
if ((e.ctrlKey || e.metaKey) && ['c', 'C', 'a', 'A', 's', 'S', 'u', 'U'].includes(e.key)) e.preventDefault();
});
</script>
</head>
<body class="<%= loginBackgroundType === 'image' && loginBackgroundUrl ? 'login-body--image' : '' %>">
<div id="toastHost" class="toast-host" aria-live="polite" aria-atomic="true"></div>
<script nonce="<%= cspNonce %>">
(() => {
const msg = <%- JSON.stringify(String(error || "")).replace(/</g, "\\u003c") %>;
if (!msg) return;
const host = document.getElementById("toastHost");
if (!host) return;
function showToast(text, duration = 4500) {
const toast = document.createElement("div");
toast.className = "toast";
toast.innerHTML = `
<div class="toast-inner">
<div class="toast-msg"></div>
<div class="toast-bar"></div>
</div>
`;
toast.querySelector(".toast-msg").textContent = text;
host.appendChild(toast);
requestAnimationFrame(() => toast.classList.add("toast-show"));
const leaveAt = Math.max(0, duration - 320);
setTimeout(() => toast.classList.add("toast-hide"), leaveAt);
setTimeout(() => toast.remove(), duration + 450);
}
showToast(msg, 4500);
})();
</script>
<% if (loginBackgroundType==='video' ) { %>
<video id="bgVideo" autoplay muted loop playsinline preload="metadata" class="video">
<source src="<%= loginBackgroundUrl %>" type="<%= loginBackgroundMimeType %>" />
Your browser does not support instant-video.
</video>
<% } %>
<form method="POST" action="/login" class="login-form">
<input type="text" name="company" tabindex="-1" autocomplete="off" aria-hidden="true" hidden>
<input type="hidden" name="botProof" id="botProofInput" value="<%= botProofSeed || '' %>" autocomplete="off">
<input type="hidden" name="_csrf" value="<%= csrfToken %>" autocomplete="off">
<div class="input-holder">
<i class="input-icon fa-solid fa-envelope" aria-hidden="true"></i>
<input class="login-input" type="email" name="email" placeholder="Email" required />
</div>
<div class="input-holder">
<i class="input-icon fa-solid fa-lock" aria-hidden="true"></i>
<input class="login-input" type="password" name="password" placeholder="Password" required />
</div>
<div class="input-holder">
<i class="input-icon fa-solid fa-fingerprint" aria-hidden="true"></i>
<input class="login-input" type="text" name="code" placeholder="2FA Code" required />
</div>
<input type="hidden" name="captchaToken" id="captchaTokenInput" value="" />
<button type="submit" class="get-started">
<span>Access</span>
<img class="get-started__logo" src="/auth-assets/logo" alt="D Logo" draggable="false" />
<span>Panel</span>
</button>
<a class="forgot-password" href="/forgot-password">Forgot password?</a>
<div class="circle-icon">
<i class="fa-solid fa-arrow-right-to-bracket circle-icon__glyph"></i>
</div>
</form>
<div id="captchaModal" class="captcha-modal<%= (useExternalCaptcha || showLocalCaptcha) ? ' show' : '' %>"
data-provider="<%= (externalCaptchaProvider || 'recaptcha').toLowerCase() %>"
data-challenge="<%= (useExternalCaptcha || showLocalCaptcha) ? '1' : '0' %>"
aria-hidden="<%= (useExternalCaptcha || showLocalCaptcha) ? 'false' : 'true' %>">
<div class="captcha-modal__backdrop"></div>
<div class="captcha-modal__card">
<div class="captcha-modal__title">
<i class="fa-solid fa-shield-halved captcha-modal__title-icon"></i>Security Verification
</div>
<div class="captcha-modal__desc">Complete the challenge below to continue</div>
<div class="captcha-modal__widget">
<div id="recaptchaWidget" hidden></div>
<div id="cf-turnstile" hidden></div>
</div>
<% if (showLocalCaptcha && captchaQuestion) { %>
<div id="localCaptchaUI" class="local-captcha" data-token="<%= captchaQuestion.token %>"
data-step="<%= captchaQuestion.step %>" data-total="<%= captchaQuestion.total %>">
<div class="local-captcha__prompt" id="captchaPrompt">
<%= captchaQuestion.prompt %>
</div>
<div class="local-captcha__grid" id="captchaGrid">
<% captchaQuestion.images.forEach(function(imgUrl, idx) { %>
<div class="local-captcha__cell" data-idx="<%= idx %>">
<img src="<%= imgUrl %>" alt="captcha image" draggable="false" loading="lazy" />
<div class="local-captcha__check"><i class="fa-solid fa-check"></i></div>
</div>
<% }); %>
</div>
<div class="local-captcha__footer">
<span class="local-captcha__step" id="captchaStep">Step <%= captchaQuestion.step %> of <%= captchaQuestion.total %></span>
<button type="button" id="captchaSubmitLocal" class="local-captcha__submit">Verify</button>
</div>
<div id="captchaLocalStatus" class="local-captcha__status"></div>
</div>
<% } %>
</div>
</div>
<div class="menu"></div>
<div class="sign-up-subline">
<a class="sign-up-sublines"> and make something special </a>
</div>
<div class="sign-ups">
<a class="sign-up-desc"> Securely manage your applications with style </a>
</div>
<div>
<a class="sign-up"> Sign in with email </a>
</div>
<div class="watermark" id="watermark">
<img
src="<%= protectedLoginWatermarkUrl %>"
alt="watermark is not available" draggable="false" />
</div>
<script nonce="<%= cspNonce %>">
(() => {
const cfg = {
enabled: <%- useExternalCaptcha ? "true" : "false" %>,
required: <%- externalCaptchaAutoStart ? "true" : "false" %>,
provider: <%- JSON.stringify((externalCaptchaProvider || "recaptcha").toLowerCase()) %>,
siteKey: <%- JSON.stringify(externalCaptchaSiteKey || "") %>,
hasError: <%- error ? "true" : "false" %>,
showLocal: <%- showLocalCaptcha ? "true" : "false" %>,
challengeActive: <%- (useExternalCaptcha || showLocalCaptcha) ? "true" : "false" %>,
};
const form = document.querySelector("form");
const modal = document.getElementById("captchaModal");
const tokenInput = document.getElementById("captchaTokenInput");
const recaptchaHost = document.getElementById("recaptchaWidget");
const turnstileHost = document.getElementById("cf-turnstile");
const statusEl = modal ? modal.querySelector(".captcha-modal__desc") : null;
const defaultStatusText = statusEl ? statusEl.textContent : "";
let recaptchaId = null;
let turnstileId = null;
let started = false;
let timeoutHandle = null;
const disableForm = () => {
if (!form) return;
form.querySelectorAll("input:not([type=hidden]), button[type=submit]").forEach(el => { el.disabled = true; });
form.classList.add("login-form--blocked");
};
const enableForm = () => {
if (!form) return;
form.querySelectorAll("input, button").forEach(el => { el.disabled = false; });
form.classList.remove("login-form--blocked");
};
const showModal = () => {
if (modal) modal.classList.add("show");
disableForm();
};
const hideModal = () => {
if (modal) {
modal.classList.remove("show");
modal.dataset.challenge = "0";
}
enableForm();
if (timeoutHandle) {
clearTimeout(timeoutHandle);
timeoutHandle = null;
}
};
const resetStatus = () => {
if (statusEl) statusEl.textContent = defaultStatusText;
};
const markTimeout = () => {
if (statusEl) {
statusEl.textContent = "Captcha unavailable. Try again.";
}
};
function renderRecaptcha() {
if (!cfg.enabled || recaptchaId !== null) return recaptchaId;
if (!window.grecaptcha || typeof window.grecaptcha.render !== "function") return null;
if (turnstileHost) turnstileHost.hidden = true;
if (recaptchaHost) recaptchaHost.hidden = false;
recaptchaId = window.grecaptcha.render("recaptchaWidget", {
sitekey: cfg.siteKey,
size: "normal",
theme: "dark",
callback: (token) => {
tokenInput.value = token || "";
if (timeoutHandle) { clearTimeout(timeoutHandle); timeoutHandle = null; }
fetch("/api/captcha/verify", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ token }),
credentials: "same-origin",
}).catch(() => { });
hideModal();
},
"expired-callback": () => { tokenInput.value = ""; },
"error-callback": () => { tokenInput.value = ""; },
});
if (timeoutHandle) { clearTimeout(timeoutHandle); timeoutHandle = null; }
resetStatus();
return recaptchaId;
}
function ensureRecaptcha(attempt = 0) {
if (recaptchaId === null) renderRecaptcha();
if (recaptchaId !== null) return;
if (attempt < 50) setTimeout(() => ensureRecaptcha(attempt + 1), 200);
}
function renderTurnstile() {
if (!cfg.enabled || turnstileId !== null) return turnstileId;
if (!window.turnstile || typeof window.turnstile.render !== "function") return null;
if (recaptchaHost) recaptchaHost.hidden = true;
if (turnstileHost) turnstileHost.hidden = false;
turnstileId = window.turnstile.render("#cf-turnstile", {
sitekey: cfg.siteKey,
size: "normal",
theme: "dark",
callback: (token) => {
tokenInput.value = token || "";
if (timeoutHandle) { clearTimeout(timeoutHandle); timeoutHandle = null; }
fetch("/api/captcha/verify", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ token }),
credentials: "same-origin",
}).catch(() => { });
hideModal();
},
"expired-callback": () => { tokenInput.value = ""; },
"error-callback": () => { tokenInput.value = ""; },
});
if (timeoutHandle) { clearTimeout(timeoutHandle); timeoutHandle = null; }
resetStatus();
return turnstileId;
}
function ensureTurnstile(attempt = 0) {
if (turnstileId === null) renderTurnstile();
if (turnstileId !== null) return;
if (attempt < 50) setTimeout(() => ensureTurnstile(attempt + 1), 200);
}
function startCaptchaFlow() {
started = true;
showModal();
resetStatus();
if (timeoutHandle) clearTimeout(timeoutHandle);
timeoutHandle = setTimeout(markTimeout, 30000);
if (["cloudflare", "turnstile", "cf"].includes(cfg.provider)) return ensureTurnstile();
return ensureRecaptcha();
}
if (form) {
form.addEventListener("submit", (e) => {
if (modal && modal.dataset.challenge === "1") {
e.preventDefault();
e.stopImmediatePropagation();
if (cfg.enabled && !tokenInput.value) startCaptchaFlow();
return false;
}
if (cfg.enabled && !tokenInput.value) {
e.preventDefault();
startCaptchaFlow();
return false;
}
}, true);
}
if (cfg.challengeActive) {
disableForm();
if (cfg.enabled && !started) startCaptchaFlow();
} else if (cfg.enabled && cfg.required && !started) {
startCaptchaFlow();
}
window.initRecaptcha = function initRecaptcha() {
if (!cfg.enabled) return;
ensureRecaptcha();
};
window.initTurnstile = function initTurnstile() {
if (!cfg.enabled) return;
ensureTurnstile();
};
window.__adCaptchaResolved = hideModal;
})();
</script>
<% if (useExternalCaptcha) { %>
<% if (["cloudflare","turnstile","cf"].includes((externalCaptchaProvider || "" ).toLowerCase())) { %>
<script nonce="<%= cspNonce %>"
src="https://challenges.cloudflare.com/turnstile/v0/api.js?onload=initTurnstile&render=explicit" async
defer></script>
<% } else { %>
<script nonce="<%= cspNonce %>"
src="https://www.google.com/recaptcha/api.js?onload=initRecaptcha&render=explicit" async
defer></script>
<% } %>
<% } %>
<% if (showLocalCaptcha && captchaQuestion) { %>
<script nonce="<%= cspNonce %>">
(function () {
var grid = document.getElementById("captchaGrid");
var submitBtn = document.getElementById("captchaSubmitLocal");
var statusEl = document.getElementById("captchaLocalStatus");
var localUI = document.getElementById("localCaptchaUI");
var promptEl = document.getElementById("captchaPrompt");
var stepEl = document.getElementById("captchaStep");
if (!grid || !submitBtn || !localUI) return;
var selected = new Set();
function setLocalStatus(message, state) {
if (!statusEl) return;
statusEl.textContent = message || "";
statusEl.dataset.state = state || "";
}
grid.addEventListener("click", function (e) {
var cell = e.target.closest(".local-captcha__cell");
if (!cell) return;
var idx = parseInt(cell.dataset.idx, 10);
if (isNaN(idx)) return;
if (selected.has(idx)) {
selected.delete(idx);
cell.classList.remove("selected");
} else {
selected.add(idx);
cell.classList.add("selected");
}
});
submitBtn.addEventListener("click", function () {
if (selected.size === 0) {
setLocalStatus("Select at least one image", "error");
return;
}
var token = localUI.dataset.token;
submitBtn.disabled = true;
setLocalStatus("Verifying...", "muted");
fetch("/api/captcha/local", {
method: "POST",
headers: { "Content-Type": "application/json" },
credentials: "same-origin",
body: JSON.stringify({ action: "verify", token: token, selection: Array.from(selected) }),
})
.then(function (resp) { return resp.json(); })
.then(function (data) {
if (data.ok && data.done) {
setLocalStatus("Verified!", "success");
if (typeof window.__adCaptchaResolved === "function") window.__adCaptchaResolved();
return;
}
if (data.ok && !data.done && data.question) {
selected.clear();
rebuildGrid(data.question);
setLocalStatus("", "");
submitBtn.disabled = false;
return;
}
setLocalStatus(data.error === "expired" ? "Expired. Reloading..." : "Incorrect selection. Reloading...", "error");
setTimeout(function () { window.location.reload(); }, 1800);
})
.catch(function () {
setLocalStatus("Network error. Retrying...", "error");
setTimeout(function () { window.location.reload(); }, 2000);
});
});
function rebuildGrid(question) {
localUI.dataset.token = question.token;
localUI.dataset.step = String(question.step);
localUI.dataset.total = String(question.total);
if (promptEl) promptEl.textContent = question.prompt;
if (stepEl) stepEl.textContent = "Step " + question.step + " of " + question.total;
grid.innerHTML = "";
(question.images || []).forEach(function (imgUrl, idx) {
var cell = document.createElement("div");
cell.className = "local-captcha__cell";
cell.dataset.idx = String(idx);
var img = document.createElement("img");
img.src = imgUrl;
img.alt = "captcha image";
img.draggable = false;
img.loading = "lazy";
var check = document.createElement("div");
check.className = "local-captcha__check";
check.innerHTML = '<i class="fa-solid fa-check"></i>';
cell.appendChild(img);
cell.appendChild(check);
grid.appendChild(cell);
});
}
})();
</script>
<% } %>
<script nonce="<%= cspNonce %>">
document.addEventListener("DOMContentLoaded", () => {
const form = document.querySelector("form");
const videoEl = document.getElementById("bgVideo");
if (!videoEl) return;
const tryPlay = () => {
const p = videoEl.play();
if (p && typeof p.then === "function") {
p.catch(() => {
});
}
};
videoEl.addEventListener(
"canplay",
() => {
tryPlay();
},
{ once: true }
);
const resumeOnUserGesture = () => {
tryPlay();
window.removeEventListener("click", resumeOnUserGesture);
window.removeEventListener("keydown", resumeOnUserGesture);
window.removeEventListener("touchstart", resumeOnUserGesture);
};
window.addEventListener("click", resumeOnUserGesture);
window.addEventListener("keydown", resumeOnUserGesture);
window.addEventListener("touchstart", resumeOnUserGesture);
videoEl.addEventListener("error", () => {
});
});
</script>
<script nonce="<%= cspNonce %>">
(function () {
var challengeActive = <%- (showLocalCaptcha || (useExternalCaptcha && externalCaptchaAutoStart)) ? "true" : "false" %>;
if (!challengeActive) return;
var modal = document.getElementById("captchaModal");
var form = document.querySelector("form");
if (!modal) return;
if (form) {
form.addEventListener("submit", function (e) {
if (modal.dataset.challenge === "1") {
e.preventDefault();
e.stopImmediatePropagation();
return false;
}
}, true);
}
var restoring = false;
var observer = new MutationObserver(function () {
if (restoring) return;
var m = document.getElementById("captchaModal");
if (!m) {
restoring = true;
window.location.reload();
return;
}
if (m.dataset.challenge === "0") return;
if (!m.classList.contains("show")) m.classList.add("show");
var st = m.getAttribute("style") || "";
if (st && (st.indexOf("display") !== -1 || st.indexOf("visibility") !== -1 || st.indexOf("opacity") !== -1)) {
m.removeAttribute("style");
}
});
observer.observe(document.documentElement, {
childList: true,
subtree: true,
attributes: true,
attributeFilter: ["class", "style", "hidden"],
});
var integrityInterval = setInterval(function () {
var m = document.getElementById("captchaModal");
if (!m) {
clearInterval(integrityInterval);
window.location.reload();
return;
}
if (m.dataset.challenge === "0") {
clearInterval(integrityInterval);
observer.disconnect();
return;
}
if (!m.classList.contains("show")) m.classList.add("show");
var cs = getComputedStyle(m);
if (cs.display === "none" || cs.visibility === "hidden" || parseFloat(cs.opacity) < 0.5) {
m.removeAttribute("style");
m.classList.add("show");
}
if (form && m.dataset.challenge === "1") {
form.classList.add("login-form--blocked");
}
}, 800);
try {
var origRemove = modal.remove;
Object.defineProperty(modal, "remove", {
value: function () {
if (modal.dataset.challenge === "1") return;
return origRemove.call(this);
},
writable: false,
configurable: false,
});
} catch (ex) { }
try {
var origSetAttr = modal.setAttribute.bind(modal);
modal.setAttribute = function (name, value) {
if (modal.dataset.challenge !== "1") return origSetAttr(name, value);
if (name === "style" && typeof value === "string" && (/display\s*:\s*none|visibility\s*:\s*hidden|opacity\s*:\s*0/i).test(value)) return;
if (name === "class" && typeof value === "string" && !value.includes("show")) return;
if (name === "hidden") return;
return origSetAttr(name, value);
};
} catch (ex) { }
modal.addEventListener("contextmenu", function (e) { e.preventDefault(); });
})();
</script>
</body>
</html>
+179
View File
@@ -0,0 +1,179 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%= (branding && branding.appName) ? branding.appName : 'Panel' %> - Maintenance</title>
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<link rel="icon" type="image/webp" sizes="16x16" href="<%= (branding && branding.faviconUrl) ? branding.faviconUrl : '/auth-assets/favicon' %>" />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap" rel="stylesheet" />
<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" />
<style nonce="<%= cspNonce %>">
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-user-select: none; -moz-user-select: none; user-select: none; }
html, body { height: 100%; overflow: hidden; }
body {
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background: #0a0a0f;
color: #e2e8f0;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
body::before {
content: '';
position: fixed;
inset: 0;
background:
radial-gradient(ellipse 600px 400px at 20% 30%, rgba(239, 68, 68, 0.06), transparent),
radial-gradient(ellipse 500px 350px at 80% 70%, rgba(168, 85, 247, 0.05), transparent),
radial-gradient(ellipse 400px 300px at 50% 50%, rgba(59, 130, 246, 0.04), transparent);
z-index: 0;
}
body::after {
content: '';
position: fixed;
inset: 0;
background-image:
linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
background-size: 60px 60px;
z-index: 0;
}
.maintenance-container {
position: relative;
z-index: 1;
text-align: center;
max-width: 560px;
padding: 48px 40px;
background: rgba(15, 15, 25, 0.85);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 24px;
backdrop-filter: blur(20px);
box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.maintenance-icon {
width: 80px;
height: 80px;
margin: 0 auto 28px;
background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(168, 85, 247, 0.15));
border-radius: 20px;
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
color: #ef4444;
}
.maintenance-title {
font-size: 26px;
font-weight: 800;
letter-spacing: -0.5px;
margin-bottom: 12px;
background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.maintenance-message {
font-size: 15px;
line-height: 1.7;
color: #94a3b8;
margin-bottom: 28px;
}
.maintenance-reason {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 18px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 12px;
font-size: 13px;
color: #cbd5e1;
margin-bottom: 28px;
}
.maintenance-reason i {
color: #f59e0b;
font-size: 14px;
}
.maintenance-divider {
height: 1px;
background: rgba(255, 255, 255, 0.06);
margin: 0 -40px 20px;
}
.maintenance-footer {
font-size: 12px;
color: #475569;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
}
.maintenance-footer i {
font-size: 11px;
}
.maintenance-dot {
width: 6px;
height: 6px;
background: #ef4444;
border-radius: 50%;
display: inline-block;
}
.maintenance-container * { pointer-events: none; }
</style>
<script nonce="<%= cspNonce %>">
document.addEventListener('contextmenu', e => e.preventDefault());
document.addEventListener('keydown', e => {
if (e.key === 'F12' || (e.ctrlKey && e.shiftKey && (e.key === 'I' || e.key === 'J' || e.key === 'C')) || (e.ctrlKey && e.key === 'u')) {
e.preventDefault();
}
});
(function enforceMaintenanceIntegrity() {
const checkInterval = setInterval(async () => {
try {
const res = await fetch('/api/maintenance/status', { credentials: 'include' });
if (res.ok) {
const data = await res.json();
if (data.active) return;
}
clearInterval(checkInterval);
window.location.reload();
} catch (e) {
}
}, 15000);
const observer = new MutationObserver(() => {
if (!document.querySelector('.maintenance-container')) {
window.location.reload();
}
});
observer.observe(document.body, { childList: true, subtree: true });
})();
</script>
</head>
<body>
<div class="maintenance-container">
<div class="maintenance-icon">
<i class="fa-solid fa-wrench"></i>
</div>
<h1 class="maintenance-title">Under Maintenance</h1>
<p class="maintenance-message">
The panel is currently undergoing scheduled maintenance. We're working on improvements
and will be back shortly. Thank you for your patience.
</p>
<% if (typeof reason !== 'undefined' && reason) { %>
<div class="maintenance-reason">
<i class="fa-solid fa-circle-info"></i>
<span><%= reason %></span>
</div>
<% } %>
<div class="maintenance-divider"></div>
<div class="maintenance-footer">
<span class="maintenance-dot"></span>
<span>Maintenance in progress</span>
</div>
</div>
</body>
</html>
+138
View File
@@ -0,0 +1,138 @@
<!DOCTYPE html>
<html lang="en" data-bot="<%= bot %>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Resources - <%= bot %></title>
<link rel="stylesheet" href="/style.css?v=<%= Date.now() %>">
<link rel="stylesheet" href="/css/bot.css?v=<%= typeof themeVersion !== 'undefined' ? themeVersion : Date.now() %>">
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<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">
<style nonce="<%= cspNonce %>">
body {
margin: 0;
padding: 0;
height: 100vh;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
background-color: #0b0f14;
}
.resource-stats-popup {
position: relative;
top: auto;
left: auto;
transform: none !important;
opacity: 1 !important;
visibility: visible !important;
pointer-events: auto !important;
width: 100%;
height: 100%;
border-radius: 0;
border: none;
box-shadow: none;
display: flex;
flex-direction: column;
background: transparent !important;
-webkit-backdrop-filter: none !important;
backdrop-filter: none !important;
}
.screen-fill-container {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
background: linear-gradient(135deg, rgba(15, 20, 30, 0.92) 0%, rgba(10, 15, 25, 0.95) 100%);
}
.resource-stats-header {
border-radius: 0;
}
.resource-stats-body {
flex: 1;
overflow-y: auto;
}
#resourceStatsClose, #openResourceStatsTab {
display: none;
}
</style>
</head>
<body>
<div class="resource-stats-popup visible screen-fill-container" id="resourceStatsPopup">
<div class="resource-stats-header">
<div class="resource-stats-title"><i class="fa-solid fa-chart-pie"></i> Resource Usage</div>
<button class="resource-stats-action" id="openResourceStatsTab"><i class="fa-solid fa-arrow-up-right-from-square"></i></button>
<button class="resource-stats-close" id="resourceStatsClose"><i class="fa-solid fa-xmark"></i></button>
</div>
<div class="resource-stats-body">
<div class="resource-stat-row">
<div class="resource-stat-icon memory-icon"><i class="fa-solid fa-memory"></i></div>
<div class="resource-stat-info">
<div class="resource-stat-label">Memory</div>
<div class="resource-stat-value" id="resMemoryLabel">Loading...</div>
</div>
<div class="resource-stat-bar">
<div class="resource-stat-fill memory-fill" id="resMemoryBar" style="width:0%"></div>
</div>
</div>
<div class="resource-stat-row">
<div class="resource-stat-icon disk-icon"><i class="fa-solid fa-hard-drive"></i></div>
<div class="resource-stat-info">
<div class="resource-stat-label">Storage</div>
<div class="resource-stat-value" id="resDiskLabel">Loading...</div>
</div>
<div class="resource-stat-bar">
<div class="resource-stat-fill disk-fill" id="resDiskBar" style="width:0%"></div>
</div>
</div>
<div class="resource-stat-row">
<div class="resource-stat-icon cpu-icon"><i class="fa-solid fa-microchip"></i></div>
<div class="resource-stat-info">
<div class="resource-stat-label">CPU</div>
<div class="resource-stat-value" id="resCpuLabel">Loading...</div>
</div>
<div class="resource-stat-bar">
<div class="resource-stat-fill cpu-fill" id="resCpuBar" style="width:0%"></div>
</div>
</div>
<div class="resource-stat-row">
<div class="resource-stat-icon network-inbound-icon"><i class="fa-solid fa-arrow-down"></i></div>
<div class="resource-stat-info">
<div class="resource-stat-label">Network Inbound</div>
<div class="resource-stat-value" id="resNetworkInboundLabel">Loading...</div>
</div>
</div>
<div class="resource-stat-row">
<div class="resource-stat-icon network-outbound-icon"><i class="fa-solid fa-arrow-up"></i></div>
<div class="resource-stat-info">
<div class="resource-stat-label">Network Outbound</div>
<div class="resource-stat-value" id="resNetworkOutboundLabel">Loading...</div>
</div>
</div>
<div class="resource-stat-row">
<div class="resource-stat-icon uptime-icon"><i class="fa-solid fa-clock"></i></div>
<div class="resource-stat-info">
<div class="resource-stat-label">Uptime</div>
<div class="resource-stat-value" id="resUptimeLabel">Loading...</div>
</div>
</div>
</div>
</div>
<script nonce="<%= cspNonce %>" src="/socket.io/socket.io.js"></script>
<script nonce="<%= cspNonce %>" src="/js/resource-popup.js?v=<%= Date.now() %>"></script>
</body>
</html>
+3537
View File
File diff suppressed because it is too large. Load diff