codebybrody commited on
Commit
20f18c5
·
verified ·
1 Parent(s): 7ca9e7f

Upload 105 files

Browse files
src/App.tsx CHANGED
@@ -420,7 +420,12 @@ function App() {
420
  <div className="hidden sm:flex items-center gap-1.5 bg-[#1a1a1a] border border-[#333] px-3 py-1 rounded-full shadow-inner">
421
  <BookOpen className="w-4 h-4 text-[#bb86fc]" />
422
  <span className="text-sm font-bold text-gray-300">
423
- {mangas.length} <span className="text-xs text-gray-500 font-normal">mangas</span>
 
 
 
 
 
424
  </span>
425
  </div>
426
  </div>
 
420
  <div className="hidden sm:flex items-center gap-1.5 bg-[#1a1a1a] border border-[#333] px-3 py-1 rounded-full shadow-inner">
421
  <BookOpen className="w-4 h-4 text-[#bb86fc]" />
422
  <span className="text-sm font-bold text-gray-300">
423
+ {mangas.filter(m => !m.is_folder).length} <span className="text-xs text-gray-500 font-normal">mangas</span>
424
+ </span>
425
+ <span className="text-gray-600 mx-1">|</span>
426
+ <Folder className="w-4 h-4 text-[#bb86fc]" />
427
+ <span className="text-sm font-bold text-gray-300">
428
+ {mangas.filter(m => m.is_folder).length} <span className="text-xs text-gray-500 font-normal">carpetas</span>
429
  </span>
430
  </div>
431
  </div>
src/components/MangaCard.tsx CHANGED
@@ -21,9 +21,10 @@ interface MangaCardProps {
21
  onMouseDown?: (e: React.MouseEvent) => void;
22
  onMouseEnter?: (e: React.MouseEvent) => void;
23
  folderItemCount?: number;
 
24
  }
25
 
26
- export function MangaCard({ id, title, author, pageCount, thumbnail, manga, onSelect, onEdit, onDelete, isCategoryPlusEnabled, isSelected, onMouseDown, onMouseEnter, folderItemCount }: MangaCardProps) {
27
  const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
28
  const thumbnailUrl = thumbnail ? getThumbnailUrl(thumbnail) : undefined;
29
 
@@ -65,9 +66,37 @@ export function MangaCard({ id, title, author, pageCount, thumbnail, manga, onSe
65
  className={`relative bg-black rounded-lg shadow-lg overflow-hidden transition-transform duration-300 hover:scale-[1.02] aspect-[2/3] ${isSelected ? 'ring-4 ring-[#bb86fc]' : ''}`}
66
  >
67
  {manga?.is_folder ? (
68
- <div className="w-full aspect-[2/3] flex items-center justify-center bg-gradient-to-br from-[#1a1a1a] to-[#2a2a2a] rounded-lg border-2 border-gray-800 group-hover:border-purple-500/50 transition-colors duration-300">
69
- <Folder className="w-16 h-16 text-purple-400 opacity-80 group-hover:scale-110 transition-transform duration-300" />
70
- <div className="absolute inset-x-0 bottom-0 h-1/3 bg-gradient-to-t from-black/80 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  </div>
72
  ) : thumbnailUrl ? (
73
  <>
 
21
  onMouseDown?: (e: React.MouseEvent) => void;
22
  onMouseEnter?: (e: React.MouseEvent) => void;
23
  folderItemCount?: number;
24
+ folderThumbnails?: string[];
25
  }
26
 
27
+ export function MangaCard({ id, title, author, pageCount, thumbnail, manga, onSelect, onEdit, onDelete, isCategoryPlusEnabled, isSelected, onMouseDown, onMouseEnter, folderItemCount, folderThumbnails }: MangaCardProps) {
28
  const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
29
  const thumbnailUrl = thumbnail ? getThumbnailUrl(thumbnail) : undefined;
30
 
 
66
  className={`relative bg-black rounded-lg shadow-lg overflow-hidden transition-transform duration-300 hover:scale-[1.02] aspect-[2/3] ${isSelected ? 'ring-4 ring-[#bb86fc]' : ''}`}
67
  >
68
  {manga?.is_folder ? (
69
+ <div className="w-full aspect-[2/3] relative flex items-center justify-center bg-gradient-to-br from-[#1a1a1a] to-[#2a2a2a] rounded-lg border-2 border-gray-800 transition-colors duration-300 overflow-hidden group-hover:border-purple-500/50">
70
+ {folderThumbnails && folderThumbnails.length > 0 ? (
71
+ <>
72
+ <div className="absolute inset-0 w-full h-full">
73
+ <ImageLoader
74
+ src={getThumbnailUrl(folderThumbnails[0]) || ''}
75
+ alt="Folder Cover"
76
+ aspectRatio="2/3"
77
+ objectFit="cover"
78
+ className="w-full h-full"
79
+ imgClassName="transition-transform duration-700 group-hover:scale-110 opacity-70"
80
+ />
81
+ </div>
82
+ <div className="absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-t from-black/90 to-transparent pointer-events-none"></div>
83
+
84
+ {/* Iconito Glassmorphism en la esquina inferior derecha */}
85
+ <div className="absolute bottom-2 right-2 z-10 flex items-center justify-center bg-white/10 backdrop-blur-md rounded-lg p-1.5 border border-white/20 shadow-xl transition-all duration-300 group-hover:bg-white/20 group-hover:scale-110">
86
+ <Folder className="w-4 h-4 text-white drop-shadow-[0_0_5px_rgba(255,255,255,0.5)]" />
87
+ </div>
88
+ </>
89
+ ) : (
90
+ // Carpeta vacía
91
+ <>
92
+ <div className="absolute bottom-2 right-2 z-10 flex items-center justify-center bg-white/10 backdrop-blur-md rounded-lg p-1.5 border border-white/20 shadow-xl transition-all duration-300 group-hover:bg-white/20 group-hover:scale-110">
93
+ <Folder className="w-4 h-4 text-white drop-shadow-[0_0_5px_rgba(255,255,255,0.5)]" />
94
+ </div>
95
+ <div className="relative z-10 flex flex-col items-center justify-center opacity-30">
96
+ <Folder className="w-16 h-16 text-gray-400 mb-2" />
97
+ </div>
98
+ </>
99
+ )}
100
  </div>
101
  ) : thumbnailUrl ? (
102
  <>
src/components/SearchResults.tsx CHANGED
@@ -267,6 +267,7 @@ export function SearchResults({
267
  onMouseDown={(e) => handleMouseDown(e, item.id)}
268
  onMouseEnter={() => handleMouseEnter(item.id)}
269
  folderItemCount={item.manga?.is_folder ? allMangas.filter(m => m.folder_id === item.id).length : undefined}
 
270
  />
271
  </div>
272
  ))}
 
267
  onMouseDown={(e) => handleMouseDown(e, item.id)}
268
  onMouseEnter={() => handleMouseEnter(item.id)}
269
  folderItemCount={item.manga?.is_folder ? allMangas.filter(m => m.folder_id === item.id).length : undefined}
270
+ folderThumbnails={item.manga?.is_folder ? allMangas.filter(m => m.folder_id === item.id && m.thumbnail_url).slice(0, 4).map(m => m.thumbnail_url!) : undefined}
271
  />
272
  </div>
273
  ))}
src/services/manga.ts CHANGED
@@ -739,7 +739,7 @@ export async function getRecommendations(currentMangaId: string, categoryIds: st
739
  const allMangas = await getAllMangas();
740
 
741
  const recommendations = allMangas
742
- .filter(manga => manga.id !== currentMangaId)
743
  .map(manga => {
744
  let score = 0;
745
 
 
739
  const allMangas = await getAllMangas();
740
 
741
  const recommendations = allMangas
742
+ .filter(manga => manga.id !== currentMangaId && !manga.is_folder)
743
  .map(manga => {
744
  let score = 0;
745