first commit
This commit is contained in:
221
public/index.html
Normal file
221
public/index.html
Normal file
@ -0,0 +1,221 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="h-full">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>My-MC Server Panel</title>
|
||||
<link rel="stylesheet" href="/css/styles.min.css">
|
||||
<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 Server 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="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>
|
||||
|
||||
<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 Server 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>
|
||||
<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">Memory Usage</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">CPU Usage</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>
|
||||
</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">
|
||||
<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 id="modList" class="mt-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>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user