Update public/index.html
Browse files- public/index.html +29 -66
public/index.html
CHANGED
|
@@ -2,78 +2,41 @@
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8" />
|
| 5 |
-
<meta
|
| 6 |
-
<
|
| 7 |
-
<
|
|
|
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
-
<div id="
|
| 11 |
-
<h1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
<
|
| 15 |
-
|
| 16 |
-
<
|
| 17 |
-
<
|
| 18 |
-
<input id="clientId" placeholder="Device ID (for register)" />
|
| 19 |
-
<div class="button-row">
|
| 20 |
-
<button onclick="doRegister()">Register</button>
|
| 21 |
-
<button onclick="doLogin()">Login</button>
|
| 22 |
-
</div>
|
| 23 |
-
<p id="authMessage" class="message"></p>
|
| 24 |
</div>
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
<!-- βββ 2b. Live Stats βββββββββββββββββββββββββββββββββββββββββββββββββββββ -->
|
| 38 |
-
<div class="card">
|
| 39 |
-
<h2>π Live Stats</h2>
|
| 40 |
-
<p>Server Uptime: <span id="uptime">0s</span></p>
|
| 41 |
-
<p>System Status — CPU: <span id="cpu">0%</span>, Mem: <span id="mem">0%</span>, Disk: <span id="disk">0%</span></p>
|
| 42 |
-
<p>Users — Total: <span id="totalUsers">0</span>, Active: <span id="activeUsers">0</span>, Banned: <span id="bannedUsers">0</span></p>
|
| 43 |
-
</div>
|
| 44 |
-
|
| 45 |
-
<!-- βββ 2c. Admin Dashboard (shown only if admin) ββββββββββββββββββββββββββ -->
|
| 46 |
-
<div id="adminPanel" class="card" style="display:none;">
|
| 47 |
-
<h2>π οΈ Admin Dashboard</h2>
|
| 48 |
-
<button onclick="fetchUsers()">Refresh User List</button>
|
| 49 |
-
<div id="adminUserList"></div>
|
| 50 |
-
<p id="adminMessage" class="message"></p>
|
| 51 |
-
</div>
|
| 52 |
-
|
| 53 |
-
<!-- βββ 2d. User Console βββββββββββββββββββββββββββββββββββββββββββββββββββ -->
|
| 54 |
-
<div class="card">
|
| 55 |
-
<h2>π» User Console</h2>
|
| 56 |
-
<button onclick="startSession()">Start Session</button>
|
| 57 |
-
<input id="commandInput" placeholder="Type repo URL or command (e.g. list, clear, run index.js)" />
|
| 58 |
-
<button onclick="sendCommand()">Send</button>
|
| 59 |
-
<pre id="consoleOutput"></pre>
|
| 60 |
-
</div>
|
| 61 |
-
|
| 62 |
-
<!-- βββ 2e. Password Reset βββββββββββββββββββββββββββββββββββββββββββββββββ -->
|
| 63 |
-
<div class="card">
|
| 64 |
-
<h2>π Password Reset</h2>
|
| 65 |
-
<input id="resetClientId" placeholder="Enter Device ID for reset" />
|
| 66 |
-
<button onclick="requestReset()">Request Reset Token</button><br/>
|
| 67 |
-
<input id="resetToken" placeholder="Reset Token" />
|
| 68 |
-
<input id="newPassword" type="password" placeholder="New Password" />
|
| 69 |
-
<button onclick="submitReset()">Reset Password</button>
|
| 70 |
-
<p id="resetMessage" class="message"></p>
|
| 71 |
-
</div>
|
| 72 |
</div>
|
| 73 |
</div>
|
| 74 |
|
| 75 |
-
|
| 76 |
-
<script src="
|
| 77 |
-
<script src="script.js"></script>
|
| 78 |
</body>
|
| 79 |
</html>
|
|
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8" />
|
| 5 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
+
<title>WhatsApp Bot Panel</title>
|
| 8 |
+
<link rel="stylesheet" href="./style.css" />
|
| 9 |
</head>
|
| 10 |
<body>
|
| 11 |
+
<div id="login-screen">
|
| 12 |
+
<h1>Login</h1>
|
| 13 |
+
<input id="username" placeholder="Username" />
|
| 14 |
+
<input id="password" type="password" placeholder="Password" />
|
| 15 |
+
<button id="login-btn">Login</button>
|
| 16 |
+
<div id="login-message"></div>
|
| 17 |
+
</div>
|
| 18 |
|
| 19 |
+
<div id="panel" style="display: none;">
|
| 20 |
+
<h1>Bot Panel</h1>
|
| 21 |
+
<div>
|
| 22 |
+
<label>Your User ID: <span id="userId-display"></span></label>
|
| 23 |
+
<button id="start-btn">Start Session</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
</div>
|
| 25 |
+
<div id="chat-container" style="display: none;">
|
| 26 |
+
<div id="messages" style="border: 1px solid #ccc; height: 300px; overflow-y: scroll;"></div>
|
| 27 |
+
<input id="input" placeholder="Type command or bot input..." />
|
| 28 |
+
<button id="send-btn">Send</button>
|
| 29 |
+
</div>
|
| 30 |
+
<div id="admin-panel" style="display: none;">
|
| 31 |
+
<h2>Admin Controls</h2>
|
| 32 |
+
<button id="get-users-btn">Get All Users</button>
|
| 33 |
+
<div id="user-list"></div>
|
| 34 |
+
<button id="get-banned-btn">Get Banned List</button>
|
| 35 |
+
<div id="banned-list"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
</div>
|
| 37 |
</div>
|
| 38 |
|
| 39 |
+
<script src="https://cdn.socket.io/4.7.2/socket.io.min.js"></script>
|
| 40 |
+
<script src="./script.js"></script>
|
|
|
|
| 41 |
</body>
|
| 42 |
</html>
|