This repository was archived by the owner on Jun 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
1168 lines (1071 loc) · 37.1 KB
/
App.tsx
File metadata and controls
1168 lines (1071 loc) · 37.1 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
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import React, {
useState,
useEffect,
useRef,
useMemo,
useCallback,
} from 'react';
import { motion, AnimatePresence } from 'framer-motion';
import Particles from 'react-tsparticles';
import { loadSlim } from 'tsparticles-slim';
import type { Engine } from 'tsparticles-engine';
import {
Search,
ChevronUp,
Download,
MessageCircle,
HelpCircle,
X,
Filter,
ChevronDown,
Info,
Palette,
ArrowUp,
Check,
Play,
Folder,
ArrowLeft,
Eye,
Copy,
} from 'lucide-react';
// Import data from the data directory
import { toolsData } from './data';
// Main category filters
const mainCategories = [
'Software',
'Plugin',
'Extension',
'Leaks',
'Clips',
'Scripts',
'Template'
];
// Discord server link
const DISCORD_SERVER_LINK = 'https://discord.gg/ErHZJJ7Tdh';
// Password
const PASSWORD = 'aura';
// Theme options
const themeOptions = [
{
name: 'Blue',
primary: '#0070f3',
accent: '#00c2ff',
background: '#0a0a0a',
primaryRgb: '0, 112, 243',
accentRgb: '0, 194, 255',
},
{
name: 'Red',
primary: '#ff0040',
accent: '#ff5e5e',
background: '#0a0a0a',
primaryRgb: '255, 0, 64',
accentRgb: '255, 94, 94',
},
{
name: 'Green',
primary: '#00c853',
accent: '#69f0ae',
background: '#0a0a0a',
primaryRgb: '0, 200, 83',
accentRgb: '105, 240, 174',
},
{
name: 'Purple',
primary: '#7c4dff',
accent: '#b388ff',
background: '#0a0a0a',
primaryRgb: '124, 77, 255',
accentRgb: '179, 136, 255',
},
{
name: 'Orange',
primary: '#ff6d00',
accent: '#ffab40',
background: '#0a0a0a',
primaryRgb: '255, 109, 0',
accentRgb: '255, 171, 64',
},
];
// Local storage keys
const THEME_STORAGE_KEY = 'aura-theme-preference';
const DISCLAIMER_STORAGE_KEY = 'aura-disclaimer-accepted';
function App() {
// State for UI elements
const [showWarning, setShowWarning] = useState(() => {
return localStorage.getItem(DISCLAIMER_STORAGE_KEY) !== 'true';
});
const [dontShowAgain, setDontShowAgain] = useState(false);
const [loading, setLoading] = useState(false);
const [loadingPercentage, setLoadingPercentage] = useState(0);
const [showCollapseMenu, setShowCollapseMenu] = useState(false);
const [searchTerm, setSearchTerm] = useState('');
const [showAdvancedSearch, setShowAdvancedSearch] = useState(false);
const [selectedTags, setSelectedTags] = useState<string[]>([]);
const [showFaq, setShowFaq] = useState(false);
const [showScrollTop, setShowScrollTop] = useState(false);
const [showThemeSelector, setShowThemeSelector] = useState(false);
const [currentTheme, setCurrentTheme] = useState(() => {
const savedTheme = localStorage.getItem(THEME_STORAGE_KEY);
if (savedTheme) {
try {
return JSON.parse(savedTheme);
} catch (e) {
return themeOptions[0];
}
}
return themeOptions[0];
});
// State for clips preview modal
const [showClipsPreview, setShowClipsPreview] = useState(false);
const [selectedClip, setSelectedClip] = useState<any>(null);
const [selectedFile, setSelectedFile] = useState<any>(null);
// New state for password copy animation
const [showCopySuccess, setShowCopySuccess] = useState(false);
// Refs for custom cursor
const cursorRef = useRef<HTMLDivElement>(null);
const cursorTrailerRef = useRef<HTMLDivElement>(null);
const particleBgRef = useRef<HTMLDivElement>(null);
// Initialize particles with memoization for better performance
const particlesInit = useCallback(async (engine: Engine) => {
await loadSlim(engine);
}, []);
// Handle warning acceptance
const handleAcceptWarning = () => {
setShowWarning(false);
setLoading(true);
if (dontShowAgain) {
localStorage.setItem(DISCLAIMER_STORAGE_KEY, 'true');
}
let progress = 0;
const interval = setInterval(() => {
progress += 2;
setLoadingPercentage(progress);
if (progress >= 100) {
clearInterval(interval);
setTimeout(() => {
setLoading(false);
}, 300);
}
}, 15);
};
// Handle password copy
const handleCopyPassword = () => {
navigator.clipboard.writeText(PASSWORD);
setShowCopySuccess(true);
setTimeout(() => setShowCopySuccess(false), 2000);
};
// Apply theme to CSS variables
useEffect(() => {
document.documentElement.style.setProperty('--primary', currentTheme.primary);
document.documentElement.style.setProperty('--accent', currentTheme.accent);
document.documentElement.style.setProperty('--background', currentTheme.background);
document.documentElement.style.setProperty('--primary-rgb', currentTheme.primaryRgb);
document.documentElement.style.setProperty('--accent-rgb', currentTheme.accentRgb);
const primaryDark = adjustColor(currentTheme.primary, -20);
document.documentElement.style.setProperty('--primary-dark', primaryDark);
localStorage.setItem(THEME_STORAGE_KEY, JSON.stringify(currentTheme));
}, [currentTheme]);
// Helper function to adjust color brightness
const adjustColor = (color: string, amount: number): string => {
return '#' + color.replace(/^#/, '').replace(/../g, (color) => {
const value = Math.min(255, Math.max(0, parseInt(color, 16) + amount));
return value.toString(16).padStart(2, '0');
});
};
// Create star particles for enhanced background
useEffect(() => {
if (!particleBgRef.current) return;
particleBgRef.current.innerHTML = '';
const createStars = () => {
const starsCount = 100;
const container = particleBgRef.current;
if (!container) return;
for (let i = 0; i < starsCount; i++) {
const star = document.createElement('div');
star.classList.add('particle-star');
const x = Math.random() * 100;
const y = Math.random() * 100;
const size = Math.random() * 3 + 1;
const duration = Math.random() * 5 + 3;
const delay = Math.random() * 5;
const opacity = Math.random() * 0.7 + 0.3;
star.style.left = `${x}%`;
star.style.top = `${y}%`;
star.style.width = `${size}px`;
star.style.height = `${size}px`;
star.style.setProperty('--duration', `${duration}s`);
star.style.setProperty('--delay', `${delay}s`);
star.style.setProperty('--opacity', `${opacity}`);
if (Math.random() > 0.5) {
star.style.background = currentTheme.primary;
} else {
star.style.background = currentTheme.accent;
}
container.appendChild(star);
}
for (let i = 0; i < 5; i++) {
const orb = document.createElement('div');
orb.classList.add('floating-orb');
const x = Math.random() * 100;
const y = Math.random() * 100;
const size = Math.random() * 200 + 100;
const delay = Math.random() * 5;
orb.style.left = `${x}%`;
orb.style.top = `${y}%`;
orb.style.width = `${size}px`;
orb.style.height = `${size}px`;
orb.style.animationDelay = `${delay}s`;
container.appendChild(orb);
}
};
createStars();
}, [currentTheme]);
// Custom cursor effect with debounce for better performance
useEffect(() => {
let lastX = 0;
let lastY = 0;
let rafId: number | null = null;
const handleMouseMove = (e: MouseEvent) => {
lastX = e.clientX;
lastY = e.clientY;
if (!rafId) {
rafId = requestAnimationFrame(() => {
if (cursorRef.current) {
cursorRef.current.style.left = `${lastX}px`;
cursorRef.current.style.top = `${lastY}px`;
}
if (cursorTrailerRef.current) {
cursorTrailerRef.current.style.left = `${lastX}px`;
cursorTrailerRef.current.style.top = `${lastY}px`;
}
rafId = null;
});
}
};
const handleMouseDown = () => {
if (cursorRef.current) {
cursorRef.current.style.width = '15px';
cursorRef.current.style.height = '15px';
}
if (cursorTrailerRef.current) {
cursorTrailerRef.current.style.width = '30px';
cursorTrailerRef.current.style.height = '30px';
}
};
const handleMouseUp = () => {
if (cursorRef.current) {
cursorRef.current.style.width = '20px';
cursorRef.current.style.height = '20px';
}
if (cursorTrailerRef.current) {
cursorTrailerRef.current.style.width = '40px';
cursorTrailerRef.current.style.height = '40px';
}
};
const handleContextMenu = (e: MouseEvent) => {
e.preventDefault();
return false;
};
document.addEventListener('mousemove', handleMouseMove, { passive: true });
document.addEventListener('mousedown', handleMouseDown);
document.addEventListener('mouseup', handleMouseUp);
document.addEventListener('contextmenu', handleContextMenu);
return () => {
document.removeEventListener('mousemove', handleMouseMove);
document.removeEventListener('mousedown', handleMouseDown);
document.removeEventListener('mouseup', handleMouseUp);
document.removeEventListener('contextmenu', handleContextMenu);
if (rafId) cancelAnimationFrame(rafId);
};
}, []);
// Scroll to top functionality with smoother animation
useEffect(() => {
const handleScroll = () => {
if (window.scrollY > 300) {
setShowScrollTop(true);
} else {
setShowScrollTop(false);
}
};
window.addEventListener('scroll', handleScroll, { passive: true });
return () => window.removeEventListener('scroll', handleScroll);
}, []);
// Disable background interaction when disclaimer is shown
useEffect(() => {
if (showWarning || showClipsPreview) {
document.body.style.overflow = 'hidden';
} else {
document.body.style.overflow = '';
}
return () => {
document.body.style.overflow = '';
};
}, [showWarning, showClipsPreview]);
const scrollToTop = () => {
const scrollStep = -window.scrollY / 25;
const scrollInterval = setInterval(() => {
if (window.scrollY !== 0) {
window.scrollBy(0, scrollStep);
} else {
clearInterval(scrollInterval);
}
}, 15);
};
// Handle Discord button click
const handleDiscordClick = () => {
window.open(DISCORD_SERVER_LINK, '_blank');
};
// Filter tools based on search and tags - memoized for better performance
const filteredTools = useMemo(() => {
return toolsData.filter((tool) => {
const matchesSearch = tool.name
.toLowerCase()
.includes(searchTerm.toLowerCase());
const matchesTags =
selectedTags.length === 0 ||
selectedTags.some((tag) => tool.tags.includes(tag));
return matchesSearch && matchesTags;
});
}, [searchTerm, selectedTags]);
// Toggle tag selection
const toggleTag = useCallback((tag: string) => {
setSelectedTags((prev) =>
prev.includes(tag) ? prev.filter((t) => t !== tag) : [...prev, tag]
);
}, []);
// Handle download click
const handleDownload = useCallback((link: string) => {
if (link) {
window.open(link, '_blank');
} else {
alert('Download link is not available at the moment. Please try again later.');
}
}, []);
// Change theme
const changeTheme = useCallback((theme: (typeof themeOptions)[0]) => {
setCurrentTheme(theme);
setShowThemeSelector(false);
}, []);
// Handle clip preview
const handleClipPreview = useCallback((clip: any) => {
setSelectedClip(clip);
setShowClipsPreview(true);
}, []);
// Handle file selection in preview
const handleFileSelect = useCallback((file: any) => {
setSelectedFile(file);
}, []);
// Close clips preview modal
const closeClipsPreview = useCallback(() => {
setShowClipsPreview(false);
setSelectedClip(null);
setSelectedFile(null);
}, []);
// Memoize particle options for better performance
const particleOptions = useMemo(() => {
return {
fullScreen: {
enable: true,
zIndex: -1,
},
fpsLimit: 60,
particles: {
number: {
value: 50,
density: {
enable: true,
value_area: 800,
},
},
color: {
value: [currentTheme.primary, currentTheme.accent],
},
shape: {
type: 'circle',
},
opacity: {
value: 0.5,
random: true,
anim: {
enable: true,
speed: 0.5,
opacity_min: 0.1,
sync: false,
},
},
size: {
value: 3,
random: true,
anim: {
enable: true,
speed: 1,
size_min: 0.3,
sync: false,
},
},
line_linked: {
enable: true,
distance: 150,
color: currentTheme.primary,
opacity: 0.2,
width: 1,
},
move: {
enable: true,
speed: 0.8,
direction: 'none',
random: true,
straight: false,
out_mode: 'out',
bounce: false,
attract: {
enable: true,
rotateX: 600,
rotateY: 1200,
},
},
},
interactivity: {
detect_on: 'canvas',
events: {
onhover: {
enable: true,
mode: 'grab',
},
onclick: {
enable: true,
mode: 'push',
},
resize: true,
},
modes: {
grab: {
distance: 140,
line_linked: {
opacity: 0.5,
},
},
push: {
particles_nb: 2,
},
},
},
retina_detect: true,
background: {
color: 'transparent',
image: '',
position: '50% 50%',
repeat: 'no-repeat',
size: 'cover',
},
};
}, [currentTheme.primary, currentTheme.accent]);
return (
<>
{/* Password Button */}
<motion.div
className="fixed top-4 right-4 z-50"
initial={{ y: -20, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ delay: 0.5 }}
>
<motion.button
className="password-btn"
onClick={handleCopyPassword}
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
>
<AnimatePresence mode="wait">
{showCopySuccess ? (
<motion.div
key="success"
initial={{ scale: 0 }}
animate={{ scale: 1 }}
exit={{ scale: 0 }}
className="flex items-center gap-2"
>
<Check size={16} />
<span>Copied!</span>
</motion.div>
) : (
<motion.div
key="copy"
initial={{ scale: 0 }}
animate={{ scale: 1 }}
exit={{ scale: 0 }}
className="flex items-center gap-2"
>
<Copy size={16} />
<span>Password: {PASSWORD}</span>
</motion.div>
)}
</AnimatePresence>
</motion.button>
</motion.div>
{/* Custom Cursor */}
<div ref={cursorRef} className="custom-cursor"></div>
<div ref={cursorTrailerRef} className="cursor-trailer"></div>
{/* Enhanced Particle Background */}
<div ref={particleBgRef} className="particle-bg"></div>
{/* Particles Background */}
<div className="particles-container">
<Particles
id="tsparticles"
init={particlesInit}
options={particleOptions}
/>
</div>
{/* Enhanced Disclaimer Modal */}
<AnimatePresence>
{showWarning && (
<motion.div
className="warning-modal"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
>
<motion.div
className="disclaimer-content modern-disclaimer"
initial={{ scale: 0.8, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
transition={{ type: 'spring', damping: 15 }}
>
<div className="disclaimer-glow"></div>
<div className="disclaimer-header">
<motion.h2
className="disclaimer-title"
initial={{ y: -20, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ delay: 0.1 }}
>
WELCOME TO AURA
</motion.h2>
</div>
<div className="disclaimer-body">
<motion.div
className="disclaimer-icon-container"
initial={{ scale: 0, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
transition={{ delay: 0.2, type: 'spring', damping: 12 }}
>
<Check size={40} className="disclaimer-main-icon" />
</motion.div>
<motion.p
className="disclaimer-message"
initial={{ y: 20, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ delay: 0.3 }}
>
Everything on this website is safe to download and use.
However, we recommend using an anti-virus program for your own
protection and peace of mind.
</motion.p>
<motion.div
className="disclaimer-checkbox-container"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 0.4 }}
>
<label className="disclaimer-checkbox-label">
<input
type="checkbox"
checked={dontShowAgain}
onChange={() => setDontShowAgain(!dontShowAgain)}
className="disclaimer-checkbox"
/>
<span className="disclaimer-checkbox-custom">
{dontShowAgain && <Check size={12} />}
</span>
<span>Don't show this message again</span>
</label>
</motion.div>
</div>
<div className="disclaimer-footer">
<motion.button
className="disclaimer-btn modern-btn"
onClick={handleAcceptWarning}
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
initial={{ y: 20, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ delay: 0.5 }}
>
Continue to Aura
</motion.button>
</div>
</motion.div>
</motion.div>
)}
</AnimatePresence>
{/* Loading Screen */}
<AnimatePresence>
{loading && (
<motion.div
className="loading-screen"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
>
<div className="loading-aura"></div>
<motion.div
className="loading-content"
initial={{ y: 20, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ delay: 0.2 }}
>
<h1 className="loading-title">Defining Your Aura</h1>
<p className="loading-subtitle">
Preparing your digital workspace...
</p>
<div className="loading-bar-container">
<motion.div
className="loading-bar"
initial={{ width: '0%' }}
animate={{ width: `${loadingPercentage}%` }}
transition={{ duration: 0.1 }}
></motion.div>
</div>
<p className="loading-percentage">{loadingPercentage}%</p>
</motion.div>
</motion.div>
)}
</AnimatePresence>
{/* FAQ Modal */}
<AnimatePresence>
{showFaq && (
<motion.div
className="faq-modal"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
>
<motion.div
className="faq-content"
initial={{ scale: 0.8, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
transition={{ type: 'spring', damping: 15 }}
>
<div className="faq-header">
<h2 className="faq-title">Frequently Asked Questions</h2>
<button className="close-btn" onClick={() => setShowFaq(false)}>
<X size={24} />
</button>
</div>
<div className="faq-body">
<div className="faq-item">
<h3>What is EditTools?</h3>
<p>
EditTools is a platform that provides access to various
editing software for educational purposes. We aim to help
users explore different tools before making a purchase
decision.
</p>
</div>
<div className="faq-item">
<h3>Are these downloads safe?</h3>
<p>
While we try to ensure the safety of all downloads, we
cannot guarantee that all files are 100% safe. We recommend
using a reliable antivirus program when downloading and
installing any software.
</p>
</div>
<div className="faq-item">
<h3>What if a download requires a password?</h3>
<p>
If any zip file requires a password, the password is always
"aura" (without quotes). This is the standard password for
all protected archives on our site.
</p>
</div>
<div className="faq-item">
<h3>Why do some downloads redirect to external sites?</h3>
<p>
Some downloads are hosted on external platforms to ensure
availability. You may need to navigate through ad pages or
link shorteners to access the actual download.
</p>
</div>
<div className="faq-item">
<h3>How do I report a broken link?</h3>
<p>
You can report broken links by joining our Discord community
and posting in the #broken-links channel.
</p>
</div>
<div className="faq-item">
<h3>How often is the site updated?</h3>
<p>
We update our collection regularly with the latest versions
of software. Check back frequently for new additions.
</p>
</div>
<div className="faq-item">
<h3>Is using this software legal?</h3>
<p>
Using pirated software may violate copyright laws in your
country. This site is for educational purposes only, and we
encourage users to purchase legitimate licenses for software
they use regularly.
</p>
</div>
</div>
</motion.div>
</motion.div>
)}
</AnimatePresence>
{/* Theme Selector Modal */}
<AnimatePresence>
{showThemeSelector && (
<motion.div
className="theme-modal"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
>
<motion.div
className="theme-content"
initial={{ scale: 0.8, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
transition={{ type: 'spring', damping: 15 }}
>
<div className="theme-header">
<h2 className="theme-title">Choose a Theme</h2>
<button
className="close-btn"
onClick={() => setShowThemeSelector(false)}
>
<X size={24} />
</button>
</div>
<div className="theme-body">
{themeOptions.map((theme, index) => (
<div
key={index}
className={`theme-option ${currentTheme.name === theme.name ? 'active' : ''
}`}
onClick={() => changeTheme(theme)}
style={{
background: `linear-gradient(45deg, ${theme.primary}, ${theme.accent})`,
}}
>
<span>{theme.name}</span>
</div>
))}
</div>
</motion.div>
</motion.div>
)}
</AnimatePresence>
{/* Clips Preview Modal */}
<AnimatePresence>
{showClipsPreview && selectedClip && (
<motion.div
className="clips-preview-modal"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
>
<motion.div
className="clips-preview-content"
initial={{ scale: 0.8, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
transition={{ type: 'spring', damping: 15 }}
>
<div className="clips-preview-header">
<div className="clips-preview-title-container">
<button
className="clips-preview-back-btn"
onClick={closeClipsPreview}
>
<ArrowLeft size={20} />
</button>
<h2 className="clips-preview-title">{selectedClip.name}</h2>
</div>
<button className="close-btn" onClick={closeClipsPreview}>
<X size={24} />
</button>
</div>
<div className="clips-preview-body">
<div className="clips-preview-sidebar">
<div className="clips-preview-folder-header">
<Folder size={18} className="clips-preview-folder-icon" />
<span>Files</span>
</div>
<div className="clips-preview-file-list">
{selectedClip.files.map((file: any, index: number) => (
<div
key={index}
className={`clips-preview-file-item ${selectedFile === file ? 'active' : ''
}`}
onClick={() => handleFileSelect(file)}
>
<div className="clips-preview-file-name">
{file.name}
</div>
<div className="clips-preview-file-size">
{file.size}
</div>
</div>
))}
</div>
</div>
<div className="clips-preview-main">
{selectedFile ? (
<div className="clips-preview-file-details">
<div className="clips-preview-thumbnail">
{selectedFile.link.includes('drive.google.com') ? (
<iframe
src={selectedFile.link}
width="600px"
height="380px"
allow="autoplay"
className="clips-preview-video"
/>
) : (
<>
<img
src={
selectedFile.thumbnail ||
'https://i.imgur.com/placeholder.jpg'
}
alt={selectedFile.name}
className="clips-preview-thumbnail-img"
/>
<div className="clips-preview-play-overlay">
<Play
size={40}
className="clips-preview-play-icon"
/>
</div>
</>
)}
</div>
<div className="clips-preview-file-info">
<h3 className="clips-preview-file-title">
{selectedFile.name}
</h3>
<p className="clips-preview-file-size-detail">
Size: {selectedFile.size}
</p>
</div>
</div>
) : (
<div className="clips-preview-no-selection">
<div className="clips-preview-no-selection-icon">
<Eye size={40} />
</div>
<p>Select a file from the list to preview</p>
</div>
)}
</div>
</div>
</motion.div>
</motion.div>
)}
</AnimatePresence>
{/* Main Content */}
<div className="container mx-auto px-4 py-8">
{/* Search Section */}
<div className="flex flex-col items-center mb-8">
<motion.div
className="search-container mb-4"
initial={{ y: -20, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ delay: 0.2 }}
>
<input
type="text"
placeholder="Search for editing tools..."
className="search-input"
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
/>
<Search className="search-icon" size={20} />
</motion.div>
<motion.div
className="flex items-center gap-2 cursor-pointer"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 0.3 }}
onClick={() => setShowAdvancedSearch(!showAdvancedSearch)}
>
<Filter size={16} className="text-filter-icon" />
<span className="text-filter-text text-sm">Advanced Search</span>
{showAdvancedSearch ? (
<ChevronUp size={16} className="text-filter-icon" />
) : (
<ChevronDown size={16} className="text-filter-icon" />
)}
</motion.div>
<div
className={`advanced-search w-full max-w-3xl ${showAdvancedSearch ? 'open' : ''
}`}
>
<div className="glass p-4 rounded-lg mt-3">
<h3 className="text-white text-sm mb-2">Filter by category:</h3>
<div className="filter-group">
{mainCategories.map((tag) => (
<div
key={tag}
className={`filter-tag ${selectedTags.includes(tag) ? 'active' : ''
}`}