Trigger82 commited on
Commit
315722c
Β·
verified Β·
1 Parent(s): b432d2b

Update public/index.html

Browse files
Files changed (1) hide show
  1. 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>24/7 Bot Deployment Panel</title>
7
- <link rel="stylesheet" href="style.css">
8
  </head>
9
  <body>
10
- <div class="container">
11
- <header>
12
- <h1>24/7 Bot Deployment Panel</h1>
13
- <div class="status-indicator" id="status">Connected</div>
14
- </header>
15
 
16
- <div class="panel">
17
- <h2>Repository Setup</h2>
18
- <div class="input-group">
19
- <input type="text" id="repoUrl" placeholder="https://github.com/user/repo">
20
- <button id="cloneBtn">Clone</button>
 
 
 
 
21
  </div>
 
22
  </div>
23
 
24
- <div class="panel">
25
- <h2>Dependencies</h2>
26
- <div class="input-group">
27
- <select id="packageManager">
28
- <option value="npm">npm</option>
29
- <option value="yarn">yarn</option>
30
- </select>
31
- <button id="installBtn">Install</button>
 
32
  </div>
33
- </div>
34
 
35
- <div class="panel">
36
- <h2>Process Control</h2>
37
- <div class="input-group">
38
- <input type="text" id="startCommand" placeholder="npm start / node index.js / etc">
39
- <button id="startBtn">Start</button>
40
- <button id="stopBtn">Stop</button>
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
- <div class="panel file-browser">
55
- <h2>File Browser</h2>
56
- <div class="file-list" id="fileList"></div>
57
- <div class="file-editor">
58
- <textarea id="fileEditor"></textarea>
59
- <button id="saveFileBtn">Save</button>
60
  </div>
61
- </div>
62
 
63
- <div class="terminal">
64
- <div id="output"></div>
65
- <div class="input-line">
66
- <span class="prompt">$</span>
67
- <input type="text" id="commandInput" autocomplete="off">
 
 
68
  </div>
69
- </div>
70
 
71
- <div class="admin-panel" id="adminPanel">
72
- <h2>Admin Controls</h2>
73
- <input type="password" id="adminPassword" placeholder="Admin Password">
74
- <button id="banBtn">Ban Current IP</button>
 
 
 
 
 
 
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 &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>