Trigger82 commited on
Commit
235e839
Β·
verified Β·
1 Parent(s): 0349cb4

Update public/index.html

Browse files
Files changed (1) hide show
  1. 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 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 &mdash; CPU: <span id="cpu">0%</span>, Mem: <span id="mem">0%</span>, Disk: <span id="disk">0%</span></p>
42
- <p>Users &mdash; 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>
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>