297 lines
16 KiB
HTML
297 lines
16 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en" class="h-full">
|
||
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta http-equiv="Permissions-Policy" content="clipboard-write=(self https://sftp.my-mc.link)">
|
||
<title>My-MC Panel</title>
|
||
<link rel="stylesheet" href="/css/styles.min.css?p=1">
|
||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/xterm@5.3.0/lib/xterm.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/xterm-addon-fit@0.8.0/lib/xterm-addon-fit.min.js"></script>
|
||
<link href="https://cdn.jsdelivr.net/npm/xterm@5.3.0/css/xterm.css" rel="stylesheet" />
|
||
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
|
||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
|
||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
|
||
<link rel="manifest" href="/favicon/site.webmanifest">
|
||
</head>
|
||
|
||
<body class="bg-gray-900 text-white overflow-x-hidden min-h-full flex flex-col">
|
||
<div id="app" class="flex-grow">
|
||
<div id="loginPage" class="hidden fixed inset-0 bg-gray-900 flex items-center justify-center">
|
||
<div class="bg-gray-800 p-8 rounded-lg shadow-lg w-full max-w-md">
|
||
<h2 class="text-2xl font-bold mb-6 text-center">My-MC Panel</h2>
|
||
<div class="mb-4">
|
||
<input id="loginApiKey" type="text" placeholder="Enter API Key"
|
||
class="bg-gray-700 px-4 py-2 rounded text-white w-full">
|
||
</div>
|
||
<button id="loginBtn" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded w-full">Login</button>
|
||
<p id="loginError" class="text-red-500 text-sm mt-2 hidden"></p>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="notificationContainer"></div>
|
||
|
||
<div id="tellModal" class="modal hidden">
|
||
<div class="modal-content">
|
||
<button class="modal-close">×</button>
|
||
<h2 class="text-xl font-semibold mb-4">Send Message to <span id="tellPlayerName"></span></h2>
|
||
<form id="tellForm">
|
||
<textarea id="tellMessage" placeholder="Enter your message"
|
||
class="bg-gray-700 px-4 py-2 rounded text-white w-full h-24 mb-4"></textarea>
|
||
<button type="submit" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded w-full">Send</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="giveModal" class="modal hidden">
|
||
<div class="modal-content">
|
||
<button class="modal-close">×</button>
|
||
<h2 class="text-xl font-semibold mb-4">Give Items to <span id="givePlayerName"></span></h2>
|
||
<form id="giveForm">
|
||
<div class="mb-4">
|
||
<label for="loadoutSelect" class="block text-sm font-medium mb-1">Select Loadout</label>
|
||
<select id="loadoutSelect" class="bg-gray-700 px-4 py-2 rounded text-white w-full">
|
||
<option value="custom">Custom</option>
|
||
<option value="starter">Starter Kit (Torches, Food)</option>
|
||
<option value="builder">Builder Kit (Stone, Wood)</option>
|
||
<option value="combat">Combat Kit (Sword, Armor)</option>
|
||
<option value="miner">Miner Kit (Pickaxe, Torches, Shovel)</option>
|
||
<option value="adventurer">Adventurer Kit (Bow, Arrows, Compass)</option>
|
||
<option value="alchemist">Alchemist Kit (Potions, Brewing Stand)</option>
|
||
<option value="enchanter">Enchanter Kit (Books, Lapis, Enchanting Table)</option>
|
||
<option value="farmer">Farmer Kit (Seeds, Hoe, Bone Meal)</option>
|
||
<option value="nether">Nether Survival Kit (Fire Resistance, Obsidian)</option>
|
||
<option value="end">End Prep Kit (Ender Pearls, Blaze Rods)</option>
|
||
</select>
|
||
</div>
|
||
<div id="customGiveFields" class="hidden mb-4">
|
||
<div id="itemList" class="space-y-2"></div>
|
||
<button type="button" id="addItemBtn" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded mt-2">Add
|
||
Item</button>
|
||
</div>
|
||
<button type="submit" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded w-full">Give</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="teleportModal" class="modal hidden">
|
||
<div class="modal-content">
|
||
<button class="modal-close">×</button>
|
||
<h2 class="text-xl font-semibold mb-4">Teleport <span id="teleportPlayerName"></span></h2>
|
||
<form id="teleportForm">
|
||
<div class="mb-4">
|
||
<label for="teleportDestination" class="block text-sm font-medium mb-1">Select Destination Player</label>
|
||
<select id="teleportDestination" class="bg-gray-700 px-4 py-2 rounded text-white w-full">
|
||
<!-- Options populated dynamically -->
|
||
</select>
|
||
</div>
|
||
<button type="submit" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded w-full">Teleport</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="effectModal" class="modal hidden">
|
||
<div class="modal-content">
|
||
<button class="modal-close">×</button>
|
||
<h2 class="text-xl font-semibold mb-4">Apply Effect to <span id="effectPlayerName"></span></h2>
|
||
<form id="effectForm">
|
||
<div class="mb-4">
|
||
<label for="effectSelect" class="block text-sm font-medium mb-1">Select Effect</label>
|
||
<select id="effectSelect" class="bg-gray-700 px-4 py-2 rounded text-white w-full">
|
||
<option value="speed:30:1">Speed (30s, Level 1)</option>
|
||
<option value="strength:30:1">Strength (30s, Level 1)</option>
|
||
<option value="regeneration:30:1">Regeneration (30s, Level 1)</option>
|
||
<option value="jump_boost:30:1">Jump Boost (30s, Level 1)</option>
|
||
<option value="invisibility:30:1">Invisibility (30s, Level 1)</option>
|
||
<option value="night_vision:60:1">Night Vision (60s, Level 1)</option>
|
||
<option value="fire_resistance:60:1">Fire Resistance (60s, Level 1)</option>
|
||
<option value="water_breathing:60:1">Water Breathing (60s, Level 1)</option>
|
||
</select>
|
||
</div>
|
||
<button type="submit" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded w-full">Apply Effect</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="editPropertiesModal" class="modal hidden">
|
||
<div class="modal-content">
|
||
<button class="modal-close">×</button>
|
||
<h2 class="text-xl font-semibold mb-4">Edit server.properties</h2>
|
||
<form id="editPropertiesForm" class="space-y-4">
|
||
<div id="propertiesFields" class="space-y-2"></div>
|
||
<button type="submit" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded w-full">Save</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="updateModsModal" class="modal hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-2 sm:p-4">
|
||
<div class="modal-content bg-gray-900 rounded-lg max-w-[95%] w-full sm:w-[90%] md:w-[85%] lg:w-[80%] mx-auto flex flex-col max-h-[95vh]">
|
||
<div class="flex justify-between items-center p-4 border-b">
|
||
<h2 class="text-xl font-semibold text-white">Mod Update Output</h2>
|
||
<button class="modal-close text-2xl font-bold text-white">×</button>
|
||
</div>
|
||
<pre id="updateModsOutput" class="flex-1 p-4 text-white text-sm max-h-[calc(95vh-10rem)] overflow-y-auto overflow-x-auto whitespace-pre-wrap break-words leading-relaxed"></pre>
|
||
<div class="p-4 border-t">
|
||
<button id="closeUpdateModsBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded w-full">Close</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<nav class="bg-gray-800 p-4 shadow-lg">
|
||
<div class="container mx-auto flex justify-between items-center">
|
||
<h1 class="text-2xl font-bold">My-MC Panel</h1>
|
||
<div class="flex space-x-4">
|
||
<button id="refresh" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded">Refresh</button>
|
||
<button id="backupBtn" class="bg-purple-600 hover:bg-purple-700 px-4 py-2 rounded">Backup</button>
|
||
<button id="sftpBtn" class="bg-green-600 hover:bg-green-700 px-4 py-2 rounded">SFTP</button>
|
||
<div id="authControls">
|
||
<input id="apiKey" type="text" placeholder="Enter API Key" class="bg-gray-700 px-4 py-2 rounded text-white">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<main id="mainContent" class="container mx-auto p-6">
|
||
<div class="bg-gray-800 p-6 rounded-lg shadow-lg mb-6" data-section="server-status">
|
||
<h2 class="text-xl font-semibold mb-4">Server Status</h2>
|
||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||
<div>
|
||
<p><strong>User:</strong> <span id="user">Loading...</span></p>
|
||
<p><strong>Key Expiry:</strong> <span id="keyExpiry">Loading...</span></p>
|
||
<p><strong>Status:</strong> <span id="serverStatus">Loading...</span></p>
|
||
</div>
|
||
<div class="flex space-x-4 justify-center">
|
||
<div class="text-center">
|
||
<canvas id="memoryMeter" width="150" height="150"></canvas>
|
||
<p class="text-sm mt-2"><b>Memory Usage</b></p>
|
||
<p id="memoryPercent" class="text-lg font-bold">0%</p>
|
||
</div>
|
||
<div class="text-center">
|
||
<canvas id="cpuMeter" width="150" height="150"></canvas>
|
||
<p class="text-sm mt-2"><b>CPU Usage</b></p>
|
||
<p id="cpuPercent" class="text-lg font-bold">0%</p>
|
||
</div>
|
||
</div>
|
||
<div class="flex flex-wrap space-x-2 justify-end items-center">
|
||
<div class="flex space-x-2">
|
||
<button id="startBtn"
|
||
class="bg-green-600 hover:bg-green-700 rounded font-medium control-btn">Start</button>
|
||
<button id="stopBtn" class="bg-red-600 hover:bg-red-700 rounded font-medium control-btn">Stop</button>
|
||
<button id="restartBtn"
|
||
class="bg-yellow-600 hover:bg-yellow-700 rounded font-medium control-btn">Restart</button>
|
||
</div>
|
||
<button id="editPropertiesBtn"
|
||
class="bg-purple-600 hover:bg-purple-700 px-4 py-2 rounded control-btn w-full mt-2">Edit Server
|
||
Properties</button>
|
||
<button id="updateModsBtn"
|
||
class="bg-purple-600 hover:bg-purple-700 px-4 py-2 rounded control-btn w-full mt-2">Update Mods</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="bg-gray-800 p-6 rounded-lg shadow-lg mb-6">
|
||
<h2 class="text-xl font-semibold mb-4">Player Management</h2>
|
||
<div class="mb-4"></div>
|
||
<p><strong>Connected Players:</strong><br> <span id="playerList">Loading...</span></p>
|
||
</div>
|
||
|
||
<div class="bg-gray-800 p-6 rounded-lg shadow-lg mb-6">
|
||
<h2 class="text-xl font-semibold mb-4">Server Logs</h2>
|
||
<div id="dockerLogsTerminal" class="mt-4"></div>
|
||
</div>
|
||
|
||
<div class="bg-gray-800 p-6 rounded-lg shadow-lg mb-6">
|
||
<h2 class="text-xl font-semibold mb-4">Server Console</h2>
|
||
<form id="consoleForm" onsubmit="event.preventDefault(); sendConsoleCommand();">
|
||
<input id="consoleInput" type="text" placeholder="Enter RCON Command (Hit Enter To Submit)"
|
||
class="bg-gray-700 px-4 py-2 rounded text-white w-full mb-2">
|
||
<button id="sendConsole" type="submit" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded"
|
||
style="display: none;">Send</button>
|
||
</form>
|
||
<pre id="consoleOutput" class="bg-gray-900 p-4 rounded mt-4 h-48 overflow-y-auto"></pre>
|
||
</div>
|
||
|
||
<div class="bg-gray-800 p-6 rounded-lg shadow-lg mb-6" id="sftpBrowserSection" style="display: none;">
|
||
<h2 class="text-xl font-semibold mb-4">SFTP Browser</h2>
|
||
<!-- Iframe height set explicitly to 650px to ensure visibility and prevent shrinking -->
|
||
<iframe
|
||
id="sftpIframe"
|
||
class="w-full rounded"
|
||
style="height: 650px; min-height: 650px;"
|
||
sandbox="allow-same-origin allow-scripts allow-downloads"
|
||
allow="clipboard-read; clipboard-write"
|
||
></iframe>
|
||
</div>
|
||
|
||
<div class="bg-gray-800 p-6 rounded-lg shadow-lg mb-6">
|
||
<h2 class="text-xl font-semibold mb-4">Mod Management</h2>
|
||
<form id="modSearchForm" onsubmit="event.preventDefault(); searchMods(1);">
|
||
<div class="mb-4 flex space-x-2">
|
||
<input id="modSearch" type="text" placeholder="Search Mods (Hit Enter To Submit)"
|
||
class="bg-gray-700 px-4 py-2 rounded text-white flex-grow">
|
||
<button id="searchBtn" type="submit" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded"
|
||
style="display: none;">Search</button>
|
||
<button id="closeSearchBtn" type="button"
|
||
class="bg-gray-600 hover:bg-gray-700 px-4 py-2 rounded hidden">Close</button>
|
||
</div>
|
||
</form>
|
||
<div id="modResults" class="grid grid-cols-1 md:grid-cols-2 gap-4"></div>
|
||
<div id="pagination" class="mt-4 flex justify-center space-x-2"></div>
|
||
<h3 class="text-lg font-semibold mt-4">Installed Mods</h3>
|
||
<div class="mb-4 flex space-x-2">
|
||
<input id="modListSearch" type="text" placeholder="Search Installed Mods"
|
||
class="bg-gray-700 px-4 py-2 rounded text-white flex-grow">
|
||
<button id="clearModListSearch" type="button"
|
||
class="bg-gray-600 hover:bg-gray-700 px-4 py-2 rounded hidden">Clear</button>
|
||
</div>
|
||
<div id="modList" class="mt-2 grid grid-cols-1 md:grid-cols-2 gap-4"></div>
|
||
<div id="modListPagination" class="mt-4 flex justify-center space-x-2"></div>
|
||
</div>
|
||
|
||
<div class="bg-gray-800 p-6 rounded-lg shadow-lg mb-6">
|
||
<h2 class="text-xl font-semibold mb-4">Server Links</h2>
|
||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||
<p><strong>Advanced Log URL:</strong> <a id="logUrl" href="#" class="text-blue-400"
|
||
target="_blank">Loading...</a></p>
|
||
<p><strong>Website URL:</strong> <a id="websiteUrl" href="#" class="text-blue-400"
|
||
target="_blank">Loading...</a></p>
|
||
<p><strong>BlueMap URL:</strong> <a id="mapUrl" href="#" class="text-blue-400" target="_blank">Loading...</a>
|
||
</p>
|
||
<div>
|
||
<p><strong>Connection Link:</strong> <span id="myLink">Link Not Created</span> <span
|
||
id="connectionStatus"></span></p>
|
||
<button id="generateMyLinkBtn" class="bg-blue-600 hover:bg-blue-700 px-4 py-1 rounded mt-2">Generate
|
||
Connection Link</button>
|
||
</div>
|
||
<div>
|
||
<p><strong>Geyser Link:</strong> <span id="geyserLink">Link Not Created</span> <span
|
||
id="geyserStatus"></span></p>
|
||
<button id="generateGeyserLinkBtn" class="bg-blue-600 hover:bg-blue-700 px-4 py-1 rounded mt-2">Generate
|
||
Geyser Link</button>
|
||
</div>
|
||
<div>
|
||
<p><strong>SFTP Link:</strong> <span id="sftpLink">Link Not Created</span> <span id="sftpStatus"></span></p>
|
||
<button id="generateSftpLinkBtn" class="bg-blue-600 hover:bg-blue-700 px-4 py-1 rounded mt-2">Generate SFTP
|
||
Link</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</main>
|
||
|
||
<footer class="bg-gray-800 py-4">
|
||
<div class="container mx-auto px-6 text-center">
|
||
<p class="text-gray-400 text-sm">
|
||
© 2025 My-MC.Link. All rights reserved.<br>
|
||
<a href="https://raven-scott.fyi" target="_blank" class="text-blue-400 hover:text-blue-500">Made with ❤️ by
|
||
SNXRaven</a> | <a href="https://git.ssh.surf/hypermc/panel" target="_blank" class="text-blue-400 hover:text-blue-500">Source Code</a>
|
||
</p>
|
||
</div>
|
||
</footer>
|
||
</div>
|
||
|
||
<script src="js/app.js"></script>
|
||
</body>
|
||
|
||
</html> |