Spaces:
Sleeping
Sleeping
Upload 107 files
Browse files- src/App.tsx +4 -0
- src/components/MangaCard.tsx +3 -2
- src/components/SearchResults.tsx +3 -0
- src/components/SettingsModal.tsx +27 -0
src/App.tsx
CHANGED
|
@@ -48,6 +48,7 @@ function App() {
|
|
| 48 |
const [showTitleManagerModal, setShowTitleManagerModal] = useState(false);
|
| 49 |
const [showFolderMapModal, setShowFolderMapModal] = useState(false);
|
| 50 |
const [showKemonoCleanConfirm, setShowKemonoCleanConfirm] = useState(false);
|
|
|
|
| 51 |
const [isCategoryMinusEnabled, setIsCategoryMinusEnabled] = useState(false);
|
| 52 |
const [isEditTitlePlusEnabled, setIsEditTitlePlusEnabled] = useState(false);
|
| 53 |
const [isEtiquetadoraEnabled, setIsEtiquetadoraEnabled] = useState(false);
|
|
@@ -752,6 +753,7 @@ function App() {
|
|
| 752 |
selectedMangaIds={selectedMangaIds}
|
| 753 |
onToggleSelectManga={toggleSelectManga}
|
| 754 |
allMangas={mangas}
|
|
|
|
| 755 |
/>
|
| 756 |
</>
|
| 757 |
)}
|
|
@@ -980,6 +982,8 @@ function App() {
|
|
| 980 |
onEtiquetadoraChange={setIsEtiquetadoraEnabled}
|
| 981 |
isFolderPlusEnabled={isFolderPlusEnabled}
|
| 982 |
onFolderPlusChange={setIsFolderPlusEnabled}
|
|
|
|
|
|
|
| 983 |
onOpenTitleManager={() => setShowTitleManagerModal(true)}
|
| 984 |
onOpenFolderMap={() => setShowFolderMapModal(true)}
|
| 985 |
onCleanKemonoTitles={() => setShowKemonoCleanConfirm(true)}
|
|
|
|
| 48 |
const [showTitleManagerModal, setShowTitleManagerModal] = useState(false);
|
| 49 |
const [showFolderMapModal, setShowFolderMapModal] = useState(false);
|
| 50 |
const [showKemonoCleanConfirm, setShowKemonoCleanConfirm] = useState(false);
|
| 51 |
+
const [isFolderAnimationEnabled, setIsFolderAnimationEnabled] = useState(true);
|
| 52 |
const [isCategoryMinusEnabled, setIsCategoryMinusEnabled] = useState(false);
|
| 53 |
const [isEditTitlePlusEnabled, setIsEditTitlePlusEnabled] = useState(false);
|
| 54 |
const [isEtiquetadoraEnabled, setIsEtiquetadoraEnabled] = useState(false);
|
|
|
|
| 753 |
selectedMangaIds={selectedMangaIds}
|
| 754 |
onToggleSelectManga={toggleSelectManga}
|
| 755 |
allMangas={mangas}
|
| 756 |
+
isFolderAnimationEnabled={isFolderAnimationEnabled}
|
| 757 |
/>
|
| 758 |
</>
|
| 759 |
)}
|
|
|
|
| 982 |
onEtiquetadoraChange={setIsEtiquetadoraEnabled}
|
| 983 |
isFolderPlusEnabled={isFolderPlusEnabled}
|
| 984 |
onFolderPlusChange={setIsFolderPlusEnabled}
|
| 985 |
+
isFolderAnimationEnabled={isFolderAnimationEnabled}
|
| 986 |
+
onFolderAnimationChange={setIsFolderAnimationEnabled}
|
| 987 |
onOpenTitleManager={() => setShowTitleManagerModal(true)}
|
| 988 |
onOpenFolderMap={() => setShowFolderMapModal(true)}
|
| 989 |
onCleanKemonoTitles={() => setShowKemonoCleanConfirm(true)}
|
src/components/MangaCard.tsx
CHANGED
|
@@ -28,9 +28,10 @@ interface MangaCardProps {
|
|
| 28 |
folderItemCount?: number;
|
| 29 |
folderThumbnails?: string[];
|
| 30 |
hasSubfolders?: boolean;
|
|
|
|
| 31 |
}
|
| 32 |
|
| 33 |
-
export function MangaCard({ id, title, author, pageCount, thumbnail, manga, onSelect, onEdit, onDelete, isCategoryPlusEnabled, isSelected, onMouseDown, onMouseEnter, folderItemCount, folderThumbnails, hasSubfolders }: MangaCardProps) {
|
| 34 |
const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
|
| 35 |
const [currentThumbIndex, setCurrentThumbIndex] = useState(0);
|
| 36 |
const thumbnailUrl = thumbnail ? getThumbnailUrl(thumbnail) : undefined;
|
|
@@ -43,7 +44,7 @@ export function MangaCard({ id, title, author, pageCount, thumbnail, manga, onSe
|
|
| 43 |
useEffect(() => {
|
| 44 |
let interval: NodeJS.Timeout;
|
| 45 |
|
| 46 |
-
if (!isHovered) {
|
| 47 |
if (manga?.is_folder && folderThumbnails && folderThumbnails.length > 2) {
|
| 48 |
setIsZoomedIn(true);
|
| 49 |
}
|
|
|
|
| 28 |
folderItemCount?: number;
|
| 29 |
folderThumbnails?: string[];
|
| 30 |
hasSubfolders?: boolean;
|
| 31 |
+
isFolderAnimationEnabled?: boolean;
|
| 32 |
}
|
| 33 |
|
| 34 |
+
export function MangaCard({ id, title, author, pageCount, thumbnail, manga, onSelect, onEdit, onDelete, isCategoryPlusEnabled, isSelected, onMouseDown, onMouseEnter, folderItemCount, folderThumbnails, hasSubfolders, isFolderAnimationEnabled = true }: MangaCardProps) {
|
| 35 |
const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
|
| 36 |
const [currentThumbIndex, setCurrentThumbIndex] = useState(0);
|
| 37 |
const thumbnailUrl = thumbnail ? getThumbnailUrl(thumbnail) : undefined;
|
|
|
|
| 44 |
useEffect(() => {
|
| 45 |
let interval: NodeJS.Timeout;
|
| 46 |
|
| 47 |
+
if (!isHovered || !isFolderAnimationEnabled) {
|
| 48 |
if (manga?.is_folder && folderThumbnails && folderThumbnails.length > 2) {
|
| 49 |
setIsZoomedIn(true);
|
| 50 |
}
|
src/components/SearchResults.tsx
CHANGED
|
@@ -26,6 +26,7 @@ interface SearchResultsProps {
|
|
| 26 |
selectedMangaIds?: string[];
|
| 27 |
onToggleSelectManga?: (id: string) => void;
|
| 28 |
allMangas?: Manga[];
|
|
|
|
| 29 |
}
|
| 30 |
|
| 31 |
const ITEMS_PER_PAGE = 24;
|
|
@@ -120,6 +121,7 @@ export function SearchResults({
|
|
| 120 |
selectedMangaIds = [],
|
| 121 |
onToggleSelectManga,
|
| 122 |
allMangas = [],
|
|
|
|
| 123 |
}: SearchResultsProps) {
|
| 124 |
const [dragState, setDragState] = useState<{ isDragging: boolean, action: 'select' | 'deselect' | null }>({ isDragging: false, action: null });
|
| 125 |
|
|
@@ -347,6 +349,7 @@ export function SearchResults({
|
|
| 347 |
folderItemCount={item.manga?.is_folder ? allMangas.filter(m => m.folder_id === item.id).length : undefined}
|
| 348 |
folderThumbnails={item.manga?.is_folder ? getFolderThumbnails(item.id, allMangas) : undefined}
|
| 349 |
hasSubfolders={item.manga?.is_folder ? allMangas.some(m => m.folder_id === item.id && m.is_folder) : false}
|
|
|
|
| 350 |
/>
|
| 351 |
</div>
|
| 352 |
))}
|
|
|
|
| 26 |
selectedMangaIds?: string[];
|
| 27 |
onToggleSelectManga?: (id: string) => void;
|
| 28 |
allMangas?: Manga[];
|
| 29 |
+
isFolderAnimationEnabled?: boolean;
|
| 30 |
}
|
| 31 |
|
| 32 |
const ITEMS_PER_PAGE = 24;
|
|
|
|
| 121 |
selectedMangaIds = [],
|
| 122 |
onToggleSelectManga,
|
| 123 |
allMangas = [],
|
| 124 |
+
isFolderAnimationEnabled = true,
|
| 125 |
}: SearchResultsProps) {
|
| 126 |
const [dragState, setDragState] = useState<{ isDragging: boolean, action: 'select' | 'deselect' | null }>({ isDragging: false, action: null });
|
| 127 |
|
|
|
|
| 349 |
folderItemCount={item.manga?.is_folder ? allMangas.filter(m => m.folder_id === item.id).length : undefined}
|
| 350 |
folderThumbnails={item.manga?.is_folder ? getFolderThumbnails(item.id, allMangas) : undefined}
|
| 351 |
hasSubfolders={item.manga?.is_folder ? allMangas.some(m => m.folder_id === item.id && m.is_folder) : false}
|
| 352 |
+
isFolderAnimationEnabled={isFolderAnimationEnabled}
|
| 353 |
/>
|
| 354 |
</div>
|
| 355 |
))}
|
src/components/SettingsModal.tsx
CHANGED
|
@@ -24,6 +24,8 @@ interface SettingsModalProps {
|
|
| 24 |
onEtiquetadoraChange: (enabled: boolean) => void;
|
| 25 |
isFolderPlusEnabled: boolean;
|
| 26 |
onFolderPlusChange: (enabled: boolean) => void;
|
|
|
|
|
|
|
| 27 |
onOpenTitleManager: () => void;
|
| 28 |
onOpenFolderMap: () => void;
|
| 29 |
onCleanKemonoTitles: () => void;
|
|
@@ -48,6 +50,8 @@ export function SettingsModal({
|
|
| 48 |
onEtiquetadoraChange,
|
| 49 |
isFolderPlusEnabled,
|
| 50 |
onFolderPlusChange,
|
|
|
|
|
|
|
| 51 |
onOpenTitleManager,
|
| 52 |
onOpenFolderMap,
|
| 53 |
onCleanKemonoTitles
|
|
@@ -365,6 +369,29 @@ export function SettingsModal({
|
|
| 365 |
</button>
|
| 366 |
</section>
|
| 367 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 368 |
<section className="space-y-4 pt-4 border-t border-gray-800">
|
| 369 |
<div className="flex items-center gap-3 mb-2">
|
| 370 |
<div className="p-2 bg-indigo-500/10 rounded-lg text-indigo-400">
|
|
|
|
| 24 |
onEtiquetadoraChange: (enabled: boolean) => void;
|
| 25 |
isFolderPlusEnabled: boolean;
|
| 26 |
onFolderPlusChange: (enabled: boolean) => void;
|
| 27 |
+
isFolderAnimationEnabled: boolean;
|
| 28 |
+
onFolderAnimationChange: (enabled: boolean) => void;
|
| 29 |
onOpenTitleManager: () => void;
|
| 30 |
onOpenFolderMap: () => void;
|
| 31 |
onCleanKemonoTitles: () => void;
|
|
|
|
| 50 |
onEtiquetadoraChange,
|
| 51 |
isFolderPlusEnabled,
|
| 52 |
onFolderPlusChange,
|
| 53 |
+
isFolderAnimationEnabled,
|
| 54 |
+
onFolderAnimationChange,
|
| 55 |
onOpenTitleManager,
|
| 56 |
onOpenFolderMap,
|
| 57 |
onCleanKemonoTitles
|
|
|
|
| 369 |
</button>
|
| 370 |
</section>
|
| 371 |
|
| 372 |
+
<section className="space-y-4 pt-4 border-t border-gray-800">
|
| 373 |
+
<div className="flex items-center justify-between">
|
| 374 |
+
<div className="flex items-center gap-3">
|
| 375 |
+
<div className="p-2 bg-pink-500/10 rounded-lg text-pink-500">
|
| 376 |
+
<Eye className="w-5 h-5" />
|
| 377 |
+
</div>
|
| 378 |
+
<div>
|
| 379 |
+
<h3 className="text-sm font-semibold text-white">Animación de Portadas</h3>
|
| 380 |
+
<p className="text-xs text-gray-400">Activar carrusel animado al pasar el mouse sobre las carpetas</p>
|
| 381 |
+
</div>
|
| 382 |
+
</div>
|
| 383 |
+
<label className="relative inline-flex items-center cursor-pointer">
|
| 384 |
+
<input
|
| 385 |
+
type="checkbox"
|
| 386 |
+
className="sr-only peer"
|
| 387 |
+
checked={isFolderAnimationEnabled}
|
| 388 |
+
onChange={(e) => onFolderAnimationChange(e.target.checked)}
|
| 389 |
+
/>
|
| 390 |
+
<div className="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-pink-500"></div>
|
| 391 |
+
</label>
|
| 392 |
+
</div>
|
| 393 |
+
</section>
|
| 394 |
+
|
| 395 |
<section className="space-y-4 pt-4 border-t border-gray-800">
|
| 396 |
<div className="flex items-center gap-3 mb-2">
|
| 397 |
<div className="p-2 bg-indigo-500/10 rounded-lg text-indigo-400">
|