Update public/index.html
Browse files- public/index.html +55 -57
public/index.html
CHANGED
|
@@ -1,80 +1,78 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
-
<meta charset="UTF-8"
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0"
|
| 6 |
-
<title
|
| 7 |
-
<link rel="stylesheet" href="style.css"
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
-
<div
|
| 11 |
-
<
|
| 12 |
-
<h1>24/7 Bot Deployment Panel</h1>
|
| 13 |
-
<div class="status-indicator" id="status">Connected</div>
|
| 14 |
-
</header>
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
<
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
</div>
|
|
|
|
| 22 |
</div>
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
<
|
| 30 |
-
|
| 31 |
-
|
|
|
|
| 32 |
</div>
|
| 33 |
-
</div>
|
| 34 |
|
| 35 |
-
|
| 36 |
-
<
|
| 37 |
-
|
| 38 |
-
<
|
| 39 |
-
<
|
| 40 |
-
<
|
| 41 |
-
</div>
|
| 42 |
-
<div class="input-group">
|
| 43 |
-
<select id="pm2Command">
|
| 44 |
-
<option value="start">start</option>
|
| 45 |
-
<option value="stop">stop</option>
|
| 46 |
-
<option value="restart">restart</option>
|
| 47 |
-
<option value="list">list</option>
|
| 48 |
-
<option value="logs">logs</option>
|
| 49 |
-
</select>
|
| 50 |
-
<button id="pm2Btn">PM2</button>
|
| 51 |
</div>
|
| 52 |
-
</div>
|
| 53 |
|
| 54 |
-
|
| 55 |
-
<
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
<
|
| 59 |
-
<
|
| 60 |
</div>
|
| 61 |
-
</div>
|
| 62 |
|
| 63 |
-
|
| 64 |
-
<div
|
| 65 |
-
|
| 66 |
-
<
|
| 67 |
-
<input
|
|
|
|
|
|
|
| 68 |
</div>
|
| 69 |
-
</div>
|
| 70 |
|
| 71 |
-
|
| 72 |
-
<
|
| 73 |
-
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
</div>
|
| 76 |
</div>
|
| 77 |
|
|
|
|
| 78 |
<script src="/socket.io/socket.io.js"></script>
|
| 79 |
<script src="script.js"></script>
|
| 80 |
</body>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
| 6 |
+
<title>π± WhatsApp Bot Hosting Panel</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css" />
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
+
<div id="app">
|
| 11 |
+
<h1>π± WhatsApp Bot Hosting Panel</h1>
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
<!-- βββ 1. Authentication Card βββββββββββββββββββββββββββββββββββββββββββββ -->
|
| 14 |
+
<div id="authCard" class="card">
|
| 15 |
+
<h2>π Register / Login</h2>
|
| 16 |
+
<input id="username" placeholder="Username" />
|
| 17 |
+
<input id="password" type="password" placeholder="Password" />
|
| 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 |
+
<!-- βββ 2. Main Panel (hidden until login) βββββββββββββββββββββββββββββββββ -->
|
| 27 |
+
<div id="mainPanel" style="display:none;">
|
| 28 |
+
<!-- βββ 2a. User Info + Logout βββββββββββββββββββββββββββββββββββββββββββββ -->
|
| 29 |
+
<div class="card">
|
| 30 |
+
<p>
|
| 31 |
+
<b>User ID:</b> <span id="displayUserId"></span>
|
| 32 |
+
<span id="adminBadge" class="admin-badge" style="display:none;">(Admin)</span>
|
| 33 |
+
</p>
|
| 34 |
+
<button class="small-button" onclick="doLogout()">Logout</button>
|
| 35 |
</div>
|
|
|
|
| 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 |
+
<!-- βββ Include Socket.IO and Frontend Logic βββββββββββββββββββββββββββββββββ -->
|
| 76 |
<script src="/socket.io/socket.io.js"></script>
|
| 77 |
<script src="script.js"></script>
|
| 78 |
</body>
|