Initial upload

This commit is contained in:
antonn committed 2026-06-10 17:04:11 +00:00
1 parent b0bf3b7167
commit a022f29e34
65 files changed
+46484 -4339

No files matched your search

+147 -84
View File
@@ -9,54 +9,57 @@
<% const assetVersion = typeof themeVersion !== 'undefined' ? themeVersion : '1'; %>
<link rel="stylesheet" href="/style.css?v=<%= assetVersion %>">
<link rel="stylesheet" href="/css/ssh-terminal-window.css?v=20260509-floating-terminal-5">
<link id="favicon" rel="icon" type="image/webp" href="<%= (branding && branding.faviconUrl) ? branding.faviconUrl : '/auth-assets/favicon' %>" />
<link rel="preconnect" href="https://cdnjs.cloudflare.com" crossorigin>
<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-ext/all.css" />
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<script nonce="<%= cspNonce %>" data-cfasync="false" src="/socket.io/socket.io.js"></script>
<script nonce="<%= cspNonce %>" data-cfasync="false" src="/socket.io/socket.io.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ansi_up@5.1.0/ansi_up.min.js"></script>
src="https://cdn.jsdelivr.net/npm/ansi_up@5.1.0/ansi_up.min.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/ace.js"></script>
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/ace.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/theme-one_dark.js"></script>
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/theme-one_dark.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-javascript.js"></script>
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-javascript.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-json.js"></script>
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-json.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-yaml.js"></script>
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-yaml.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-python.js"></script>
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-python.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-sh.js"></script>
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-sh.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-ini.js"></script>
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-ini.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-html.js"></script>
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-html.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-css.js"></script>
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-css.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-java.js"></script>
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-java.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-text.js"></script>
src="https://cdn.jsdelivr.net/npm/ace-builds@1.36.5/src-min-noconflict/mode-text.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false">
window.__ADPANEL_BOOTSTRAP__ = Object.freeze({
currentUser: {
email: <%- JSON.stringify((user && user.email) || "") %>,
preferences: <%- JSON.stringify((user && user.preferences) || {}) %>
email: <%- JSON.stringify((user && user.email) || "").replace(/</g, "\\u003c") %>,
preferences: <%- JSON.stringify((user && user.preferences) || {}).replace(/</g, "\\u003c") %>
}
});
</script>
<script nonce="<%= cspNonce %>" data-cfasync="false" src="/js/bot.js?v=<%= assetVersion %>" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false" src="/js/ssh-terminal-window.js?v=20260509-floating-terminal-5" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false" src="/js/bot.js?v=<%= assetVersion %>-console-eventsource-live-reset-20260528" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false"
src="https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs/loader.min.js"></script>
src="https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs/loader.min.js" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false">
(function () {
@@ -217,12 +220,11 @@
</style>
<style nonce="<%= cspNonce %>">
.sidebar-shell {
transition:
width 0.42s cubic-bezier(0.22, 1, 0.36, 1),
opacity 0.2s ease,
background-color 0.42s cubic-bezier(0.22, 1, 0.36, 1),
box-shadow 0.42s cubic-bezier(0.22, 1, 0.36, 1) !important;
will-change: width, background-color, box-shadow;
transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
will-change: width;
transform: translateZ(0);
backface-visibility: hidden;
-webkit-font-smoothing: subpixel-antialiased;
}
.sidebar-shell.open:hover {
@@ -230,29 +232,25 @@
0 18px 44px rgba(0, 0, 0, 0.34),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
background-color: rgba(255, 255, 255, 0.062);
transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.sidebar-shell.open .sidebar-item,
.sidebar-shell.open .profile-card {
transition:
background 0.2s ease,
transform 0.2s ease,
color 0.2s ease,
padding 0.38s cubic-bezier(0.22, 1, 0.36, 1);
.sidebar-shell .sidebar-item,
.sidebar-shell .profile-card {
transition: background 0.15s ease;
}
.sidebar-shell.open .sidebar-item .label,
.sidebar-shell.open .profile-meta {
transition:
max-width 0.36s cubic-bezier(0.22, 1, 0.36, 1),
opacity 0.26s ease,
transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
transition-delay: 0s;
.sidebar-shell .sidebar-item .label,
.sidebar-shell .profile-meta {
transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
will-change: opacity;
transform: translateZ(0);
backface-visibility: hidden;
}
.sidebar-shell.open:hover .sidebar-item .label,
.sidebar-shell.open:hover .profile-meta {
transition-delay: 0.08s;
transition-delay: 0.05s;
}
.sidebar-shell.open:not(:hover) .sidebar-item .label,
@@ -400,29 +398,27 @@
<div class="topbar">
<div class="brands"></div>
<div class="top-actions">
<button class="icon-btn" id="filesBtn" data-action="open-files"><i class="fa-solid fa-folder-open"></i>
<div class="top-actions" style="margin-left: auto; margin-right: -700px;">
<button class="icon-btn top-action-visible" id="filesBtn" data-action="open-files"><i class="fa-solid fa-folder-open"></i>
Files</button>
<button class="icon-btn" id="backupsBtn" data-action="open-backups"><i class="fa-solid fa-box-archive"></i>
Backups</button>
<button class="icon-btn" id="storeBtn" data-action="open-store"><i class="fa-solid fa-store"></i> Store</button>
<button class="icon-btn" id="activityBtn" data-action="open-activity"><i
<button class="icon-btn top-action-visible" id="activityBtn" data-action="open-activity"><i
class="fa-solid fa-clock-rotate-left"></i> Activity</button>
<button class="icon-btn" id="schedulerBtn" data-action="open-scheduler"><i
<button class="icon-btn top-action-visible" id="moreBtn" data-action="toggle-more"><i class="fa-solid fa-ellipsis"></i>
More</button>
<button class="icon-btn top-action-hidden" id="backupsBtn" data-action="open-backups"><i class="fa-solid fa-box-archive"></i>
Backups</button>
<button class="icon-btn top-action-hidden" id="storeBtn" data-action="open-store"><i class="fa-solid fa-store"></i> Store</button>
<button class="icon-btn top-action-hidden" id="schedulerBtn" data-action="open-scheduler"><i
class="fa-solid fa-calendar-days"></i> Scheduler</button>
<button class="icon-btn" id="aiHelpBtn" data-action="open-ai-help">
<button class="icon-btn top-action-hidden" id="aiHelpBtn" data-action="open-ai-help">
<img src="https://cdn.jsdelivr.net/gh/antonndev/ADCDn/adpanel-dark.webp" alt="ADPanel Agent" width="20px"
height="21px" /> ADPanel Agent</button>
<button class="icon-btn" id="infoBtn" data-action="open-info"><i class="fa-solid fa-circle-info"></i>
<button class="icon-btn top-action-hidden" id="infoBtn" data-action="open-info"><i class="fa-solid fa-circle-info"></i>
Information</button>
<button class="icon-btn" id="runBtn" data-action="run" title="Run selected"><i class="fa-solid fa-play"></i>
Run</button>
<button class="icon-btn" id="subdomainsBtn" data-action="open-subdomains"><i class="fa-solid fa-globe"></i>
<button class="icon-btn top-action-hidden" id="subdomainsBtn" data-action="open-subdomains"><i class="fa-solid fa-globe"></i>
Subdomains</button>
<button class="icon-btn" id="stopBtn" data-action="stop" title="Stop process"><i class="fa-solid fa-stop"></i>
Stop</button>
<button class="icon-btn reinstall-topbar-btn" id="reinstallBtn" data-action="open-reinstall"
<button class="icon-btn top-action-hidden reinstall-topbar-btn" id="reinstallBtn" data-action="open-reinstall"
title="Reinstall server"><i class="fa-solid fa-rotate"></i>
Reinstall</button>
</div>
@@ -437,7 +433,7 @@
style="display:flex;align-items:center; gap:10px; position:absolute; top:-60px; left:-40px;">
<a href="/"><img src="https://i.imgur.com/k5agjYf.png" width="50" height="30"></a>
<a href="/"
style="position: absolute;font-size:30px;font-weight:bold;color:white;text-decoration:none; margin-top: -5px; margin-left: 55px;">Panel</a>
style="position: absolute;font-size:30px;font-weight:bold;color:white;text-decoration:none; margin-top: -7px; margin-left: 53px;">Panel<sup style="font-size: 8px; font-weight: 700; margin-left: 1px; vertical-align: super; position: relative; top: -8px;">TM</sup></a>
</div>
<div class="window-header">
<div style="display:flex;align-items:center;gap:8px">
@@ -466,8 +462,9 @@
<pre id="console" aria-live="polite"></pre>
<div class="cmd-row" id="cmdRow" style="margin-top: 4px;">
<input id="cmdInput" class="command" type="text" placeholder="Type a command and press Enter" />
<div class="cmd-row" id="cmdRow" style="margin-top: 4px; position: relative;">
<span class="cmd-arrows" aria-hidden="true"><i class="fa-solid fa-chevron-right"></i><i class="fa-solid fa-chevron-right" style="margin-left: -2px;"></i></span>
<input id="cmdInput" class="command" type="text" placeholder="Type a command and press Enter" style="background: #0b0f19; color: #d4d4d4; padding-left: 40px;" />
<button class="icon-btn" id="sendBtn" type="button" data-action="send" title="Send">Send</button>
<button class="icon-btn" id="clearBtn" type="button" data-action="clear" title="Clear">Clear</button>
</div>
@@ -774,16 +771,43 @@
<div id="bigEditor">
<div id="codeShell" class="code-shell" style="display:none">
<div id="monacoContainer" style="width:100%;height:100%;"></div>
<div id="aceContainer" style="width:100%;height:100%;display:none;"></div>
<div class="code-shell-editor">
<div id="monacoContainer" style="width:100%;height:100%;"></div>
<div id="aceContainer" style="width:100%;height:100%;display:none;"></div>
<div id="lineGutter" class="line-gutter" style="display:none"></div>
<div class="code-pane" style="display:none">
<pre id="codeOverlay" class="code-overlay"></pre>
<textarea id="codeInput" class="code-input" spellcheck="false"></textarea>
<div id="codeSpacer" class="code-spacer" aria-hidden="true"></div>
<div id="lineGutter" class="line-gutter" style="display:none"></div>
<div class="code-pane" style="display:none">
<pre id="codeOverlay" class="code-overlay"></pre>
<textarea id="codeInput" class="code-input" spellcheck="false"></textarea>
<div id="codeSpacer" class="code-spacer" aria-hidden="true"></div>
</div>
</div>
<button id="miniFmToggle" class="mini-fm-toggle" type="button"
title="Toggle file manager" aria-label="Toggle file manager" aria-expanded="true">
<i class="fa-solid fa-chevron-right"></i>
</button>
<aside id="miniFm" class="mini-fm" aria-label="File manager">
<div class="mini-fm-header">
<div class="mini-fm-header-main">
<div class="mini-fm-header-icon"><i class="fa-solid fa-folder-tree"></i></div>
<div class="mini-fm-header-text">
<div class="mini-fm-title">Files</div>
<div id="miniFmBreadcrumbs" class="mini-fm-breadcrumbs"></div>
</div>
</div>
<div class="mini-fm-header-actions">
<label class="mini-fm-icon-btn" id="miniFmUploadLabel" for="miniFmUpload"
title="Upload file" aria-label="Upload file"><i class="fa-solid fa-upload"></i></label>
<input id="miniFmUpload" type="file" multiple style="display:none" />
<button class="mini-fm-icon-btn" id="miniFmRefresh" type="button"
title="Refresh" aria-label="Refresh"><i class="fa-solid fa-rotate"></i></button>
</div>
</div>
<ul id="miniFmEntries" class="mini-fm-entries" role="list"></ul>
</aside>
</div>
@@ -805,7 +829,10 @@
<div id="storeModal" class="modal-overlay" aria-hidden="true">
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="storeModalTitle">
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="storeModalTitle" style="position:relative;">
<div class="ptero-flash-bar" id="storeFlashBar">
<div class="ptero-flash-fill" id="storeFlashFill"></div>
</div>
<div class="store-header">
<div class="store-header-main">
<div>
@@ -1515,51 +1542,57 @@
<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-content">
<div class="resource-stat-label-line">
<div class="resource-stat-label">Memory</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-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-content">
<div class="resource-stat-label-line">
<div class="resource-stat-label">Storage</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-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-content">
<div class="resource-stat-label-line">
<div class="resource-stat-label">CPU</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-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-content">
<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-content">
<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-content">
<div class="resource-stat-label">Uptime</div>
<div class="resource-stat-value" id="resUptimeLabel">Loading...</div>
</div>
@@ -2091,3 +2124,33 @@
</body>
</html>
<script nonce="<%= cspNonce %>">
document.addEventListener('DOMContentLoaded', function() {
const moreBtn = document.getElementById('moreBtn');
const topActions = document.querySelector('.top-actions');
if (moreBtn && topActions) {
moreBtn.addEventListener('click', function(e) {
e.preventDefault();
topActions.classList.add('expanded');
});
}
});
</script>
<!-- Store toast & confirm -->
<div id="storeToast" class="store-toast" aria-live="polite" aria-atomic="true"></div>
<div id="storeConfirmOverlay" class="store-confirm-overlay" aria-hidden="true">
<div class="store-confirm-box" role="dialog" aria-modal="true">
<div class="store-confirm-icon"><i class="fa-solid fa-triangle-exclamation"></i></div>
<div class="store-confirm-msg" id="storeConfirmMsg"></div>
<div class="store-confirm-actions">
<button class="backup-create-cancel" id="storeConfirmCancel" type="button">Cancel</button>
<button class="backup-create-confirm" id="storeConfirmOk" type="button">
<i class="fa-solid fa-check"></i>
<span>Continue</span>
</button>
</div>
</div>
</div>
+1 -2
View File
@@ -66,9 +66,8 @@
<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.
<strong>bash initialize.sh</strong> from the ADPanel directory or asking an admin to reset 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>
+609 -801
View File
File diff suppressed because it is too large. Load diff
+279 -86
View File
@@ -1,13 +1,17 @@
<% 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' ; %>
: 'video/webm' ; const loginRequiresTwoFactor=typeof requiresTwoFactor !== 'undefined' && !!requiresTwoFactor; const
loginEmailValue=typeof loginEmail !== 'undefined' ? String(loginEmail || '') : ''; const
loginExternalCaptchaAvailable=typeof externalCaptchaAvailable !== 'undefined' ? !!externalCaptchaAvailable : !!useExternalCaptcha; const
loginCaptchaChallengeActive=!!useExternalCaptcha || !!showLocalCaptcha; %>
<!DOCTYPE html>
<html lang="ro">
<head>
<meta charset="UTF-8" />
<title>Login - <%= (branding && branding.appName) ? branding.appName : 'Panel' %></title>
<link rel="preconnect" href="https://cdnjs.cloudflare.com" crossorigin>
<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' %>" />
@@ -75,7 +79,7 @@
</script>
</head>
<body class="<%= loginBackgroundType === 'image' && loginBackgroundUrl ? 'login-body--image' : '' %>">
<body class="<%= [loginBackgroundType === 'image' && loginBackgroundUrl ? 'login-body--image' : '', loginRequiresTwoFactor ? 'login-has-2fa' : ''].filter(Boolean).join(' ') %>">
<div id="toastHost" class="toast-host" aria-live="polite" aria-atomic="true"></div>
<script nonce="<%= cspNonce %>">
@@ -116,22 +120,24 @@
</video>
<% } %>
<form method="POST" action="/login" class="login-form">
<form method="POST" action="/login" class="login-form" data-requires-two-factor="<%= loginRequiresTwoFactor ? 'true' : 'false' %>">
<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 />
<input class="login-input" type="email" name="email" placeholder="Email" value="<%= loginEmailValue %>" 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">
<div class="input-holder login-two-factor-field" id="loginTwoFactorField" aria-hidden="<%= loginRequiresTwoFactor ? 'false' : 'true' %>">
<i class="input-icon fa-solid fa-fingerprint" aria-hidden="true"></i>
<input class="login-input" type="text" name="code" placeholder="2FA Code" required />
<input class="login-input" type="text" name="code" id="loginTwoFactorCode" placeholder="2FA Code" maxlength="6"
inputmode="numeric" autocomplete="one-time-code" <%= loginRequiresTwoFactor ? 'required' : 'disabled' %> />
</div>
<a class="forgot-password" href="/forgot-password">Forgot password?</a>
<input type="hidden" name="captchaToken" id="captchaTokenInput" value="" />
<button type="submit" class="get-started">
@@ -139,16 +145,15 @@
<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' : '' %>"
<div id="captchaModal" class="captcha-modal<%= loginCaptchaChallengeActive ? ' show' : '' %>"
data-provider="<%= (externalCaptchaProvider || 'recaptcha').toLowerCase() %>"
data-challenge="<%= (useExternalCaptcha || showLocalCaptcha) ? '1' : '0' %>"
aria-hidden="<%= (useExternalCaptcha || showLocalCaptcha) ? 'false' : 'true' %>">
data-challenge="<%= loginCaptchaChallengeActive ? '1' : '0' %>"
aria-hidden="<%= loginCaptchaChallengeActive ? 'false' : 'true' %>">
<div class="captcha-modal__backdrop"></div>
<div class="captcha-modal__card">
<div class="captcha-modal__title">
@@ -158,6 +163,7 @@
<div class="captcha-modal__widget">
<div id="recaptchaWidget" hidden></div>
<div id="cf-turnstile" hidden></div>
<div id="hcaptchaWidget" hidden></div>
</div>
<% if (showLocalCaptcha && captchaQuestion) { %>
<div id="localCaptchaUI" class="local-captcha" data-token="<%= captchaQuestion.token %>"
@@ -206,13 +212,13 @@
<script nonce="<%= cspNonce %>">
(() => {
const cfg = {
enabled: <%- useExternalCaptcha ? "true" : "false" %>,
enabled: <%- loginExternalCaptchaAvailable ? "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" %>,
challengeActive: <%- loginCaptchaChallengeActive ? "true" : "false" %>,
};
const form = document.querySelector("form");
@@ -220,11 +226,13 @@
const tokenInput = document.getElementById("captchaTokenInput");
const recaptchaHost = document.getElementById("recaptchaWidget");
const turnstileHost = document.getElementById("cf-turnstile");
const hcaptchaHost = document.getElementById("hcaptchaWidget");
const statusEl = modal ? modal.querySelector(".captcha-modal__desc") : null;
const defaultStatusText = statusEl ? statusEl.textContent : "";
let recaptchaId = null;
let turnstileId = null;
let hcaptchaId = null;
let started = false;
let timeoutHandle = null;
@@ -237,6 +245,10 @@
const enableForm = () => {
if (!form) return;
form.querySelectorAll("input, button").forEach(el => { el.disabled = false; });
const loginTwoFactorInput = document.getElementById("loginTwoFactorCode");
if (loginTwoFactorInput && form.dataset.requiresTwoFactor !== "true") {
loginTwoFactorInput.disabled = true;
}
form.classList.remove("login-form--blocked");
};
@@ -249,6 +261,7 @@
if (modal) {
modal.classList.remove("show");
modal.dataset.challenge = "0";
modal.setAttribute("aria-hidden", "true");
}
enableForm();
if (timeoutHandle) {
@@ -267,26 +280,68 @@
}
};
const resetCaptchaWidget = () => {
tokenInput.value = "";
try {
if (recaptchaId !== null && window.grecaptcha && typeof window.grecaptcha.reset === "function") {
window.grecaptcha.reset(recaptchaId);
}
} catch { }
try {
if (turnstileId !== null && window.turnstile && typeof window.turnstile.reset === "function") {
window.turnstile.reset(turnstileId);
}
} catch { }
try {
if (hcaptchaId !== null && window.hcaptcha && typeof window.hcaptcha.reset === "function") {
window.hcaptcha.reset(hcaptchaId);
}
} catch { }
};
async function verifyCaptchaToken(token) {
tokenInput.value = token || "";
if (timeoutHandle) { clearTimeout(timeoutHandle); timeoutHandle = null; }
if (statusEl) statusEl.textContent = "Finalizing sign in...";
try {
const resp = await fetch("/api/captcha/verify", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ token }),
credentials: "same-origin",
});
const data = await resp.json().catch(() => ({}));
if (resp.ok && data.ok) {
if (data.redirect) {
window.location.href = data.redirect;
return;
}
hideModal();
return;
}
resetCaptchaWidget();
if (data.redirect) {
window.location.href = data.redirect;
return;
}
if (statusEl) statusEl.textContent = data.error || "Captcha verification failed. Try again.";
} catch {
resetCaptchaWidget();
if (statusEl) statusEl.textContent = "Network error. 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 (hcaptchaHost) hcaptchaHost.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();
},
callback: verifyCaptchaToken,
"expired-callback": () => { tokenInput.value = ""; },
"error-callback": () => { tokenInput.value = ""; },
});
@@ -305,22 +360,13 @@
if (!cfg.enabled || turnstileId !== null) return turnstileId;
if (!window.turnstile || typeof window.turnstile.render !== "function") return null;
if (recaptchaHost) recaptchaHost.hidden = true;
if (hcaptchaHost) hcaptchaHost.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();
},
callback: verifyCaptchaToken,
"expired-callback": () => { tokenInput.value = ""; },
"error-callback": () => { tokenInput.value = ""; },
});
@@ -335,60 +381,203 @@
if (attempt < 50) setTimeout(() => ensureTurnstile(attempt + 1), 200);
}
function renderHcaptcha() {
if (!cfg.enabled || hcaptchaId !== null) return hcaptchaId;
if (!window.hcaptcha || typeof window.hcaptcha.render !== "function") return null;
if (recaptchaHost) recaptchaHost.hidden = true;
if (turnstileHost) turnstileHost.hidden = true;
if (hcaptchaHost) hcaptchaHost.hidden = false;
hcaptchaId = window.hcaptcha.render("hcaptchaWidget", {
sitekey: cfg.siteKey,
size: "normal",
theme: "dark",
callback: verifyCaptchaToken,
"expired-callback": () => { tokenInput.value = ""; },
"error-callback": () => { tokenInput.value = ""; },
});
if (timeoutHandle) { clearTimeout(timeoutHandle); timeoutHandle = null; }
resetStatus();
return hcaptchaId;
}
function ensureHcaptcha(attempt = 0) {
if (hcaptchaId === null) renderHcaptcha();
if (hcaptchaId !== null) return;
if (attempt < 50) setTimeout(() => ensureHcaptcha(attempt + 1), 200);
}
function startCaptchaFlow() {
started = true;
if (modal) {
modal.dataset.challenge = "1";
modal.setAttribute("aria-hidden", "false");
}
showModal();
resetStatus();
if (timeoutHandle) clearTimeout(timeoutHandle);
timeoutHandle = setTimeout(markTimeout, 30000);
if (["cloudflare", "turnstile", "cf"].includes(cfg.provider)) return ensureTurnstile();
return ensureRecaptcha();
}
timeoutHandle = setTimeout(markTimeout, 30000);
if (!cfg.enabled) return;
if (["cloudflare", "turnstile", "cf"].includes(cfg.provider)) return ensureTurnstile();
if (["hcaptcha", "h"].includes(cfg.provider)) return ensureHcaptcha();
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 (modal && modal.dataset.challenge === "1") {
e.preventDefault();
e.stopImmediatePropagation();
if (cfg.enabled && !tokenInput.value) startCaptchaFlow();
return false;
}
}, true);
}
if (cfg.challengeActive) {
disableForm();
if (cfg.enabled && !started) startCaptchaFlow();
} else if (cfg.enabled && cfg.required && !started) {
startCaptchaFlow();
}
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.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
window.initHcaptcha = function initHcaptcha() {
if (!cfg.enabled) return;
ensureHcaptcha();
};
window.__adCaptchaResolved = (data) => {
if (data && data.redirect) {
window.location.href = data.redirect;
return;
}
hideModal();
};
window.__adStartCaptchaFlow = startCaptchaFlow;
})();
</script>
<script nonce="<%= cspNonce %>">
(() => {
const form = document.querySelector("form.login-form");
if (!form || !window.fetch) return;
const twoFactorField = document.getElementById("loginTwoFactorField");
const twoFactorInput = document.getElementById("loginTwoFactorCode");
const csrfInput = form.querySelector('input[name="_csrf"]');
const submitBtn = form.querySelector('button[type="submit"]');
const toastHost = document.getElementById("toastHost");
function showLoginToast(text, duration = 4200) {
if (!toastHost || !text) return;
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;
toastHost.appendChild(toast);
requestAnimationFrame(() => toast.classList.add("toast-show"));
setTimeout(() => toast.classList.add("toast-hide"), Math.max(0, duration - 320));
setTimeout(() => toast.remove(), duration + 450);
}
function setTwoFactorRequired(required) {
form.dataset.requiresTwoFactor = required ? "true" : "false";
document.body?.classList.toggle("login-has-2fa", !!required);
if (twoFactorField) {
twoFactorField.setAttribute("aria-hidden", required ? "false" : "true");
}
if (twoFactorInput) {
twoFactorInput.required = !!required;
twoFactorInput.disabled = !required;
if (!required) twoFactorInput.value = "";
}
}
setTwoFactorRequired(form.dataset.requiresTwoFactor === "true");
twoFactorInput?.addEventListener("input", () => {
twoFactorInput.value = twoFactorInput.value.replace(/\D/g, "").slice(0, 6);
});
form.addEventListener("submit", async (e) => {
if (e.defaultPrevented) return;
e.preventDefault();
if (submitBtn) submitBtn.disabled = true;
let keepSubmitDisabled = false;
try {
const body = new URLSearchParams(new FormData(form));
const res = await fetch(form.action || "/login", {
method: "POST",
headers: {
"Accept": "application/json",
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
"X-Requested-With": "XMLHttpRequest",
},
credentials: "same-origin",
body,
});
const data = await res.json().catch(() => ({}));
if (data.csrfToken && csrfInput) csrfInput.value = data.csrfToken;
if (data.requires2FA) {
setTwoFactorRequired(true);
showLoginToast(data.error || "Enter your 2FA code to continue.");
setTimeout(() => twoFactorInput?.focus(), 40);
return;
}
if (data.captchaRequired) {
keepSubmitDisabled = true;
if (data.useExternalCaptcha && typeof window.__adStartCaptchaFlow === "function") {
window.__adStartCaptchaFlow();
} else {
window.location.reload();
}
return;
}
if (res.ok && data.ok) {
window.location.href = data.redirect || "/";
return;
}
if (res.status === 403 && !data.error) {
window.location.reload();
return;
}
showLoginToast(data.error || "Invalid credentials");
} catch (err) {
showLoginToast("Network error. Try again.");
} finally {
if (submitBtn && !keepSubmitDisabled) submitBtn.disabled = false;
}
});
})();
</script>
<% if (loginExternalCaptchaAvailable) { %>
<% 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 if (["hcaptcha","h"].includes((externalCaptchaProvider || "" ).toLowerCase())) { %>
<script nonce="<%= cspNonce %>"
src="https://js.hcaptcha.com/1/api.js?onload=initHcaptcha&render=explicit" async
defer></script>
<% } else { %>
<script nonce="<%= cspNonce %>"
src="https://www.google.com/recaptcha/api.js?onload=initRecaptcha&render=explicit" async
defer></script>
<% } %>
<% } %>
@@ -444,19 +633,23 @@
})
.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");
if (data.ok && data.done) {
setLocalStatus("Verified!", "success");
if (typeof window.__adCaptchaResolved === "function") window.__adCaptchaResolved(data);
return;
}
if (data.ok && !data.done && data.question) {
selected.clear();
rebuildGrid(data.question);
setLocalStatus("", "");
submitBtn.disabled = false;
return;
}
if (!data.ok && data.redirect) {
window.location.href = data.redirect;
return;
}
setLocalStatus(data.error === "expired" ? "Expired. Reloading..." : "Incorrect selection. Reloading...", "error");
setTimeout(function () { window.location.reload(); }, 1800);
})
.catch(function () {
@@ -533,7 +726,7 @@
<script nonce="<%= cspNonce %>">
(function () {
var challengeActive = <%- (showLocalCaptcha || (useExternalCaptcha && externalCaptchaAutoStart)) ? "true" : "false" %>;
var challengeActive = <%- loginCaptchaChallengeActive ? "true" : "false" %>;
if (!challengeActive) return;
var modal = document.getElementById("captchaModal");
+258 -159
View File
@@ -11,22 +11,21 @@
</style>
<script nonce="<%= cspNonce %>">
window.__ADPANEL_DASHBOARD_BACKGROUND__ = <%- JSON.stringify(dashboardBackground || null).replace(/</g, '\\u003c') %>;
(function(){
try{
var bg=localStorage.getItem('dashboardBg');
if(bg){
var data=JSON.parse(bg);
if(data.type==='color'&&data.value){
document.documentElement.style.setProperty('--bg-main',data.value);
}else if(data.type==='image'&&data.value){
document.documentElement.style.setProperty('--bg-main','url('+data.value+')');
}
var data=window.__ADPANEL_DASHBOARD_BACKGROUND__;
if(data&&data.type==='color'&&data.value){
document.documentElement.style.setProperty('--bg-main',data.value);
}else if(data&&(data.type==='image'||data.type==='upload'||data.type==='url')&&data.value){
document.documentElement.style.setProperty('--bg-main','url('+data.value+')');
}
}catch(e){}
})();
</script>
<link rel="stylesheet" href="settings.css?v=20">
<link rel="stylesheet" href="settings.css?v=20260601-server-gray2">
<link rel="stylesheet" href="/css/ssh-terminal-window.css?v=20260509-floating-terminal-5">
<title><%= (branding && branding.appName) ? branding.appName : 'ADPanel' %> Settings</title>
<link id="favicon" rel="icon" type="image/webp" sizes="16x16"
href="<%= (branding && branding.faviconUrl) ? branding.faviconUrl : '/auth-assets/favicon' %>">
@@ -61,8 +60,14 @@
})();
</script>
<script nonce="<%= cspNonce %>" data-cfasync="false" src="/js/settings.js?v=26" defer></script>
<script nonce="<%= cspNonce %>">
window.__ADPANEL_CURRENT_USER__ = {
has2FA: <%- JSON.stringify(!!(user && String(user.secret || '').trim())) %>,
revokeSecurity: <%- JSON.stringify(destructiveActionSecurity || null) %>
};
</script>
<script nonce="<%= cspNonce %>" data-cfasync="false" src="/js/ssh-terminal-window.js?v=20260509-floating-terminal-5" defer></script>
<script nonce="<%= cspNonce %>" data-cfasync="false" src="/js/settings.js?v=20260601-server-gray2" defer></script>
<script nonce="<%= cspNonce %>">
(function(){
function enableLink(id){var l=document.getElementById(id);if(l)l.media='all';}
@@ -104,7 +109,9 @@
<% } %>
<button data-panel="databases"><i class="fa-solid fa-database"></i> Databases</button>
<button data-panel="nodes"><i class="fa-solid fa-diagram-project"></i> Nodes</button>
<% if (user && user.admin) { %>
<button data-panel="templates"><i class="fa-solid fa-file"></i> Templates</button>
<% } %>
<button data-panel="servers"><i class="fa-solid fa-server"></i> Servers</button>
<button data-panel="webhooks"><i class="fa-brands fa-discord"></i> Webhooks</button>
<% if (user && user.admin) { %>
@@ -181,7 +188,7 @@
<div class="thumbs" id="thumbs"></div>
</div>
<div class="note">Note: background set here will be applied to the dashboard and main style
<div class="note">Note: Background set here will be applied to the whole dashboard.
files.</div>
</div>
</div>
@@ -362,7 +369,7 @@
<div class="change-pass-header">
<div>
<div class="change-pass-title">Change password</div>
<small class="change-pass-subtitle">Requires current password & 2FA.</small>
<small class="change-pass-subtitle">Requires your current password.</small>
</div>
<div class="change-pass-icon"><i class="fa-solid fa-key"></i></div>
</div>
@@ -510,10 +517,10 @@
<div class="sessions-panel-header">
<div>
<div class="sessions-panel-title">Sessions</div>
<div class="sessions-panel-subtitle">Manage all ADPanel Sessions.</div>
<div class="sessions-panel-subtitle">Manage ADPanel sessions and saved browser logins.</div>
</div>
<div class="security-sessions-header-meta">
<span class="security-inline-chip" id="sessionsCountBadge">0 active</span>
<span class="security-inline-chip" id="sessionsCountBadge">0 logins</span>
</div>
</div>
@@ -525,7 +532,7 @@
placeholder="Search by Email" autocomplete="off" spellcheck="false">
</div>
<div id="sessionsSummary" class="security-summary sessions-summary">
Loading active browser sessions...
Loading browser sessions...
</div>
</div>
@@ -534,7 +541,7 @@
<div id="sessionsList" class="sessions-list">
<div class="sessions-empty-state">
<i class="fa-solid fa-spinner fa-spin"></i>
<span>Loading active sessions...</span>
<span>Loading browser sessions...</span>
</div>
</div>
@@ -752,6 +759,7 @@
<div id="nodesPagination" class="nodes-pagination"></div>
</div>
<% if (user && user.admin) { %>
<div id="templates" class="panel-section">
<div class="servers-header templates-header">
<div>
@@ -764,12 +772,14 @@
<input type="text" id="templatesSearchInput" placeholder="Search templates…" spellcheck="false" autocomplete="off" />
</div>
<button class="btn" id="openCreateTemplate"><i class="fa-solid fa-plus"></i> Create</button>
<button class="btn template-store-open-btn" id="openTemplateStore"><i class="fa-solid fa-store"></i> Store</button>
</div>
</div>
<div id="templatesFeedback" class="muted templates-feedback"></div>
<div id="templatesList" class="templates-grid templates-list"></div>
<div id="templatesPagination" class="nodes-pagination"></div>
</div>
<% } %>
<div id="servers" class="panel-section">
<div class="servers-header">
@@ -956,6 +966,7 @@
</div>
</div>
<% if (user && user.admin) { %>
<div id="serverTemplateOverlay" class="modal-overlay enterprise-modal-overlay" aria-hidden="true">
<div class="enterprise-modal server-template-enterprise-modal" id="serverTemplateModal">
<div class="enterprise-modal-header">
@@ -1038,51 +1049,16 @@
</div>
<div class="node-form-field" style="margin-top: 12px;">
<label class="node-form-label">Startup command <span class="node-form-hint">(optional)</span></label>
<textarea id="ct_startup_command" class="node-form-textarea" aria-describedby="ct_startupCommandHelp" placeholder="e.g. node /app/index.js"></textarea>
<small id="ct_startupCommandHelp" class="startup-cmd-help">Leave empty to use the image's Docker ENTRYPOINT/CMD. Direct image entry scripts like <code>bash entry.sh</code> are allowed; shell wrappers like <code>bash -lc</code> and Docker CLI commands are blocked.</small>
</div>
<div class="node-form-field" style="margin-top: 12px;">
<label class="node-form-label">Workdir <span class="node-form-hint">(optional)</span></label>
<input id="ct_workdir" type="text" class="node-form-input" placeholder="e.g. /app" />
<textarea id="ct_startup_command" class="node-form-textarea" aria-describedby="ct_startupCommandHelp" placeholder="e.g. node /app/index.js --port {{SERVER_PORT}}"></textarea>
</div>
<div class="node-form-field" style="margin-top: 12px;">
<label class="node-form-label">Environment JSON <span class="node-form-hint">(optional)</span></label>
<textarea id="ct_env_json" class="node-form-textarea" placeholder='{"SERVER_NAME":"My server"}'></textarea>
</div>
<div class="node-form-field" style="margin-top: 12px;">
<label class="node-form-label">ADPanel STARTUP <span class="node-form-hint">(optional)</span></label>
<textarea id="ct_adpanel_startup" class="node-form-textarea" placeholder='Example: ./game/bin/linuxsteamrt64/cs2 -dedicated -port {{SERVER_PORT}}'></textarea>
</div>
</div>
<div class="node-form-section">
<div class="node-form-section-title"><i class="fa-solid fa-download"></i> Installer</div>
<div class="node-form-grid">
<div class="node-form-field">
<label class="node-form-label">Installer image <span class="node-form-hint">(optional)</span></label>
<input id="ct_install_image" type="text" class="node-form-input" placeholder="ghcr.io/pterodactyl/installers:debian" />
</div>
<div class="node-form-field">
<label class="node-form-label">Entrypoint</label>
<input id="ct_install_entrypoint" type="text" class="node-form-input" placeholder="bash" />
</div>
</div>
<div class="node-form-grid" style="margin-top: 12px;">
<div class="node-form-field">
<label class="node-form-label">Install mount path</label>
<input id="ct_install_mount" type="text" class="node-form-input" placeholder="/mnt/server" />
</div>
<div class="node-form-field">
<label class="node-form-label">Runtime mount path</label>
<input id="ct_install_runtime" type="text" class="node-form-input" placeholder="/home/container" />
</div>
</div>
<div class="node-form-grid" style="margin-top: 12px;">
<div class="node-form-field">
<label class="node-form-label">Install timeout</label>
<input id="ct_install_timeout" type="number" min="60" max="7200" class="node-form-input" placeholder="1800" />
</div>
</div>
<div class="node-form-field" style="margin-top: 12px;">
<label class="node-form-label">Install script <span class="node-form-hint">(optional)</span></label>
<textarea id="ct_install_script" class="node-form-textarea" placeholder="Commands that install files into /mnt/server"></textarea>
@@ -1098,6 +1074,35 @@
</div>
</div>
<details class="node-form-section template-advanced-settings" id="ct_advanced_settings">
<summary class="template-advanced-summary">
<span class="node-form-section-title"><i class="fa-solid fa-sliders"></i> Advanced Settings</span>
<i class="fa-solid fa-chevron-down template-advanced-chevron"></i>
</summary>
<div class="template-advanced-content">
<div class="node-form-field">
<label class="node-form-label">Workdir <span class="node-form-hint">(optional)</span></label>
<input id="ct_workdir" type="text" class="node-form-input" placeholder="e.g. /app" />
</div>
<div class="node-form-grid" style="margin-top: 12px;">
<div class="node-form-field">
<label class="node-form-label">Installer image <span class="node-form-hint">(optional)</span></label>
<input id="ct_install_image" type="text" class="node-form-input" placeholder="e.g. debian:latest, ubuntu:22.04" />
</div>
<div class="node-form-field">
<label class="node-form-label">Install mount path</label>
<input id="ct_install_mount" type="text" class="node-form-input" placeholder="/mnt/server" />
</div>
</div>
<div class="node-form-grid" style="margin-top: 12px;">
<div class="node-form-field">
<label class="node-form-label">Runtime mount path</label>
<input id="ct_install_runtime" type="text" class="node-form-input" placeholder="/home/container" />
</div>
</div>
</div>
</details>
<div id="createTemplateFeedback" class="node-feedback"></div>
</div>
@@ -1111,6 +1116,38 @@
</div>
</div>
<div id="templateStoreOverlay" class="modal-overlay enterprise-modal-overlay" aria-hidden="true" inert>
<div class="enterprise-modal template-store-modal" id="templateStoreModal">
<div class="template-store-header">
<div class="template-store-brand">
<img src="https://cdn.jsdelivr.net/gh/antonndev/ADCDn/ADStore.webp" alt="AD Store" width="72" height="72">
</div>
<div class="template-store-toolbar">
<div class="template-store-tabs" role="tablist" aria-label="Template categories">
<button class="template-store-tab active" type="button" data-store-category="games">Games</button>
<button class="template-store-tab" type="button" data-store-category="communication">Communication</button>
<button class="template-store-tab" type="button" data-store-category="development">Development</button>
<button class="template-store-tab" type="button" data-store-category="hosting">Hosting</button>
<button class="template-store-tab" type="button" data-store-category="media">Media</button>
</div>
<div class="template-store-search">
<i class="fa-solid fa-magnifying-glass"></i>
<input type="search" id="templateStoreSearch" placeholder="Search store..." spellcheck="false" autocomplete="off">
</div>
</div>
<button class="enterprise-modal-close" id="templateStoreClose" aria-label="Close">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
<div class="template-store-body">
<div id="templateStoreFeedback" class="template-store-feedback" aria-live="polite"></div>
<div id="templateStoreGrid" class="template-store-grid"></div>
</div>
</div>
</div>
<% } %>
<div id="modalOverlay" class="modal-overlay enterprise-modal-overlay" aria-hidden="true">
<div class="enterprise-modal password-modal" id="changeModal">
<div class="enterprise-modal-header">
@@ -1209,6 +1246,14 @@
</button>
</div>
</div>
<div class="password-field">
<label class="password-label" id="adminChangePasswordCredentialLabel">2FA Code</label>
<div class="password-input-wrap">
<input type="text" id="adminChangePasswordCredential" placeholder="000000" autocomplete="one-time-code"
maxlength="6" inputmode="numeric" pattern="[0-9]*">
</div>
<small id="adminChangePasswordCredentialHint" style="color:var(--muted);font-size:12px;margin-top:4px;display:block;">Enter the code from your authenticator app.</small>
</div>
</div>
<div id="adminChangePasswordFeedback" class="node-feedback" style="display:none;"></div>
<div class="enterprise-modal-footer">
@@ -1273,8 +1318,8 @@
style="width: 130px; height: 90px;">
</div>
<div class="enterprise-modal-titles">
<h3 class="enterprise-modal-title">Setup 2FA</h3>
<p class="enterprise-modal-subtitle" id="qrResetUserEmail">Scan with your authenticator app.</p>
<h3 class="enterprise-modal-title">Reset 2FA</h3>
<p class="enterprise-modal-subtitle" id="qrResetUserEmail">Reset two-factor authentication.</p>
</div>
<button class="enterprise-modal-close" id="qrResetModalClose" aria-label="Close">
<i class="fa-solid fa-xmark"></i>
@@ -1282,40 +1327,48 @@
</div>
<div class="enterprise-modal-body" style="padding: 24px; text-align: center;">
<div id="qrResetLoading" style="padding: 40px;">
<div id="qrResetConfirm">
<div style="background: rgba(245, 158, 11, 0.1); border-radius: 8px; padding: 12px; margin-bottom: 16px; text-align: left;">
<i class="fa-solid fa-triangle-exclamation" style="color: #f59e0b; margin-right: 8px;"></i>
<span style="font-size: 13px; color: rgba(255,255,255,0.8);">This removes the user's two-factor
authentication. They will be asked to set up a new authenticator from their account settings after
their next login. For security, you (the admin) are never shown the user's 2FA secret.</span>
</div>
<div style="margin-bottom: 8px; text-align: left;">
<label for="qrResetCredential" id="qrResetCredentialLabel"
style="display:block; font-size: 13px; color: var(--muted); margin-bottom: 6px;">Current Password</label>
<input type="password" id="qrResetCredential" class="node-form-input" autocomplete="current-password"
placeholder="Current password" style="width: 100%;">
<p id="qrResetCredentialHint" style="font-size: 12px; color: var(--muted); margin-top: 6px;">Enter your
current password to confirm this action.</p>
</div>
<div id="qrResetConfirmError"
style="display: none; color: #f44747; font-size: 13px; text-align: left; margin-top: 8px;"></div>
</div>
<div id="qrResetLoading" style="display: none; padding: 40px;">
<i class="fa-solid fa-spinner fa-spin" style="font-size: 32px; color: var(--muted);"></i>
<p style="margin-top: 12px; color: var(--muted);">Generating new QR code...</p>
<p style="margin-top: 12px; color: var(--muted);">Resetting 2FA...</p>
</div>
<div id="qrResetContent" style="display: none;">
<div
style="background: white; padding: 16px; border-radius: 12px; display: inline-block; margin-bottom: 16px;">
<img id="qrResetImage" src="" alt="QR Code" style="width: 200px; height: 200px;">
</div>
<div style="margin-bottom: 16px;">
<p style="color: var(--muted); font-size: 13px; margin-bottom: 8px;">Or enter this secret manually:</p>
<div
style="background: rgba(0,0,0,0.2); padding: 12px 16px; border-radius: 8px; font-family: 'SF Mono', Monaco, monospace; font-size: 14px; letter-spacing: 2px; word-break: break-all;"
id="qrResetSecretText">
</div>
</div>
<div style="background: rgba(245, 158, 11, 0.1); border-radius: 8px; padding: 12px; margin-bottom: 16px;">
<i class="fa-solid fa-triangle-exclamation" style="color: #f59e0b; margin-right: 8px;"></i>
<span style="font-size: 13px; color: rgba(255,255,255,0.8);">The user must scan this QR code with their
authenticator app.</span>
<div style="background: rgba(52, 211, 153, 0.1); border-radius: 8px; padding: 16px;">
<i class="fa-solid fa-circle-check" style="color: #34d399; font-size: 24px;"></i>
<p style="margin-top: 10px; font-size: 14px; color: rgba(255,255,255,0.85);">2FA has been reset. The user
must set up 2FA again from their account settings after their next login.</p>
</div>
</div>
<div id="qrResetError" style="display: none; color: #f44747; padding: 20px;">
<i class="fa-solid fa-circle-exclamation" style="font-size: 24px;"></i>
<p style="margin-top: 8px;" id="qrResetErrorText">Failed to generate QR code</p>
<p style="margin-top: 8px;" id="qrResetErrorText">Failed to reset 2FA</p>
</div>
</div>
<div class="enterprise-modal-footer">
<button class="enterprise-btn-primary" id="qrResetDoneBtn"><i class="fa-solid fa-check"></i> Done</button>
<button class="enterprise-btn-primary" id="qrResetDoneBtn"><i class="fa-solid fa-shield-halved"></i> Reset 2FA</button>
</div>
</div>
</div>
@@ -1403,12 +1456,12 @@
</div>
</div>
<div class="node-form-section">
<div class="node-form-grid">
<div class="node-form-section">
<div class="node-form-grid">
<div class="node-form-field">
<label class="node-form-label" for="createUserPassword">Password</label>
<div class="create-user-password-wrap">
<input type="password" id="createUserPassword" class="node-form-input" placeholder="12-72 characters"
<input type="password" id="createUserPassword" class="node-form-input" placeholder="8-72 characters"
autocomplete="new-password" maxlength="72">
<button type="button" class="password-toggle create-user-password-toggle" data-target="createUserPassword" aria-label="Show password">
<i class="fa-solid fa-eye"></i>
@@ -1425,10 +1478,25 @@
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="node-form-section create-user-admin-stepup" id="createUserAdminStepUp" style="display: none;">
<div class="node-form-section">
<label class="node-form-label" for="createUserEnableTwoFactor">Two-Factor Authentication</label>
<label class="create-user-2fa-option" for="createUserEnableTwoFactor">
<span class="create-user-2fa-option-main">
<span class="create-user-2fa-option-icon"><i class="fa-solid fa-shield-halved"></i></span>
<span class="create-user-2fa-option-copy">
<strong>Enable 2FA setup</strong>
<small>Generate a QR code and recovery codes for this account.</small>
</span>
</span>
<input type="checkbox" id="createUserEnableTwoFactor">
<span class="create-user-2fa-switch" aria-hidden="true"></span>
</label>
</div>
<div class="node-form-section create-user-admin-stepup" id="createUserAdminStepUp" style="display: none;">
<div class="node-form-section-title"><i class="fa-solid fa-shield-halved"></i> Admin Approval</div>
<div class="node-form-grid">
<div class="node-form-field">
@@ -1441,10 +1509,10 @@
</button>
</div>
</div>
<div class="node-form-field">
<label class="node-form-label" for="createAdminTwoFactor">2FA Code</label>
<input type="text" id="createAdminTwoFactor" class="node-form-input create-user-2fa-input"
placeholder="000000" autocomplete="one-time-code" maxlength="6" inputmode="numeric" pattern="[0-9]*">
<div class="node-form-field" id="createAdminTwoFactorField">
<label class="node-form-label" for="createAdminTwoFactor">2FA Code</label>
<input type="text" id="createAdminTwoFactor" class="node-form-input create-user-2fa-input"
placeholder="000000" autocomplete="one-time-code" maxlength="6" inputmode="numeric" pattern="[0-9]*">
</div>
</div>
</div>
@@ -1479,27 +1547,27 @@
</div>
<div class="enterprise-modal-body" style="padding: 24px; text-align: center;">
<div style="background: rgba(245, 158, 11, 0.1); border-radius: 8px; padding: 12px; margin-bottom: 16px;">
<i class="fa-solid fa-triangle-exclamation" style="color: #f59e0b; margin-right: 8px;"></i>
<span style="font-size: 13px; color: rgba(255,255,255,0.8);">Give these credentials to the user. They can only
be shown ONCE!</span>
</div>
<div id="credentialsOneTimeNotice" style="background: rgba(245, 158, 11, 0.1); border-radius: 8px; padding: 12px; margin-bottom: 16px;">
<i class="fa-solid fa-triangle-exclamation" style="color: #f59e0b; margin-right: 8px;"></i>
<span id="credentialsOneTimeNoticeText" style="font-size: 13px; color: rgba(255,255,255,0.8);">Give these credentials to the user. They can only
be shown ONCE!</span>
</div>
<div style="background: white; padding: 16px; border-radius: 12px; display: inline-block; margin-bottom: 16px;">
<img id="credentialsQRCode" src="" alt="QR Code" style="width: 160px; height: 160px;">
</div>
<div id="credentialsQRCodeBlock" style="background: white; padding: 16px; border-radius: 12px; display: inline-block; margin-bottom: 16px;">
<img id="credentialsQRCode" src="" alt="QR Code" style="width: 160px; height: 160px;">
</div>
<div style="margin-bottom: 16px;">
<p style="color: var(--muted); font-size: 13px; margin-bottom: 8px;">2FA Secret:</p>
<div id="credentialsSecret"
style="background: rgba(0,0,0,0.2); padding: 12px 16px; border-radius: 8px; font-family: 'SF Mono', Monaco, monospace; font-size: 14px; letter-spacing: 2px; word-break: break-all;">
</div>
</div>
<div id="credentialsSecretBlock" style="margin-bottom: 16px;">
<p style="color: var(--muted); font-size: 13px; margin-bottom: 8px;">2FA Secret:</p>
<div id="credentialsSecret"
style="background: rgba(0,0,0,0.2); padding: 12px 16px; border-radius: 8px; font-family: 'SF Mono', Monaco, monospace; font-size: 14px; letter-spacing: 2px; word-break: break-all;">
</div>
</div>
<div style="margin-bottom: 16px;">
<p style="color: var(--muted); font-size: 13px; margin-bottom: 8px;">Recovery Codes:</p>
<div id="credentialsRecoveryCodes" style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;">
</div>
<div id="credentialsRecoveryBlock" style="margin-bottom: 16px;">
<p style="color: var(--muted); font-size: 13px; margin-bottom: 8px;">Recovery Codes:</p>
<div id="credentialsRecoveryCodes" style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;">
</div>
</div>
</div>
@@ -1882,10 +1950,6 @@
<label class="node-form-label">Daemon Port</label>
<input id="cn_daemon_port" type="number" class="node-form-input" min="1" max="65535" step="1" placeholder="8080" value="8080" />
</div>
<div class="node-form-field">
<label class="node-form-label">SFTP Port</label>
<input id="cn_sftp_port" type="number" class="node-form-input" min="1" max="65535" step="1" placeholder="2022" value="2022" />
</div>
</div>
</div>
@@ -2109,6 +2173,16 @@
</div>
</div>
<div class="node-form-section">
<div class="node-form-section-title"><i class="fa-solid fa-shield-halved"></i> Security Verification</div>
<div class="node-form-field">
<label class="node-form-label" id="maintenanceCredentialLabel">2FA Code</label>
<input type="text" id="maintenanceCredentialInput" class="node-form-input" placeholder="000000"
autocomplete="one-time-code" maxlength="6" inputmode="numeric" pattern="[0-9]*">
<span class="node-form-hint" id="maintenanceCredentialHint">Enter the code from your authenticator app.</span>
</div>
</div>
<div id="maintenanceModalFeedback" class="node-feedback"></div>
</div>
@@ -2143,13 +2217,14 @@
<div class="session-revoke-target-subvalue" id="sessionRevokeTargetEmail">—</div>
</div>
<div class="password-field">
<label class="password-label">2FA Code</label>
<div class="password-input-wrap">
<input type="text" id="sessionRevokeTwoFactorInput" placeholder="000000" autocomplete="one-time-code"
maxlength="6" inputmode="numeric" pattern="[0-9]*">
</div>
</div>
<div class="password-field">
<label class="password-label" id="sessionRevokeCredentialLabel">2FA Code</label>
<div class="password-input-wrap">
<input type="text" id="sessionRevokeTwoFactorInput" placeholder="000000" autocomplete="one-time-code"
maxlength="6" inputmode="numeric" pattern="[0-9]*">
</div>
<small id="sessionRevokeCredentialHint" style="color:var(--muted);font-size:12px;margin-top:4px;display:block;">Enter the code from your authenticator app.</small>
</div>
</div>
<div id="sessionRevokeModalFeedback" class="node-feedback" style="display:none;"></div>
@@ -2313,10 +2388,27 @@
<label class="node-form-label">Daemon Port</label>
<input id="nm_daemon_port" type="number" class="node-form-input" min="1" max="65535" step="1" />
</div>
<div class="node-form-field">
<label class="node-form-label">SFTP Port</label>
<input id="nm_sftp_port" type="number" class="node-form-input" min="1" max="65535" step="1" />
</div>
</div>
<div class="node-form-section" id="nm_disks_section">
<div class="node-form-section-title"><i class="fa-solid fa-hard-drive"></i> Additional Disks</div>
<p class="node-linking-desc" style="margin-top:-4px;">Mount extra storage volumes for this node. The
primary disk <code>/var/lib/node</code> is always available and cannot be removed.</p>
<div id="nm_disks_list" class="node-disks-list"></div>
<div id="nm_disks_feedback" class="node-feedback"></div>
<div class="node-disks-add" style="display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; margin-top:10px;">
<div class="node-form-field" style="flex:1 1 220px; min-width:200px;">
<label class="node-form-label" for="nm_disk_mount">Mount Path</label>
<input id="nm_disk_mount" type="text" class="node-form-input" placeholder="/mnt/disk1" autocomplete="off" />
</div>
<div class="node-form-field" style="flex:0 0 130px;">
<label class="node-form-label" for="nm_disk_limit">Limit (GB)</label>
<input id="nm_disk_limit" type="number" class="node-form-input" min="1" step="1" placeholder="e.g. 100" />
</div>
<button type="button" class="enterprise-btn-secondary" id="nm_disk_add" style="flex:0 0 auto;">
<i class="fa-solid fa-plus"></i> Add Disk
</button>
</div>
</div>
@@ -2344,7 +2436,7 @@
<div class="node-linking-header">
<div class="node-linking-info">
<div class="node-form-section-title"><i class="fa-solid fa-terminal"></i> Setup Command</div>
<p class="node-linking-desc">One-time command to configure the node</p>
<p class="node-linking-desc">One-time command to install and configure the node</p>
</div>
<button class="enterprise-btn-secondary node-generate-btn" id="nm_showCmd"><i
class="fa-solid fa-wand-magic-sparkles"></i> Generate</button>
@@ -2366,6 +2458,12 @@
<h4 class="node-danger-title">Delete this node</h4>
<p class="node-danger-desc">This action is permanent and cannot be undone. The node must have <strong>no
servers</strong> assigned before deletion.</p>
<div class="node-delete-security-field">
<label class="node-form-label" id="nm_deleteCredentialLabel">2FA Code</label>
<input type="text" id="nm_deleteCredential" class="node-form-input" placeholder="000000"
autocomplete="one-time-code" maxlength="6" inputmode="numeric" pattern="[0-9]*">
<span class="node-form-hint" id="nm_deleteCredentialHint">Enter the code from your authenticator app.</span>
</div>
</div>
<button class="node-danger-btn" id="nm_delete"><i class="fa-solid fa-trash"></i> Delete Node</button>
<div id="nm_deleteFeedback" class="node-feedback node-danger-feedback"></div>
@@ -2413,11 +2511,12 @@
<input id="res_serverName" type="text" class="node-form-input" maxlength="120" placeholder="My Server" />
</div>
<div class="node-form-field resource-rename-action">
<label class="node-form-label">Apply Rename</label>
<label class="node-form-label">
Apply Rename
</label>
<button type="button" id="res_renameServer" class="enterprise-btn-secondary resource-rename-btn">
<i class="fa-solid fa-pen"></i> Rename
</button>
<small class="resource-hint">Renames safely across panel, cache, and schedules.</small>
</div>
</div>
</div>
@@ -2429,31 +2528,28 @@
</div>
<div class="node-form-grid">
<div class="node-form-field">
<label class="node-form-label">RAM</label>
<label class="node-form-label">RAM <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">Memory limit. Typical: 1024–4096 MB.</span></span></label>
<div class="resource-input-wrapper">
<input id="res_ramMb" type="number" class="node-form-input" placeholder="2048" min="128" step="128" />
<span class="resource-input-suffix">MB</span>
</div>
<small class="resource-hint">Memory limit. Typical: 1024–4096 MB.</small>
</div>
<div class="node-form-field">
<label class="node-form-label">CPU Cores</label>
<label class="node-form-label">CPU Cores <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">Decimal supported (e.g. 1.5).</span></span></label>
<div class="resource-input-wrapper">
<input id="res_cpuCores" type="number" class="node-form-input" placeholder="2" min="0.5" step="0.5" />
<span class="resource-input-suffix">cores</span>
</div>
<small class="resource-hint">Decimal supported (e.g. 1.5).</small>
</div>
<div class="node-form-field">
<label class="node-form-label">Storage</label>
<label class="node-form-label">Storage <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">Max disk space for server files.</span></span></label>
<div class="resource-input-wrapper">
<input id="res_storageMb" type="number" class="node-form-input" placeholder="500" min="1" step="1" />
<span class="resource-input-suffix">MB</span>
</div>
<small class="resource-hint">Max disk space for server files.</small>
</div>
<div class="node-form-field">
<label class="node-form-label">Swap</label>
<label class="node-form-label">Swap <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">-1 = disabled, 0 = unlimited.</span></span></label>
<select id="res_swapMb" class="node-form-input resource-select">
<option value="-1">Disabled</option>
<option value="0">Unlimited</option>
@@ -2462,7 +2558,6 @@
<option value="1024">1024 MB</option>
<option value="2048">2048 MB</option>
</select>
<small class="resource-hint">-1 = disabled, 0 = unlimited.</small>
</div>
</div>
</div>
@@ -2474,40 +2569,34 @@
</div>
<div class="node-form-grid">
<div class="node-form-field">
<label class="node-form-label">Max Backups</label>
<label class="node-form-label">Max Backups <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">0 = unlimited.</span></span></label>
<div class="resource-input-wrapper">
<input id="res_backupsMax" type="number" class="node-form-input" placeholder="5" min="0" step="1" />
<span class="resource-input-suffix">backups</span>
</div>
<small class="resource-hint">0 = unlimited.</small>
</div>
<div class="node-form-field">
<label class="node-form-label">Max Schedules</label>
<label class="node-form-label">Max Schedules <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">0 = unlimited.</span></span></label>
<div class="resource-input-wrapper">
<input id="res_maxSchedules" type="number" class="node-form-input" placeholder="10" min="0" step="1" />
<span class="resource-input-suffix">schedules</span>
</div>
<small class="resource-hint">0 = unlimited.</small>
</div>
<div class="node-form-field">
<label class="node-form-label">I/O Priority</label>
<label class="node-form-label">I/O Priority <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">Disk I/O weight (10–1000).</span></span></label>
<input id="res_ioWeight" type="number" class="node-form-input" placeholder="500" min="10" max="1000" step="10" />
<small class="resource-hint">Disk I/O weight (10–1000).</small>
</div>
<div class="node-form-field">
<label class="node-form-label">CPU Priority</label>
<label class="node-form-label">CPU Priority <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">CPU weight (1–1000).</span></span></label>
<input id="res_cpuWeight" type="number" class="node-form-input" placeholder="500" min="1" max="1000" step="10" />
<small class="resource-hint">CPU weight (1–1000).</small>
</div>
<div class="node-form-field">
<label class="node-form-label">Process Limit</label>
<label class="node-form-label">Process Limit <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">Max processes (64–4096).</span></span></label>
<input id="res_pidsLimit" type="number" class="node-form-input" placeholder="512" min="64" max="4096" step="64" />
<small class="resource-hint">Max processes (64–4096).</small>
</div>
<div class="node-form-field">
<label class="node-form-label">File Limit</label>
<label class="node-form-label">File Limit <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">Max open files (1024–1048576).</span></span></label>
<input id="res_fileLimit" type="number" class="node-form-input" placeholder="65535" min="1024" max="1048576" step="1024" />
<small class="resource-hint">Max open files (1024–1048576).</small>
</div>
</div>
<div class="resource-usage-row" id="res_usageRow">
@@ -2531,28 +2620,25 @@
</div>
<div class="node-form-grid">
<div class="node-form-field">
<label class="node-form-label">Inbound</label>
<label class="node-form-label">Inbound <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">Packets received. Leave empty to disable.</span></span></label>
<div class="resource-input-wrapper">
<input id="res_networkInboundLimitMb" type="number" class="node-form-input" placeholder="10240" min="1" step="1" />
<span class="resource-input-suffix">MB</span>
</div>
<small class="resource-hint">Packets received. Leave empty to disable.</small>
</div>
<div class="node-form-field">
<label class="node-form-label">Outbound</label>
<label class="node-form-label">Outbound <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">Packets sent. Leave empty to disable.</span></span></label>
<div class="resource-input-wrapper">
<input id="res_networkOutboundLimitMb" type="number" class="node-form-input" placeholder="10240" min="1" step="1" />
<span class="resource-input-suffix">MB</span>
</div>
<small class="resource-hint">Packets sent. Leave empty to disable.</small>
</div>
<div class="node-form-field">
<label class="node-form-label">Reset After</label>
<label class="node-form-label">Reset After <span class="resource-tooltip"><i class="fa-solid fa-circle-question"></i><span class="resource-tooltip-card">When limits reset. Default: 1440 min.</span></span></label>
<div class="resource-input-wrapper">
<input id="res_networkResetMinutes" type="number" class="node-form-input" placeholder="1440" min="1" step="1" />
<span class="resource-input-suffix">min</span>
</div>
<small class="resource-hint">When limits reset. Default: 1440 min.</small>
</div>
</div>
</div>
@@ -2585,12 +2671,11 @@
<label class="node-form-label">Current</label>
<div class="startup-cmd-display" id="res_startupDisplay">
<div class="startup-cmd-display-header">
<div class="startup-cmd-display-label"><i class="fa-solid fa-terminal"></i> Running command</div>
<pre class="startup-cmd-code" id="res_startupPreview"><code>No startup command configured</code></pre>
<button type="button" class="startup-cmd-copy-btn" id="res_copyStartupCmd" title="Copy">
<i class="fa-solid fa-copy"></i>
</button>
</div>
<pre class="startup-cmd-code" id="res_startupPreview"><code>No startup command configured</code></pre>
</div>
</div>
<div class="node-form-field" style="margin-top: 16px;">
@@ -2599,14 +2684,7 @@
<div class="startup-cmd-editor-gutter"><span class="startup-cmd-prompt">$</span></div>
<textarea id="res_startupCommand" class="node-form-textarea startup-cmd-textarea" rows="4" spellcheck="false" placeholder="java -Xms128M -Xmx{RAM_MB}M -jar /data/server.jar nogui"></textarea>
</div>
<div class="startup-cmd-variables">
<span class="startup-cmd-var-label">Available variables:</span>
<code class="startup-cmd-var">{PORT}</code>
<code class="startup-cmd-var">{DATA_DIR}</code>
<code class="startup-cmd-var">{START_FILE}</code>
<code class="startup-cmd-var">{RAM_MB}</code>
<code class="startup-cmd-var">{CPU_CORES}</code>
</div>
<small id="res_startupCommandHelp" class="startup-cmd-help"></small>
</div>
<div class="node-form-field minecraft-java-field" id="res_javaVersionField" hidden>
@@ -2615,7 +2693,7 @@
<i class="fa-brands fa-java"></i>
<select id="res_javaVersion" class="node-form-input resource-select minecraft-java-select" aria-label="Minecraft Java version"></select>
</div>
<small class="resource-hint" id="res_javaVersionHint">Runs this Minecraft server with the selected Eclipse Temurin JRE image.</small>
<small class="resource-hint" id="res_javaVersionHint"></small>
</div>
</div>
@@ -2682,7 +2760,6 @@
<i class="fa-solid fa-plus"></i> Add Rule
</button>
</div>
<small class="resource-hint">Internal port must be allocated. Public port from node range.</small>
</div>
</div>
@@ -3483,6 +3560,17 @@
style="width: 100%; height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); background: rgba(0,0,0,0.2); color: rgba(255,255,255,0.95); font-size: 14px; outline: none;">
</div>
<div style="margin-bottom: 16px;">
<label id="webhookCredentialLabel"
style="display: block; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 8px;">
2FA Code
</label>
<input type="text" id="webhookCredentialInput" placeholder="000000" autocomplete="one-time-code"
maxlength="6" inputmode="numeric" pattern="[0-9]*"
style="width: 100%; height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); background: rgba(0,0,0,0.2); color: rgba(255,255,255,0.95); font-size: 14px; outline: none;">
<small id="webhookCredentialHint" style="display:block;margin-top:6px;font-size:12px;color:var(--muted);">Enter the code from your authenticator app.</small>
</div>
<div style="background: rgba(59, 130, 246, 0.1); border-radius: 8px; padding: 12px; margin-top: 12px;">
<i class="fa-solid fa-circle-info" style="color: #3b82f6; margin-right: 8px;"></i>
<span style="font-size: 13px; color: rgba(255,255,255,0.8);">Paste a Discord webhook URL. Go to your Discord
@@ -3522,6 +3610,17 @@
<span style="font-size: 13px; color: rgba(255,255,255,0.8);" id="webhookDeleteText">Are you sure you want to
remove this webhook?</span>
</div>
<div style="margin-top: 16px;">
<label id="webhookDeleteCredentialLabel"
style="display: block; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 8px;">
2FA Code
</label>
<input type="text" id="webhookDeleteCredentialInput" placeholder="000000" autocomplete="one-time-code"
maxlength="6" inputmode="numeric" pattern="[0-9]*"
style="width: 100%; height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); background: rgba(0,0,0,0.2); color: rgba(255,255,255,0.95); font-size: 14px; outline: none;">
<small id="webhookDeleteCredentialHint" style="display:block;margin-top:6px;font-size:12px;color:var(--muted);">Enter the code from your authenticator app.</small>
</div>
<div id="webhookDeleteError" style="display: none; color: #f44747; font-size: 13px; margin-top: 12px;"></div>
</div>
<div class="enterprise-modal-footer">
+1270
View File
File diff suppressed because it is too large. Load diff
+16
View File
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<title>ADPanel | Suspended server</title>
<style>
*{margin:0;padding:0;box-sizing:border-box}
html,body{width:100%;height:100%;overflow:hidden;touch-action:none}
body{background:#000}
body::before{content:'';position:fixed;top:0;left:0;width:100%;height:100%;background:url('https://cdn.jsdelivr.net/gh/antonndev/ADCDn/suspended.avif') no-repeat center/cover;pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}
</style>
<script>document.addEventListener('wheel',e=>e.ctrlKey&&e.preventDefault(),{passive:false});document.addEventListener('keydown',e=>(e.ctrlKey&&(e.key==='+'||e.key==='-'||e.key==='0'))&&e.preventDefault())</script>
</head>
<body></body>
</html>