Spaces:
Running

TutorialMentor commited on
Commit
2139814
·
verified ·
1 Parent(s): 8e25c48

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +1225 -19
  3. prompts.txt +8 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Serverdev
3
- emoji: 🐨
4
- colorFrom: indigo
5
- colorTo: blue
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: serverdev
3
+ emoji: 🐳
4
+ colorFrom: pink
5
+ colorTo: green
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,1225 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>ServerDev | Template Builder</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.14.0/Sortable.min.js"></script>
11
+ <style>
12
+ @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Roboto+Mono:wght@300;400;500;600&display=swap');
13
+
14
+ body {
15
+ font-family: 'Roboto Mono', monospace;
16
+ background-color: #0a0a0a;
17
+ color: #e0e0e0;
18
+ overflow-x: hidden;
19
+ }
20
+
21
+ .title-font {
22
+ font-family: 'Orbitron', sans-serif;
23
+ }
24
+
25
+ .glow-text {
26
+ text-shadow: 0 0 8px rgba(0, 150, 255, 0.7);
27
+ }
28
+
29
+ .glow-box {
30
+ box-shadow: 0 0 15px rgba(0, 150, 255, 0.3);
31
+ }
32
+
33
+ .cyber-border {
34
+ position: relative;
35
+ border: 1px solid transparent;
36
+ }
37
+
38
+ .cyber-border::before {
39
+ content: '';
40
+ position: absolute;
41
+ inset: 0;
42
+ border-radius: 0.5rem;
43
+ padding: 2px;
44
+ background: linear-gradient(135deg, #00f2ff, #0066ff, #00f2ff);
45
+ -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
46
+ -webkit-mask-composite: xor;
47
+ mask-composite: exclude;
48
+ pointer-events: none;
49
+ }
50
+
51
+ .input-field {
52
+ background-color: rgba(20, 20, 20, 0.8);
53
+ border: 1px solid #333;
54
+ transition: all 0.3s ease;
55
+ }
56
+
57
+ .input-field:focus {
58
+ border-color: #0066ff;
59
+ box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.2);
60
+ }
61
+
62
+ .password-btn {
63
+ background: linear-gradient(135deg, #0066ff, #00c6ff);
64
+ transition: all 0.3s ease;
65
+ }
66
+
67
+ .password-btn:hover {
68
+ transform: translateY(-2px);
69
+ box-shadow: 0 5px 15px rgba(0, 102, 255, 0.4);
70
+ }
71
+
72
+ .grid-bg {
73
+ background-image:
74
+ linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
75
+ linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
76
+ background-size: 30px 30px;
77
+ }
78
+
79
+ .cyber-loader {
80
+ width: 48px;
81
+ height: 48px;
82
+ border: 3px solid #0066ff;
83
+ border-radius: 50%;
84
+ display: inline-block;
85
+ position: relative;
86
+ box-sizing: border-box;
87
+ animation: rotation 1s linear infinite;
88
+ }
89
+
90
+ .cyber-loader::after {
91
+ content: '';
92
+ box-sizing: border-box;
93
+ position: absolute;
94
+ left: 50%;
95
+ top: 50%;
96
+ transform: translate(-50%, -50%);
97
+ width: 56px;
98
+ height: 56px;
99
+ border-radius: 50%;
100
+ border: 3px solid;
101
+ border-color: #00f2ff transparent;
102
+ }
103
+
104
+ @keyframes rotation {
105
+ 0% {
106
+ transform: rotate(0deg);
107
+ }
108
+ 100% {
109
+ transform: rotate(360deg);
110
+ }
111
+ }
112
+
113
+ @keyframes pulse {
114
+ 0%, 100% {
115
+ opacity: 1;
116
+ }
117
+ 50% {
118
+ opacity: 0.5;
119
+ }
120
+ }
121
+
122
+ .pulse {
123
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
124
+ }
125
+
126
+ /* Dashboard styles */
127
+ .sidebar {
128
+ background-color: rgba(10, 10, 15, 0.8);
129
+ backdrop-filter: blur(10px);
130
+ border-right: 1px solid rgba(0, 102, 255, 0.2);
131
+ }
132
+
133
+ .nav-item {
134
+ transition: all 0.3s ease;
135
+ border-left: 3px solid transparent;
136
+ }
137
+
138
+ .nav-item:hover {
139
+ background-color: rgba(0, 102, 255, 0.1);
140
+ border-left-color: #0066ff;
141
+ }
142
+
143
+ .nav-item.active {
144
+ background-color: rgba(0, 102, 255, 0.2);
145
+ border-left-color: #0066ff;
146
+ }
147
+
148
+ .dashboard-card {
149
+ background-color: rgba(20, 20, 25, 0.6);
150
+ backdrop-filter: blur(10px);
151
+ border: 1px solid rgba(0, 102, 255, 0.2);
152
+ transition: all 0.3s ease;
153
+ }
154
+
155
+ .dashboard-card:hover {
156
+ border-color: rgba(0, 102, 255, 0.5);
157
+ box-shadow: 0 5px 15px rgba(0, 102, 255, 0.1);
158
+ }
159
+
160
+ /* Template Builder Styles */
161
+ .template-item {
162
+ background-color: rgba(30, 30, 35, 0.6);
163
+ border: 1px solid rgba(0, 102, 255, 0.2);
164
+ margin-bottom: 10px;
165
+ padding: 12px;
166
+ border-radius: 6px;
167
+ cursor: move;
168
+ transition: all 0.2s ease;
169
+ }
170
+
171
+ .template-item:hover {
172
+ background-color: rgba(40, 40, 45, 0.6);
173
+ border-color: rgba(0, 102, 255, 0.4);
174
+ }
175
+
176
+ .template-item.dragging {
177
+ opacity: 0.5;
178
+ background-color: rgba(0, 102, 255, 0.1);
179
+ }
180
+
181
+ .permission-chip {
182
+ display: inline-block;
183
+ background-color: rgba(0, 102, 255, 0.2);
184
+ border: 1px solid rgba(0, 102, 255, 0.3);
185
+ border-radius: 4px;
186
+ padding: 2px 6px;
187
+ margin-right: 4px;
188
+ margin-bottom: 4px;
189
+ font-size: 12px;
190
+ color: #e0e0e0;
191
+ }
192
+
193
+ .channel-icon {
194
+ width: 20px;
195
+ height: 20px;
196
+ display: inline-flex;
197
+ align-items: center;
198
+ justify-content: center;
199
+ margin-right: 8px;
200
+ border-radius: 4px;
201
+ }
202
+
203
+ .text-channel {
204
+ background-color: rgba(100, 149, 237, 0.2);
205
+ color: #6495ed;
206
+ }
207
+
208
+ .voice-channel {
209
+ background-color: rgba(50, 205, 50, 0.2);
210
+ color: #32cd32;
211
+ }
212
+
213
+ .category-channel {
214
+ background-color: rgba(255, 165, 0, 0.2);
215
+ color: #ffa500;
216
+ }
217
+
218
+ .role-color {
219
+ width: 12px;
220
+ height: 12px;
221
+ border-radius: 50%;
222
+ display: inline-block;
223
+ margin-right: 8px;
224
+ }
225
+
226
+ .tab-button {
227
+ padding: 8px 16px;
228
+ border-bottom: 2px solid transparent;
229
+ transition: all 0.2s ease;
230
+ }
231
+
232
+ .tab-button.active {
233
+ border-bottom-color: #0066ff;
234
+ color: #0066ff;
235
+ }
236
+
237
+ .tab-content {
238
+ display: none;
239
+ }
240
+
241
+ .tab-content.active {
242
+ display: block;
243
+ }
244
+
245
+ .dropdown-content {
246
+ display: none;
247
+ position: absolute;
248
+ background-color: rgba(30, 30, 35, 0.95);
249
+ min-width: 160px;
250
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
251
+ z-index: 1;
252
+ border-radius: 6px;
253
+ border: 1px solid rgba(0, 102, 255, 0.3);
254
+ }
255
+
256
+ .dropdown:hover .dropdown-content {
257
+ display: block;
258
+ }
259
+
260
+ /* Bot status indicator */
261
+ .status-indicator {
262
+ width: 8px;
263
+ height: 8px;
264
+ border-radius: 50%;
265
+ display: inline-block;
266
+ margin-right: 6px;
267
+ }
268
+
269
+ .status-online {
270
+ background-color: #3ba55c;
271
+ }
272
+
273
+ .status-offline {
274
+ background-color: #747f8d;
275
+ }
276
+
277
+ .status-idle {
278
+ background-color: #faa61a;
279
+ }
280
+
281
+ .status-dnd {
282
+ background-color: #ed4245;
283
+ }
284
+ </style>
285
+ </head>
286
+ <body class="grid-bg min-h-screen">
287
+ <!-- Login Screen (shown by default) -->
288
+ <div id="loginScreen" class="flex items-center justify-center p-4 min-h-screen">
289
+ <div class="fixed top-0 left-0 w-full h-full bg-black/50 backdrop-blur-sm z-0"></div>
290
+
291
+ <div class="relative z-10 w-full max-w-md">
292
+ <!-- Main Login Card -->
293
+ <div class="bg-gray-900/80 backdrop-blur-md rounded-xl p-8 cyber-border">
294
+ <!-- Header -->
295
+ <div class="text-center mb-8">
296
+ <div class="flex justify-center mb-4">
297
+ <lottie-player src="https://assets9.lottiefiles.com/packages/lf20_obhph3sh.json" background="transparent" speed="1" style="width: 100px; height: 100px;" loop autoplay></lottie-player>
298
+ </div>
299
+ <h1 class="title-font text-3xl font-bold text-white glow-text mb-2">SERVER<span class="text-blue-400">DEV</span></h1>
300
+ <p class="text-gray-400">Admin Control Panel</p>
301
+ </div>
302
+
303
+ <!-- Login Form -->
304
+ <div class="space-y-6">
305
+ <!-- Password Login Form -->
306
+ <div id="passwordForm">
307
+ <div class="mb-4">
308
+ <label for="password" class="block text-sm font-medium text-gray-300 mb-2">Admin Password</label>
309
+ <div class="relative">
310
+ <input type="password" id="password" class="w-full px-4 py-3 rounded-lg input-field text-white focus:outline-none" placeholder="Enter secret key">
311
+ <button onclick="togglePasswordVisibility()" class="absolute right-3 top-3 text-gray-400 hover:text-white">
312
+ <i class="fas fa-eye"></i>
313
+ </button>
314
+ </div>
315
+ </div>
316
+ <button onclick="checkPassword()" class="w-full py-3 px-4 rounded-lg font-medium text-white password-btn flex items-center justify-center space-x-2">
317
+ <span>Authenticate</span>
318
+ <i class="fas fa-lock"></i>
319
+ </button>
320
+ </div>
321
+
322
+ <!-- Loading State -->
323
+ <div id="loadingState" class="hidden flex-col items-center justify-center space-y-4 py-8">
324
+ <div class="cyber-loader"></div>
325
+ <p class="text-blue-400">Authenticating...</p>
326
+ </div>
327
+
328
+ <!-- Error Message -->
329
+ <div id="errorMessage" class="hidden bg-red-900/50 border border-red-700 rounded-lg p-4 text-red-200 text-sm"></div>
330
+ </div>
331
+ </div>
332
+
333
+ <!-- Footer -->
334
+ <div class="mt-6 text-center text-xs text-gray-600">
335
+ <p>ServerDev Bot &copy; 2023 | Secure Admin Portal</p>
336
+ </div>
337
+ </div>
338
+ </div>
339
+
340
+ <!-- Dashboard Screen (hidden by default) -->
341
+ <div id="dashboardScreen" class="hidden min-h-screen">
342
+ <!-- Sidebar -->
343
+ <div class="sidebar fixed top-0 left-0 w-64 h-full z-20">
344
+ <div class="p-4 flex items-center space-x-3 border-b border-gray-800/50 pb-6">
345
+ <div id="botAvatar" class="w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center overflow-hidden">
346
+ <i class="fas fa-robot text-white"></i>
347
+ </div>
348
+ <div>
349
+ <h2 class="font-bold text-white">ServerDev</h2>
350
+ <p class="text-xs text-gray-400">Template Builder</p>
351
+ <div class="flex items-center mt-1">
352
+ <span id="botStatus" class="status-indicator status-offline"></span>
353
+ <span id="botStatusText" class="text-xs text-gray-400">Offline</span>
354
+ </div>
355
+ </div>
356
+ </div>
357
+
358
+ <nav class="p-4 space-y-1">
359
+ <a href="#" class="nav-item active flex items-center space-x-3 p-3 rounded-lg text-white">
360
+ <i class="fas fa-layer-group w-5 text-center text-blue-400"></i>
361
+ <span>Templates</span>
362
+ </a>
363
+ <a href="#" class="nav-item flex items-center space-x-3 p-3 rounded-lg text-gray-400 hover:text-white">
364
+ <i class="fas fa-history w-5 text-center"></i>
365
+ <span>Recent Servers</span>
366
+ </a>
367
+ <a href="#" class="nav-item flex items-center space-x-3 p-3 rounded-lg text-gray-400 hover:text-white">
368
+ <i class="fas fa-cog w-5 text-center"></i>
369
+ <span>Settings</span>
370
+ </a>
371
+ </nav>
372
+
373
+ <div class="absolute bottom-0 left-0 w-full p-4 border-t border-gray-800/50">
374
+ <button onclick="logout()" class="w-full flex items-center space-x-3 p-3 rounded-lg text-gray-400 hover:text-red-400 hover:bg-red-900/10 transition">
375
+ <i class="fas fa-sign-out-alt w-5 text-center"></i>
376
+ <span>Logout</span>
377
+ </button>
378
+ </div>
379
+ </div>
380
+
381
+ <!-- Main Content -->
382
+ <div class="ml-64 p-8">
383
+ <div class="flex justify-between items-center mb-8">
384
+ <h1 class="title-font text-2xl font-bold text-white">Server Template Builder</h1>
385
+ <div class="flex items-center space-x-4">
386
+ <div class="flex items-center space-x-2 bg-gray-800/50 px-4 py-2 rounded-lg">
387
+ <div class="w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center">
388
+ <i class="fas fa-user text-xs text-white"></i>
389
+ </div>
390
+ <span class="text-sm font-medium" id="userDisplay">Admin</span>
391
+ <span class="text-xs text-blue-400">(Owner)</span>
392
+ </div>
393
+ </div>
394
+ </div>
395
+
396
+ <!-- Bot Connection Status -->
397
+ <div id="botConnectionStatus" class="dashboard-card rounded-xl p-4 mb-6 flex items-center justify-between">
398
+ <div class="flex items-center space-x-3">
399
+ <div id="connectionStatusIndicator" class="status-indicator status-offline"></div>
400
+ <span id="connectionStatusText" class="text-gray-300">Connecting to bot...</span>
401
+ </div>
402
+ <button id="refreshConnectionBtn" class="text-blue-400 hover:text-blue-300 text-sm flex items-center">
403
+ <i class="fas fa-sync-alt mr-1"></i> Refresh
404
+ </button>
405
+ </div>
406
+
407
+ <!-- Template Builder Section -->
408
+ <div class="dashboard-card rounded-xl p-6 mb-8">
409
+ <div class="flex justify-between items-center mb-6">
410
+ <h2 class="title-font text-xl font-bold text-white">Create New Template</h2>
411
+ <button id="createServerBtn" class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg text-white font-medium flex items-center space-x-2">
412
+ <i class="fas fa-plus"></i>
413
+ <span>Create Server</span>
414
+ </button>
415
+ </div>
416
+
417
+ <!-- Template Name -->
418
+ <div class="mb-6">
419
+ <label for="templateName" class="block text-sm font-medium text-gray-300 mb-2">Template Name</label>
420
+ <input type="text" id="templateName" class="w-full px-4 py-3 rounded-lg input-field text-white focus:outline-none" placeholder="My Awesome Server Template">
421
+ </div>
422
+
423
+ <!-- Template Tabs -->
424
+ <div class="border-b border-gray-700 mb-6">
425
+ <div class="flex space-x-4">
426
+ <button class="tab-button active" onclick="openTab(event, 'categoriesTab')">
427
+ <i class="fas fa-folder mr-2"></i> Categories
428
+ </button>
429
+ <button class="tab-button" onclick="openTab(event, 'channelsTab')">
430
+ <i class="fas fa-hashtag mr-2"></i> Channels
431
+ </button>
432
+ <button class="tab-button" onclick="openTab(event, 'rolesTab')">
433
+ <i class="fas fa-user-shield mr-2"></i> Roles
434
+ </button>
435
+ <button class="tab-button" onclick="openTab(event, 'settingsTab')">
436
+ <i class="fas fa-cog mr-2"></i> Settings
437
+ </button>
438
+ </div>
439
+ </div>
440
+
441
+ <!-- Categories Tab -->
442
+ <div id="categoriesTab" class="tab-content active">
443
+ <div class="flex justify-between items-center mb-4">
444
+ <h3 class="font-medium text-gray-300">Server Structure</h3>
445
+ <button onclick="addCategory()" class="text-sm text-blue-400 hover:text-blue-300 flex items-center">
446
+ <i class="fas fa-plus mr-1"></i> Add Category
447
+ </button>
448
+ </div>
449
+
450
+ <div id="categoriesContainer" class="space-y-4">
451
+ <!-- Categories will be added here -->
452
+ </div>
453
+ </div>
454
+
455
+ <!-- Channels Tab -->
456
+ <div id="channelsTab" class="tab-content">
457
+ <div class="flex justify-between items-center mb-4">
458
+ <h3 class="font-medium text-gray-300">Channel Configuration</h3>
459
+ <div class="dropdown relative">
460
+ <button class="text-sm text-blue-400 hover:text-blue-300 flex items-center">
461
+ <i class="fas fa-plus mr-1"></i> Add Channel
462
+ </button>
463
+ <div class="dropdown-content mt-2 p-2">
464
+ <a href="#" onclick="addTextChannel()" class="block px-4 py-2 text-sm text-gray-300 hover:bg-gray-700/50 rounded"><i class="fas fa-hashtag mr-2 text-blue-400"></i>Text Channel</a>
465
+ <a href="#" onclick="addVoiceChannel()" class="block px-4 py-2 text-sm text-gray-300 hover:bg-gray-700/50 rounded"><i class="fas fa-volume-up mr-2 text-green-400"></i>Voice Channel</a>
466
+ </div>
467
+ </div>
468
+ </div>
469
+
470
+ <div id="channelsContainer" class="space-y-4">
471
+ <!-- Channels will be added here -->
472
+ </div>
473
+ </div>
474
+
475
+ <!-- Roles Tab -->
476
+ <div id="rolesTab" class="tab-content">
477
+ <div class="flex justify-between items-center mb-4">
478
+ <h3 class="font-medium text-gray-300">Role Configuration</h3>
479
+ <button onclick="addRole()" class="text-sm text-blue-400 hover:text-blue-300 flex items-center">
480
+ <i class="fas fa-plus mr-1"></i> Add Role
481
+ </button>
482
+ </div>
483
+
484
+ <div id="rolesContainer" class="space-y-4">
485
+ <!-- Roles will be added here -->
486
+ </div>
487
+ </div>
488
+
489
+ <!-- Settings Tab -->
490
+ <div id="settingsTab" class="tab-content">
491
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
492
+ <div>
493
+ <h3 class="font-medium text-gray-300 mb-4">Server Settings</h3>
494
+ <div class="space-y-4">
495
+ <div>
496
+ <label class="block text-sm text-gray-400 mb-1">Server Region</label>
497
+ <select class="w-full px-4 py-2 rounded-lg input-field text-white focus:outline-none">
498
+ <option>North America</option>
499
+ <option>Europe</option>
500
+ <option>Asia</option>
501
+ </select>
502
+ </div>
503
+ <div>
504
+ <label class="block text-sm text-gray-400 mb-1">Verification Level</label>
505
+ <select class="w-full px-4 py-2 rounded-lg input-field text-white focus:outline-none">
506
+ <option>None</option>
507
+ <option>Low</option>
508
+ <option>Medium</option>
509
+ <option>High</option>
510
+ </select>
511
+ </div>
512
+ </div>
513
+ </div>
514
+ <div>
515
+ <h3 class="font-medium text-gray-300 mb-4">Default Notifications</h3>
516
+ <div class="space-y-4">
517
+ <div class="flex items-center">
518
+ <input type="checkbox" id="suppressEveryone" class="mr-2">
519
+ <label for="suppressEveryone" class="text-sm text-gray-300">Suppress @everyone and @here</label>
520
+ </div>
521
+ <div class="flex items-center">
522
+ <input type="checkbox" id="suppressRoles" class="mr-2">
523
+ <label for="suppressRoles" class="text-sm text-gray-300">Suppress All Role @mentions</label>
524
+ </div>
525
+ </div>
526
+ </div>
527
+ </div>
528
+ </div>
529
+ </div>
530
+
531
+ <!-- Preview Section -->
532
+ <div class="dashboard-card rounded-xl p-6">
533
+ <h2 class="title-font text-xl font-bold text-white mb-4">Template Preview</h2>
534
+ <div id="templatePreview" class="bg-gray-900/50 rounded-lg p-4 min-h-40">
535
+ <p class="text-gray-500 text-center py-10">Your server structure will appear here as you build it</p>
536
+ </div>
537
+ </div>
538
+ </div>
539
+ </div>
540
+
541
+ <script>
542
+ // Bot configuration
543
+ const BOT_TOKEN = "MTM2ODM3ODM2MzIzNTc5OTA4MA.GgWxwc.0GUxt0uPBFpDiwlIJOza0GQq1nVwd_xx8f2_so";
544
+ const BOT_CLIENT_ID = "1368378363235799080";
545
+ const BOT_AVATAR_URL = `https://cdn.discordapp.com/avatars/${BOT_CLIENT_ID}/a_1e9a4c5e5e5e5e5e5e5e5e5e5e5e5e5.webp?size=80`;
546
+
547
+ // Toggle password visibility
548
+ function togglePasswordVisibility() {
549
+ const passwordInput = document.getElementById('password');
550
+ if (passwordInput.type === 'password') {
551
+ passwordInput.type = 'text';
552
+ } else {
553
+ passwordInput.type = 'password';
554
+ }
555
+ }
556
+
557
+ // Check password
558
+ function checkPassword() {
559
+ const password = document.getElementById('password').value;
560
+ const errorElement = document.getElementById('errorMessage');
561
+
562
+ // Show loading state
563
+ document.getElementById('passwordForm').classList.add('hidden');
564
+ document.getElementById('loadingState').classList.remove('hidden');
565
+
566
+ // Simulate authentication
567
+ setTimeout(() => {
568
+ if (password === 'ServerDev!29') {
569
+ // Successful login
570
+ document.getElementById('loginScreen').classList.add('hidden');
571
+ document.getElementById('dashboardScreen').classList.remove('hidden');
572
+ initializeTemplateBuilder();
573
+ checkBotStatus();
574
+ } else {
575
+ // Show error
576
+ document.getElementById('loadingState').classList.add('hidden');
577
+ document.getElementById('passwordForm').classList.remove('hidden');
578
+ errorElement.textContent = 'Invalid password. Please try again.';
579
+ errorElement.classList.remove('hidden');
580
+
581
+ // Hide error after 5 seconds
582
+ setTimeout(() => {
583
+ errorElement.classList.add('hidden');
584
+ }, 5000);
585
+ }
586
+ }, 1500);
587
+ }
588
+
589
+ // Logout function
590
+ function logout() {
591
+ document.getElementById('dashboardScreen').classList.add('hidden');
592
+ document.getElementById('loginScreen').classList.remove('hidden');
593
+
594
+ // Reset forms
595
+ document.getElementById('password').value = '';
596
+ document.getElementById('loadingState').classList.add('hidden');
597
+ document.getElementById('errorMessage').classList.add('hidden');
598
+ }
599
+
600
+ // Tab switching
601
+ function openTab(evt, tabName) {
602
+ const tabContents = document.getElementsByClassName("tab-content");
603
+ for (let i = 0; i < tabContents.length; i++) {
604
+ tabContents[i].classList.remove("active");
605
+ }
606
+
607
+ const tabButtons = document.getElementsByClassName("tab-button");
608
+ for (let i = 0; i < tabButtons.length; i++) {
609
+ tabButtons[i].classList.remove("active");
610
+ }
611
+
612
+ document.getElementById(tabName).classList.add("active");
613
+ evt.currentTarget.classList.add("active");
614
+ }
615
+
616
+ // Check bot status via Discord API
617
+ async function checkBotStatus() {
618
+ const statusIndicator = document.getElementById('connectionStatusIndicator');
619
+ const statusText = document.getElementById('connectionStatusText');
620
+ const botStatusIndicator = document.getElementById('botStatus');
621
+ const botStatusText = document.getElementById('botStatusText');
622
+
623
+ try {
624
+ statusText.textContent = "Checking bot status...";
625
+ statusIndicator.className = "status-indicator status-idle";
626
+
627
+ // Fetch bot user data
628
+ const response = await fetch(`https://discord.com/api/v10/users/${BOT_CLIENT_ID}`, {
629
+ headers: {
630
+ 'Authorization': `Bot ${BOT_TOKEN}`
631
+ }
632
+ });
633
+
634
+ if (response.ok) {
635
+ const botData = await response.json();
636
+
637
+ // Update bot avatar
638
+ const botAvatar = document.getElementById('botAvatar');
639
+ if (botData.avatar) {
640
+ const avatarUrl = `https://cdn.discordapp.com/avatars/${BOT_CLIENT_ID}/${botData.avatar}.png?size=80`;
641
+ botAvatar.innerHTML = `<img src="${avatarUrl}" class="w-full h-full object-cover" alt="Bot Avatar">`;
642
+ } else {
643
+ botAvatar.innerHTML = `<i class="fas fa-robot text-white"></i>`;
644
+ }
645
+
646
+ // Check if bot is in any guilds (as a proxy for "is running")
647
+ const guildsResponse = await fetch(`https://discord.com/api/v10/users/@me/guilds`, {
648
+ headers: {
649
+ 'Authorization': `Bot ${BOT_TOKEN}`
650
+ }
651
+ });
652
+
653
+ if (guildsResponse.ok) {
654
+ const guilds = await guildsResponse.json();
655
+ if (guilds.length > 0) {
656
+ // Bot is online and in at least one guild
657
+ statusIndicator.className = "status-indicator status-online";
658
+ statusText.textContent = "Bot is online and connected to Discord";
659
+ botStatusIndicator.className = "status-indicator status-online";
660
+ botStatusText.textContent = "Online";
661
+ } else {
662
+ // Bot is online but not in any guilds
663
+ statusIndicator.className = "status-indicator status-idle";
664
+ statusText.textContent = "Bot is online but not in any servers";
665
+ botStatusIndicator.className = "status-indicator status-idle";
666
+ botStatusText.textContent = "Idle";
667
+ }
668
+ } else {
669
+ // Error checking guilds
670
+ statusIndicator.className = "status-indicator status-dnd";
671
+ statusText.textContent = "Error checking bot guilds";
672
+ botStatusIndicator.className = "status-indicator status-dnd";
673
+ botStatusText.textContent = "Error";
674
+ }
675
+ } else {
676
+ // Bot is offline or token is invalid
677
+ statusIndicator.className = "status-indicator status-offline";
678
+ statusText.textContent = "Bot is offline or token is invalid";
679
+ botStatusIndicator.className = "status-indicator status-offline";
680
+ botStatusText.textContent = "Offline";
681
+ }
682
+ } catch (error) {
683
+ console.error("Error checking bot status:", error);
684
+ statusIndicator.className = "status-indicator status-dnd";
685
+ statusText.textContent = "Error connecting to Discord API";
686
+ botStatusIndicator.className = "status-indicator status-dnd";
687
+ botStatusText.textContent = "Error";
688
+ }
689
+ }
690
+
691
+ // Create a server from template
692
+ async function createServerFromTemplate() {
693
+ const templateName = document.getElementById('templateName').value || 'Unnamed Template';
694
+
695
+ // Get all categories and their channels
696
+ const categories = [];
697
+ const categoryElements = document.getElementById('categoriesContainer').children;
698
+
699
+ for (let category of categoryElements) {
700
+ const categoryName = category.querySelector('input').value || 'Unnamed Category';
701
+ const categoryChannels = [];
702
+
703
+ // Get channels in this category
704
+ const channelElements = category.querySelector('.category-channels').children;
705
+
706
+ for (let channel of channelElements) {
707
+ const channelName = channel.querySelector('input').value || 'Unnamed Channel';
708
+ const isTextChannel = channel.querySelector('.text-channel') !== null;
709
+
710
+ categoryChannels.push({
711
+ name: channelName,
712
+ type: isTextChannel ? 'text' : 'voice'
713
+ });
714
+ }
715
+
716
+ categories.push({
717
+ name: categoryName,
718
+ channels: categoryChannels
719
+ });
720
+ }
721
+
722
+ // Get standalone channels (not in categories)
723
+ const standaloneChannels = [];
724
+ const channelElements = document.getElementById('channelsContainer').children;
725
+
726
+ for (let channel of channelElements) {
727
+ const channelName = channel.querySelector('input').value || 'Unnamed Channel';
728
+ const isTextChannel = channel.querySelector('.text-channel') !== null;
729
+
730
+ standaloneChannels.push({
731
+ name: channelName,
732
+ type: isTextChannel ? 'text' : 'voice'
733
+ });
734
+ }
735
+
736
+ // Get roles
737
+ const roles = [];
738
+ const roleElements = document.getElementById('rolesContainer').children;
739
+
740
+ for (let role of roleElements) {
741
+ const roleName = role.querySelector('input').value || 'Unnamed Role';
742
+ const roleColor = role.querySelector('.role-color').style.backgroundColor;
743
+
744
+ roles.push({
745
+ name: roleName,
746
+ color: roleColor
747
+ });
748
+ }
749
+
750
+ // Prepare the server creation payload
751
+ const payload = {
752
+ name: templateName,
753
+ categories: categories,
754
+ channels: standaloneChannels,
755
+ roles: roles
756
+ };
757
+
758
+ try {
759
+ // Show loading state
760
+ const createBtn = document.getElementById('createServerBtn');
761
+ createBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Creating Server...';
762
+ createBtn.disabled = true;
763
+
764
+ // In a real implementation, you would send this to your backend
765
+ // which would then use the bot token to create the server
766
+ console.log("Server creation payload:", payload);
767
+
768
+ // Simulate API call delay
769
+ await new Promise(resolve => setTimeout(resolve, 2000));
770
+
771
+ // Show success message
772
+ alert(`Server "${templateName}" created successfully!`);
773
+
774
+ // Reset button
775
+ createBtn.innerHTML = '<i class="fas fa-plus mr-2"></i> Create Server';
776
+ createBtn.disabled = false;
777
+
778
+ } catch (error) {
779
+ console.error("Error creating server:", error);
780
+ alert("Failed to create server: " + error.message);
781
+
782
+ // Reset button
783
+ const createBtn = document.getElementById('createServerBtn');
784
+ createBtn.innerHTML = '<i class="fas fa-plus mr-2"></i> Create Server';
785
+ createBtn.disabled = false;
786
+ }
787
+ }
788
+
789
+ // Template Builder Functions
790
+ function initializeTemplateBuilder() {
791
+ // Initialize sortable for all containers
792
+ new Sortable(document.getElementById('categoriesContainer'), {
793
+ animation: 150,
794
+ ghostClass: 'dragging',
795
+ onEnd: updatePreview
796
+ });
797
+
798
+ new Sortable(document.getElementById('channelsContainer'), {
799
+ animation: 150,
800
+ ghostClass: 'dragging',
801
+ onEnd: updatePreview
802
+ });
803
+
804
+ new Sortable(document.getElementById('rolesContainer'), {
805
+ animation: 150,
806
+ ghostClass: 'dragging',
807
+ onEnd: updatePreview
808
+ });
809
+
810
+ // Add event listener for refresh button
811
+ document.getElementById('refreshConnectionBtn').addEventListener('click', checkBotStatus);
812
+
813
+ // Add event listener for create server button
814
+ document.getElementById('createServerBtn').addEventListener('click', createServerFromTemplate);
815
+
816
+ // Add some default items
817
+ addDefaultAdminRole();
818
+ addDefaultCategory();
819
+ }
820
+
821
+ function addCategory() {
822
+ const categoriesContainer = document.getElementById('categoriesContainer');
823
+ const categoryId = 'category-' + Date.now();
824
+
825
+ const categoryHtml = `
826
+ <div class="template-item" id="${categoryId}">
827
+ <div class="flex justify-between items-center">
828
+ <div class="flex items-center">
829
+ <div class="channel-icon category-channel">
830
+ <i class="fas fa-folder text-xs"></i>
831
+ </div>
832
+ <input type="text" class="bg-transparent border-b border-gray-600 focus:border-blue-500 focus:outline-none px-1 py-1 text-white" value="New Category" placeholder="Category Name">
833
+ </div>
834
+ <div class="flex space-x-2">
835
+ <button onclick="addChannelToCategory('${categoryId}')" class="text-xs text-blue-400 hover:text-blue-300">
836
+ <i class="fas fa-plus"></i> Channel
837
+ </button>
838
+ <button onclick="document.getElementById('${categoryId}').remove(); updatePreview()" class="text-xs text-red-400 hover:text-red-300">
839
+ <i class="fas fa-trash"></i>
840
+ </button>
841
+ </div>
842
+ </div>
843
+ <div class="category-channels mt-3 ml-8 pl-4 border-l border-gray-700 space-y-3" id="${categoryId}-channels"></div>
844
+ </div>
845
+ `;
846
+
847
+ categoriesContainer.insertAdjacentHTML('beforeend', categoryHtml);
848
+
849
+ // Make the channels inside this category sortable
850
+ new Sortable(document.getElementById(`${categoryId}-channels`), {
851
+ animation: 150,
852
+ ghostClass: 'dragging',
853
+ onEnd: updatePreview
854
+ });
855
+
856
+ updatePreview();
857
+ }
858
+
859
+ function addDefaultCategory() {
860
+ const categoriesContainer = document.getElementById('categoriesContainer');
861
+ const categoryId = 'category-default';
862
+
863
+ const categoryHtml = `
864
+ <div class="template-item" id="${categoryId}">
865
+ <div class="flex justify-between items-center">
866
+ <div class="flex items-center">
867
+ <div class="channel-icon category-channel">
868
+ <i class="fas fa-folder text-xs"></i>
869
+ </div>
870
+ <input type="text" class="bg-transparent border-b border-gray-600 focus:border-blue-500 focus:outline-none px-1 py-1 text-white" value="General" placeholder="Category Name">
871
+ </div>
872
+ <div class="flex space-x-2">
873
+ <button onclick="addChannelToCategory('${categoryId}')" class="text-xs text-blue-400 hover:text-blue-300">
874
+ <i class="fas fa-plus"></i> Channel
875
+ </button>
876
+ <button onclick="document.getElementById('${categoryId}').remove(); updatePreview()" class="text-xs text-red-400 hover:text-red-300">
877
+ <i class="fas fa-trash"></i>
878
+ </button>
879
+ </div>
880
+ </div>
881
+ <div class="category-channels mt-3 ml-8 pl-4 border-l border-gray-700 space-y-3" id="${categoryId}-channels"></div>
882
+ </div>
883
+ `;
884
+
885
+ categoriesContainer.insertAdjacentHTML('beforeend', categoryHtml);
886
+
887
+ // Make the channels inside this category sortable
888
+ new Sortable(document.getElementById(`${categoryId}-channels`), {
889
+ animation: 150,
890
+ ghostClass: 'dragging',
891
+ onEnd: updatePreview
892
+ });
893
+
894
+ // Add default channels
895
+ addTextChannelToCategory(categoryId, 'welcome');
896
+ addTextChannelToCategory(categoryId, 'general');
897
+ addVoiceChannelToCategory(categoryId, 'General Voice');
898
+
899
+ updatePreview();
900
+ }
901
+
902
+ function addChannelToCategory(categoryId) {
903
+ const dropdownHtml = `
904
+ <div class="absolute left-0 mt-1 w-48 bg-gray-800 rounded-md shadow-lg z-10 border border-gray-700">
905
+ <div class="py-1">
906
+ <a href="#" onclick="addTextChannelToCategory('${categoryId}'); return false;" class="block px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">
907
+ <i class="fas fa-hashtag mr-2 text-blue-400"></i> Text Channel
908
+ </a>
909
+ <a href="#" onclick="addVoiceChannelToCategory('${categoryId}'); return false;" class="block px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">
910
+ <i class="fas fa-volume-up mr-2 text-green-400"></i> Voice Channel
911
+ </a>
912
+ </div>
913
+ </div>
914
+ `;
915
+
916
+ // Create and show dropdown
917
+ const dropdown = document.createElement('div');
918
+ dropdown.innerHTML = dropdownHtml;
919
+ dropdown.className = 'origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg';
920
+ dropdown.id = 'channel-type-dropdown';
921
+
922
+ const button = event.currentTarget;
923
+ button.parentNode.appendChild(dropdown);
924
+
925
+ // Close dropdown when clicking elsewhere
926
+ document.addEventListener('click', function closeDropdown(e) {
927
+ if (!dropdown.contains(e.target) && e.target !== button) {
928
+ dropdown.remove();
929
+ document.removeEventListener('click', closeDropdown);
930
+ }
931
+ });
932
+ }
933
+
934
+ function addTextChannel() {
935
+ const channelsContainer = document.getElementById('channelsContainer');
936
+ const channelId = 'channel-' + Date.now();
937
+
938
+ const channelHtml = `
939
+ <div class="template-item" id="${channelId}">
940
+ <div class="flex justify-between items-center">
941
+ <div class="flex items-center">
942
+ <div class="channel-icon text-channel">
943
+ <i class="fas fa-hashtag text-xs"></i>
944
+ </div>
945
+ <input type="text" class="bg-transparent border-b border-gray-600 focus:border-blue-500 focus:outline-none px-1 py-1 text-white" value="new-text-channel" placeholder="Channel Name">
946
+ </div>
947
+ <div class="flex space-x-2">
948
+ <button onclick="configureChannelPermissions('${channelId}')" class="text-xs text-yellow-400 hover:text-yellow-300">
949
+ <i class="fas fa-lock"></i> Perms
950
+ </button>
951
+ <button onclick="document.getElementById('${channelId}').remove(); updatePreview()" class="text-xs text-red-400 hover:text-red-300">
952
+ <i class="fas fa-trash"></i>
953
+ </button>
954
+ </div>
955
+ </div>
956
+ </div>
957
+ `;
958
+
959
+ channelsContainer.insertAdjacentHTML('beforeend', channelHtml);
960
+ updatePreview();
961
+ }
962
+
963
+ function addVoiceChannel() {
964
+ const channelsContainer = document.getElementById('channelsContainer');
965
+ const channelId = 'channel-' + Date.now();
966
+
967
+ const channelHtml = `
968
+ <div class="template-item" id="${channelId}">
969
+ <div class="flex justify-between items-center">
970
+ <div class="flex items-center">
971
+ <div class="channel-icon voice-channel">
972
+ <i class="fas fa-volume-up text-xs"></i>
973
+ </div>
974
+ <input type="text" class="bg-transparent border-b border-gray-600 focus:border-blue-500 focus:outline-none px-1 py-1 text-white" value="new-voice-channel" placeholder="Channel Name">
975
+ </div>
976
+ <div class="flex space-x-2">
977
+ <button onclick="configureChannelPermissions('${channelId}')" class="text-xs text-yellow-400 hover:text-yellow-300">
978
+ <i class="fas fa-lock"></i> Perms
979
+ </button>
980
+ <button onclick="document.getElementById('${channelId}').remove(); updatePreview()" class="text-xs text-red-400 hover:text-red-300">
981
+ <i class="fas fa-trash"></i>
982
+ </button>
983
+ </div>
984
+ </div>
985
+ </div>
986
+ `;
987
+
988
+ channelsContainer.insertAdjacentHTML('beforeend', channelHtml);
989
+ updatePreview();
990
+ }
991
+
992
+ function addTextChannelToCategory(categoryId, defaultName = 'new-text-channel') {
993
+ const channelsContainer = document.getElementById(`${categoryId}-channels`);
994
+ const channelId = 'channel-' + Date.now();
995
+
996
+ const channelHtml = `
997
+ <div class="template-item" id="${channelId}">
998
+ <div class="flex justify-between items-center">
999
+ <div class="flex items-center">
1000
+ <div class="channel-icon text-channel">
1001
+ <i class="fas fa-hashtag text-xs"></i>
1002
+ </div>
1003
+ <input type="text" class="bg-transparent border-b border-gray-600 focus:border-blue-500 focus:outline-none px-1 py-1 text-white" value="${defaultName}" placeholder="Channel Name">
1004
+ </div>
1005
+ <div class="flex space-x-2">
1006
+ <button onclick="configureChannelPermissions('${channelId}')" class="text-xs text-yellow-400 hover:text-yellow-300">
1007
+ <i class="fas fa-lock"></i> Perms
1008
+ </button>
1009
+ <button onclick="document.getElementById('${channelId}').remove(); updatePreview()" class="text-xs text-red-400 hover:text-red-300">
1010
+ <i class="fas fa-trash"></i>
1011
+ </button>
1012
+ </div>
1013
+ </div>
1014
+ </div>
1015
+ `;
1016
+
1017
+ channelsContainer.insertAdjacentHTML('beforeend', channelHtml);
1018
+ updatePreview();
1019
+ }
1020
+
1021
+ function addVoiceChannelToCategory(categoryId, defaultName = 'new-voice-channel') {
1022
+ const channelsContainer = document.getElementById(`${categoryId}-channels`);
1023
+ const channelId = 'channel-' + Date.now();
1024
+
1025
+ const channelHtml = `
1026
+ <div class="template-item" id="${channelId}">
1027
+ <div class="flex justify-between items-center">
1028
+ <div class="flex items-center">
1029
+ <div class="channel-icon voice-channel">
1030
+ <i class="fas fa-volume-up text-xs"></i>
1031
+ </div>
1032
+ <input type="text" class="bg-transparent border-b border-gray-600 focus:border-blue-500 focus:outline-none px-1 py-1 text-white" value="${defaultName}" placeholder="Channel Name">
1033
+ </div>
1034
+ <div class="flex space-x-2">
1035
+ <button onclick="configureChannelPermissions('${channelId}')" class="text-xs text-yellow-400 hover:text-yellow-300">
1036
+ <i class="fas fa-lock"></i> Perms
1037
+ </button>
1038
+ <button onclick="document.getElementById('${channelId}').remove(); updatePreview()" class="text-xs text-red-400 hover:text-red-300">
1039
+ <i class="fas fa-trash"></i>
1040
+ </button>
1041
+ </div>
1042
+ </div>
1043
+ </div>
1044
+ `;
1045
+
1046
+ channelsContainer.insertAdjacentHTML('beforeend', channelHtml);
1047
+ updatePreview();
1048
+ }
1049
+
1050
+ function addRole() {
1051
+ const rolesContainer = document.getElementById('rolesContainer');
1052
+ const roleId = 'role-' + Date.now();
1053
+
1054
+ const roleHtml = `
1055
+ <div class="template-item" id="${roleId}">
1056
+ <div class="flex justify-between items-center">
1057
+ <div class="flex items-center">
1058
+ <div class="role-color" style="background-color: #${Math.floor(Math.random()*16777215).toString(16)}"></div>
1059
+ <input type="text" class="bg-transparent border-b border-gray-600 focus:border-blue-500 focus:outline-none px-1 py-1 text-white" value="New Role" placeholder="Role Name">
1060
+ </div>
1061
+ <div class="flex space-x-2">
1062
+ <button onclick="configureRolePermissions('${roleId}')" class="text-xs text-yellow-400 hover:text-yellow-300">
1063
+ <i class="fas fa-lock"></i> Perms
1064
+ </button>
1065
+ <button onclick="document.getElementById('${roleId}').remove(); updatePreview()" class="text-xs text-red-400 hover:text-red-300">
1066
+ <i class="fas fa-trash"></i>
1067
+ </button>
1068
+ </div>
1069
+ </div>
1070
+ </div>
1071
+ `;
1072
+
1073
+ rolesContainer.insertAdjacentHTML('beforeend', roleHtml);
1074
+ updatePreview();
1075
+ }
1076
+
1077
+ function addDefaultAdminRole() {
1078
+ const rolesContainer = document.getElementById('rolesContainer');
1079
+ const roleId = 'role-admin';
1080
+
1081
+ const roleHtml = `
1082
+ <div class="template-item" id="${roleId}">
1083
+ <div class="flex justify-between items-center">
1084
+ <div class="flex items-center">
1085
+ <div class="role-color" style="background-color: #ff0000"></div>
1086
+ <input type="text" class="bg-transparent border-b border-gray-600 focus:border-blue-500 focus:outline-none px-1 py-1 text-white" value="Admin" placeholder="Role Name">
1087
+ </div>
1088
+ <div class="flex space-x-2">
1089
+ <button onclick="configureRolePermissions('${roleId}')" class="text-xs text-yellow-400 hover:text-yellow-300">
1090
+ <i class="fas fa-lock"></i> Perms
1091
+ </button>
1092
+ <button onclick="document.getElementById('${roleId}').remove(); updatePreview()" class="text-xs text-red-400 hover:text-red-300">
1093
+ <i class="fas fa-trash"></i>
1094
+ </button>
1095
+ </div>
1096
+ </div>
1097
+ <div class="mt-2">
1098
+ <span class="permission-chip">Administrator</span>
1099
+ </div>
1100
+ </div>
1101
+ `;
1102
+
1103
+ rolesContainer.insertAdjacentHTML('beforeend', roleHtml);
1104
+ updatePreview();
1105
+ }
1106
+
1107
+ function configureChannelPermissions(channelId) {
1108
+ alert('Channel permission configuration would go here for: ' + channelId);
1109
+ // In a real implementation, this would open a modal with permission checkboxes
1110
+ }
1111
+
1112
+ function configureRolePermissions(roleId) {
1113
+ alert('Role permission configuration would go here for: ' + roleId);
1114
+ // In a real implementation, this would open a modal with permission checkboxes
1115
+ }
1116
+
1117
+ function updatePreview() {
1118
+ const previewContainer = document.getElementById('templatePreview');
1119
+
1120
+ // Get template name
1121
+ const templateName = document.getElementById('templateName').value || 'Unnamed Template';
1122
+
1123
+ // Get categories and their channels
1124
+ let categoriesHtml = '';
1125
+ const categoryElements = document.getElementById('categoriesContainer').children;
1126
+
1127
+ for (let category of categoryElements) {
1128
+ const categoryName = category.querySelector('input').value || 'Unnamed Category';
1129
+
1130
+ // Get channels in this category
1131
+ let channelsHtml = '';
1132
+ const channelElements = category.querySelector('.category-channels').children;
1133
+
1134
+ for (let channel of channelElements) {
1135
+ const channelName = channel.querySelector('input').value || 'Unnamed Channel';
1136
+ const isTextChannel = channel.querySelector('.text-channel') !== null;
1137
+
1138
+ channelsHtml += `
1139
+ <div class="flex items-center py-1 pl-6">
1140
+ <div class="${isTextChannel ? 'text-blue-400' : 'text-green-400'} mr-2">
1141
+ <i class="fas ${isTextChannel ? 'fa-hashtag' : 'fa-volume-up'}"></i>
1142
+ </div>
1143
+ <span class="text-gray-300">${channelName}</span>
1144
+ </div>
1145
+ `;
1146
+ }
1147
+
1148
+ categoriesHtml += `
1149
+ <div class="mb-4">
1150
+ <div class="flex items-center py-2 border-b border-gray-700">
1151
+ <div class="text-yellow-400 mr-2">
1152
+ <i class="fas fa-folder"></i>
1153
+ </div>
1154
+ <span class="font-medium text-gray-200">${categoryName}</span>
1155
+ </div>
1156
+ ${channelsHtml}
1157
+ </div>
1158
+ `;
1159
+ }
1160
+
1161
+ // Get standalone channels (not in categories)
1162
+ let standaloneChannelsHtml = '';
1163
+ const channelElements = document.getElementById('channelsContainer').children;
1164
+
1165
+ for (let channel of channelElements) {
1166
+ const channelName = channel.querySelector('input').value || 'Unnamed Channel';
1167
+ const isTextChannel = channel.querySelector('.text-channel') !== null;
1168
+
1169
+ standaloneChannelsHtml += `
1170
+ <div class="flex items-center py-1">
1171
+ <div class="${isTextChannel ? 'text-blue-400' : 'text-green-400'} mr-2">
1172
+ <i class="fas ${isTextChannel ? 'fa-hashtag' : 'fa-volume-up'}"></i>
1173
+ </div>
1174
+ <span class="text-gray-300">${channelName}</span>
1175
+ </div>
1176
+ `;
1177
+ }
1178
+
1179
+ if (standaloneChannelsHtml) {
1180
+ categoriesHtml += `
1181
+ <div class="mb-4">
1182
+ <div class="flex items-center py-2 border-b border-gray-700">
1183
+ <span class="font-medium text-gray-200">Standalone Channels</span>
1184
+ </div>
1185
+ ${standaloneChannelsHtml}
1186
+ </div>
1187
+ `;
1188
+ }
1189
+
1190
+ // Get roles
1191
+ let rolesHtml = '';
1192
+ const roleElements = document.getElementById('rolesContainer').children;
1193
+
1194
+ for (let role of roleElements) {
1195
+ const roleName = role.querySelector('input').value || 'Unnamed Role';
1196
+ const roleColor = role.querySelector('.role-color').style.backgroundColor;
1197
+
1198
+ rolesHtml += `
1199
+ <div class="flex items-center py-1">
1200
+ <div class="w-3 h-3 rounded-full mr-2" style="background-color: ${roleColor}"></div>
1201
+ <span class="text-gray-300">${roleName}</span>
1202
+ </div>
1203
+ `;
1204
+ }
1205
+
1206
+ // Update preview
1207
+ previewContainer.innerHTML = `
1208
+ <h3 class="text-lg font-bold text-white mb-4">${templateName}</h3>
1209
+
1210
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
1211
+ <div class="md:col-span-2">
1212
+ <h4 class="text-md font-medium text-gray-300 mb-2">Server Structure</h4>
1213
+ ${categoriesHtml || '<p class="text-gray-500">No categories or channels added yet</p>'}
1214
+ </div>
1215
+
1216
+ <div>
1217
+ <h4 class="text-md font-medium text-gray-300 mb-2">Roles</h4>
1218
+ ${rolesHtml || '<p class="text-gray-500">No roles added yet</p>'}
1219
+ </div>
1220
+ </div>
1221
+ `;
1222
+ }
1223
+ </script>
1224
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=TutorialMentor/serverdev" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
1225
+ </html>
prompts.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ I would like to make an admin panel website for my personal Discord bot. The Discord bot is called "ServerDev". Can you create a login page? There will be two ways to login. One is directly inserting the password just for me using "ServerDev!29", and the 2nd option will be by connecting to my Discord server. No one else should have access to this website except me. My Discord account ID is "386869387464015873". Anyone else trying to login should be denied. Also please make sure the theme is modern, futuristick, dark themed and techy."
2
+ Now let's start building what happens once successfully logged in. For now it should just show an empty dashboard that says welcome. Also please make sure the Login with Discord feature actually works.
3
+ Now let's make the Logging in with Discord actually functional by connecting with my "386869387464015873" Discord account.
4
+ When logging in with Discord, I get a popup from Discord with an error showing "Unknown Application". Let's try fixing that.
5
+ I am unable to click on both login buttons. Please fix the issue
6
+ Let's renove the option for logging in with Discord and just keep the manual password insert option. Remember, the password is "ServerDev!29"
7
+ Perfect! Now let's change how our Dashboard looks. This bot is mainly for personal use only and other members cannot invite it to any public servers. The bot's main function is to create Discord Servers. In the Dashboard id like to have a section where I can automatically create templates of what will be included in the server. This includes categories, text and voice channels and their permissions, roles and their permissions as well. And the ability to reorder them in any way I want.
8
+ Let's actually connect the bot with the website and make it functional. Bot token is "MTM2ODM3ODM2MzIzNTc5OTA4MA.GgWxwc.0GUxt0uPBFpDiwlIJOza0GQq1nVwd_xx8f2_so". And here's the bot OAuth2 invite link in case needed (https://discord.com/oauth2/authorize?client_id=1368378363235799080&permissions=8&integration_type=0&scope=bot). Show the bot profile picture at the top as well where it currently shows random picture.