codebybrody commited on
Commit
71849f8
路
verified 路
1 Parent(s): 3856d3e

Upload 123 files

Browse files
Files changed (1) hide show
  1. src/App.tsx +25 -6
src/App.tsx CHANGED
@@ -505,6 +505,18 @@ function App() {
505
  }
506
  const manga = sectionMangas.find(m => m.id === mangaId);
507
  if (manga?.is_folder) {
 
 
 
 
 
 
 
 
 
 
 
 
508
  window.location.hash = `folder/${mangaId}`;
509
  return;
510
  }
@@ -617,6 +629,13 @@ function App() {
617
  } else if (currentManga?.folder_id) {
618
  const parent = mangas.find(m => m.id === currentManga.folder_id);
619
  if (parent?.is_folder) {
 
 
 
 
 
 
 
620
  window.location.hash = `folder/${currentManga.folder_id}`;
621
  setCurrentFolderId(currentManga.folder_id);
622
  setSelectedComicId(null);
@@ -828,15 +847,15 @@ function App() {
828
  const folder = sectionMangas.find(m => m.id === currentFolderId);
829
  if (folder?.section === 'series') {
830
  return (
831
- <div className="flex flex-col gap-3 w-full max-w-4xl mx-auto">
832
  {mangaItems.map((item) => (
833
  <div
834
  key={item.id}
835
  onClick={() => handleSelectComic(item.id)}
836
- className="bg-[#1a1a1a]/80 hover:bg-[#242424] p-3 rounded-xl cursor-pointer flex items-center justify-between border border-gray-800/50 transition-all duration-300 hover:border-purple-500/50 group hover:shadow-lg hover:shadow-purple-500/10"
837
  >
838
  <div className="flex items-center gap-4 min-w-0 w-full">
839
- <div className="relative w-24 h-16 sm:w-32 sm:h-20 bg-[#111] rounded-lg flex-shrink-0 overflow-hidden border border-gray-800/50 group-hover:border-[#bb86fc]/50 transition-colors">
840
  {item.thumbnail_url || item.cover_url ? (
841
  <img src={item.thumbnail_url || item.cover_url} alt={item.title} className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500" style={{ objectPosition: item.thumbnail_position || 'center' }} />
842
  ) : (
@@ -853,11 +872,11 @@ function App() {
853
  </div>
854
  <div className="flex flex-col min-w-0 py-1">
855
  <span className="text-white font-bold text-sm sm:text-base truncate group-hover:text-[#bb86fc] transition-colors">{item.title}</span>
856
- <span className="text-xs text-gray-400 mt-1 line-clamp-2">{item.description || (item.author && item.author !== 'An贸nimo' ? item.author : 'Cap铆tulo de la serie')}</span>
857
  </div>
858
  </div>
859
- <div className="w-10 h-10 rounded-full bg-gray-800/50 flex items-center justify-center flex-shrink-0 ml-4 group-hover:bg-purple-500/20 group-hover:scale-110 transition-all duration-300">
860
- <ChevronRight className="w-5 h-5 text-gray-500 group-hover:text-[#bb86fc] transition-colors" />
861
  </div>
862
  </div>
863
  ))}
 
505
  }
506
  const manga = sectionMangas.find(m => m.id === mangaId);
507
  if (manga?.is_folder) {
508
+ // Si es una carpeta (Serie/Colecci贸n), verificamos si solo tiene un elemento
509
+ const children = sectionMangas.filter(m => m.folder_id === mangaId && m.id !== mangaId);
510
+
511
+ if (children.length === 1) {
512
+ // Si solo hay uno, vamos directo al video
513
+ const singleId = children[0].id;
514
+ window.location.hash = `video/${singleId}`;
515
+ setSelectedComicId(singleId);
516
+ setShowHD(false);
517
+ return;
518
+ }
519
+
520
  window.location.hash = `folder/${mangaId}`;
521
  return;
522
  }
 
629
  } else if (currentManga?.folder_id) {
630
  const parent = mangas.find(m => m.id === currentManga.folder_id);
631
  if (parent?.is_folder) {
632
+ // Si la carpeta padre solo tiene un elemento, al retroceder volvemos al cat脙隆logo principal
633
+ const siblings = mangas.filter(m => m.folder_id === currentManga.folder_id && m.id !== currentManga.folder_id);
634
+ if (siblings.length === 1) {
635
+ handleBackToHome();
636
+ return;
637
+ }
638
+
639
  window.location.hash = `folder/${currentManga.folder_id}`;
640
  setCurrentFolderId(currentManga.folder_id);
641
  setSelectedComicId(null);
 
847
  const folder = sectionMangas.find(m => m.id === currentFolderId);
848
  if (folder?.section === 'series') {
849
  return (
850
+ <div className="flex flex-col gap-2 w-full">
851
  {mangaItems.map((item) => (
852
  <div
853
  key={item.id}
854
  onClick={() => handleSelectComic(item.id)}
855
+ className="bg-[#1a1a1a]/60 hover:bg-[#242424] p-2 rounded-lg cursor-pointer flex items-center justify-between border border-gray-800/40 transition-all duration-300 hover:border-purple-500/50 group hover:shadow-lg hover:shadow-purple-500/10"
856
  >
857
  <div className="flex items-center gap-4 min-w-0 w-full">
858
+ <div className="relative w-20 h-12 sm:w-28 sm:h-16 bg-[#111] rounded flex-shrink-0 overflow-hidden border border-gray-800/50 group-hover:border-[#bb86fc]/50 transition-colors">
859
  {item.thumbnail_url || item.cover_url ? (
860
  <img src={item.thumbnail_url || item.cover_url} alt={item.title} className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500" style={{ objectPosition: item.thumbnail_position || 'center' }} />
861
  ) : (
 
872
  </div>
873
  <div className="flex flex-col min-w-0 py-1">
874
  <span className="text-white font-bold text-sm sm:text-base truncate group-hover:text-[#bb86fc] transition-colors">{item.title}</span>
875
+ <span className="text-xs text-gray-400 mt-1 line-clamp-1">{item.description || (item.author && item.author !== 'An贸nimo' ? item.author : 'Cap铆tulo de la serie')}</span>
876
  </div>
877
  </div>
878
+ <div className="w-8 h-8 rounded-full bg-gray-800/50 flex items-center justify-center flex-shrink-0 ml-4 group-hover:bg-purple-500/20 group-hover:scale-110 transition-all duration-300">
879
+ <ChevronRight className="w-4 h-4 text-gray-500 group-hover:text-[#bb86fc] transition-colors" />
880
  </div>
881
  </div>
882
  ))}