diff --git a/src/app/AppRoutes.tsx b/src/app/AppRoutes.tsx index 0cb73218..48398f16 100644 --- a/src/app/AppRoutes.tsx +++ b/src/app/AppRoutes.tsx @@ -15,12 +15,12 @@ const Artists = lazy(() => import('@/features/artist/pages/Artists')); const ArtistDetail = lazy(() => import('@/features/artist/pages/ArtistDetail')); const Composers = lazy(() => import('../pages/Composers')); const ComposerDetail = lazy(() => import('../pages/ComposerDetail')); -const NewReleases = lazy(() => import('../pages/NewReleases')); +const NewReleases = lazy(() => import('@/features/album/pages/NewReleases')); const Favorites = lazy(() => import('@/features/favorites/pages/Favorites')); const RandomMix = lazy(() => import('../pages/RandomMix')); const RandomLanding = lazy(() => import('../pages/RandomLanding')); const AlbumDetail = lazy(() => import('@/features/album/pages/AlbumDetail')); -const MostPlayed = lazy(() => import('../pages/MostPlayed')); +const MostPlayed = lazy(() => import('@/features/album/pages/MostPlayed')); const LosslessAlbums = lazy(() => import('@/features/album/pages/LosslessAlbums')); const RandomAlbums = lazy(() => import('@/features/album/pages/RandomAlbums')); const LuckyMixPage = lazy(() => import('../pages/LuckyMix')); diff --git a/src/pages/MostPlayed.tsx b/src/features/album/pages/MostPlayed.tsx similarity index 97% rename from src/pages/MostPlayed.tsx rename to src/features/album/pages/MostPlayed.tsx index 3e622d0f..30d155db 100644 --- a/src/pages/MostPlayed.tsx +++ b/src/features/album/pages/MostPlayed.tsx @@ -5,15 +5,15 @@ import { songToTrack } from '@/lib/media/songToTrack'; import React, { useEffect, useState, useCallback } from 'react'; import { useNavigate } from 'react-router-dom'; import { ArrowUpDown, ArrowDown, ArrowUp, TrendingUp, UsersRound, Play, ListPlus } from 'lucide-react'; -import { useAuthStore } from '../store/authStore'; +import { useAuthStore } from '@/store/authStore'; import { usePlayerStore } from '@/features/playback/store/playerStore'; -import { AlbumCoverArtImage } from '../cover/AlbumCoverArtImage'; -import { ArtistCoverArtImage } from '../cover/ArtistCoverArtImage'; +import { AlbumCoverArtImage } from '@/cover/AlbumCoverArtImage'; +import { ArtistCoverArtImage } from '@/cover/ArtistCoverArtImage'; import { playAlbum, playAlbumShuffled } from '@/features/playback/utils/playback/playAlbum'; import { useLongPressAction } from '@/lib/hooks/useLongPressAction'; -import { LongPressWaveOverlay } from '../components/LongPressWaveOverlay'; +import { LongPressWaveOverlay } from '@/components/LongPressWaveOverlay'; import { useTranslation } from 'react-i18next'; -import { albumArtistDisplayName } from '@/features/album'; +import { albumArtistDisplayName } from '@/features/album/utils/deriveAlbumHeaderArtistRefs'; const PAGE_SIZE = 50; diff --git a/src/pages/NewReleases.tsx b/src/features/album/pages/NewReleases.tsx similarity index 89% rename from src/pages/NewReleases.tsx rename to src/features/album/pages/NewReleases.tsx index d345b12c..a823c729 100644 --- a/src/pages/NewReleases.tsx +++ b/src/features/album/pages/NewReleases.tsx @@ -6,39 +6,39 @@ import type { SubsonicAlbum } from '@/lib/api/subsonicTypes'; import { dedupeById } from '@/lib/util/dedupeById'; import { useEffect, useLayoutEffect, useState, useCallback, useRef, useMemo } from 'react'; import { Download, HardDriveDownload } from 'lucide-react'; -import SelectionToggleButton from '../components/SelectionToggleButton'; -import { AlbumCard } from '@/features/album'; -import GenreFilterBar from '../components/GenreFilterBar'; +import SelectionToggleButton from '@/components/SelectionToggleButton'; +import AlbumCard from '@/features/album/components/AlbumCard'; +import GenreFilterBar from '@/components/GenreFilterBar'; import { useTranslation } from 'react-i18next'; import { useLocation, useNavigate } from 'react-router-dom'; -import { useAuthStore } from '../store/authStore'; +import { useAuthStore } from '@/store/authStore'; import { useOfflineStore } from '@/features/offline'; import { useDownloadModalStore } from '@/features/offline'; import { invoke } from '@tauri-apps/api/core'; import { join } from '@tauri-apps/api/path'; -import { showToast } from '../utils/ui/toast'; +import { showToast } from '@/utils/ui/toast'; import { useZipDownloadStore } from '@/features/offline'; import { useRangeSelection } from '@/lib/hooks/useRangeSelection'; -import { usePerfProbeFlags } from '../utils/perf/perfFlags'; -import { useMainstageInpageHeaderTight } from '../hooks/useMainstageInpageHeaderTight'; -import { albumGridWarmCovers } from '../cover/layoutSizes'; -import { VirtualCardGrid } from '../components/VirtualCardGrid'; +import { usePerfProbeFlags } from '@/utils/perf/perfFlags'; +import { useMainstageInpageHeaderTight } from '@/hooks/useMainstageInpageHeaderTight'; +import { albumGridWarmCovers } from '@/cover/layoutSizes'; +import { VirtualCardGrid } from '@/components/VirtualCardGrid'; import OverlayScrollArea from '@/ui/OverlayScrollArea'; -import { NEW_RELEASES_INPAGE_SCROLL_VIEWPORT_ID } from '../constants/appScroll'; -import { useAsyncInpagePagination } from '../hooks/useAsyncInpagePagination'; -import { useInpageScrollSentinel } from '../hooks/useInpageScrollSentinel'; -import { useInpageScrollViewport } from '../hooks/useInpageScrollViewport'; -import InpageScrollSentinel from '../components/InpageScrollSentinel'; -import { useAlbumGridBrowseFilters, type AlbumGridBrowseSnapshot } from '@/features/album'; -import { useAlbumBrowseScrollRestore } from '@/features/album'; -import { useAlbumBrowseScrollReset } from '@/features/album'; -import { useBrowseAlbumTextSearch } from '@/features/album'; -import { useAlbumBrowseScrollSnapshotSync, type AlbumBrowseScrollSnapshot } from '@/features/album'; -import { readAlbumBrowseRestore } from '../utils/navigation/albumDetailNavigation'; -import { albumArtistDisplayName } from '@/features/album'; -import { useLibraryIndexStore } from '../store/libraryIndexStore'; +import { NEW_RELEASES_INPAGE_SCROLL_VIEWPORT_ID } from '@/constants/appScroll'; +import { useAsyncInpagePagination } from '@/hooks/useAsyncInpagePagination'; +import { useInpageScrollSentinel } from '@/hooks/useInpageScrollSentinel'; +import { useInpageScrollViewport } from '@/hooks/useInpageScrollViewport'; +import InpageScrollSentinel from '@/components/InpageScrollSentinel'; +import { useAlbumGridBrowseFilters, type AlbumGridBrowseSnapshot } from '@/features/album/hooks/useAlbumGridBrowseFilters'; +import { useAlbumBrowseScrollRestore } from '@/features/album/hooks/useAlbumBrowseScrollRestore'; +import { useAlbumBrowseScrollReset } from '@/features/album/hooks/useAlbumBrowseScrollReset'; +import { useBrowseAlbumTextSearch } from '@/features/album/hooks/useBrowseAlbumTextSearch'; +import { useAlbumBrowseScrollSnapshotSync, type AlbumBrowseScrollSnapshot } from '@/features/album/hooks/useAlbumBrowseFilters'; +import { readAlbumBrowseRestore } from '@/utils/navigation/albumDetailNavigation'; +import { albumArtistDisplayName } from '@/features/album/utils/deriveAlbumHeaderArtistRefs'; +import { useLibraryIndexStore } from '@/store/libraryIndexStore'; import { filterAlbumsByGenres } from '@/lib/library/albumBrowseFilters'; -import { useScopedBrowseSearchQuery } from '../store/liveSearchScopeStore'; +import { useScopedBrowseSearchQuery } from '@/store/liveSearchScopeStore'; const PAGE_SIZE = 30;