mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 15:25:46 +00:00
refactor(lib): fold utils/perf into lib/perf + utils/ui (DOM utilities) into lib/dom
This commit is contained in:
@@ -66,7 +66,7 @@ import { useFontStore } from '../store/fontStore';
|
||||
import { useEqStore } from '../store/eqStore';
|
||||
import { usePlaybackRateStore } from '@/features/playback/store/playbackRateStore';
|
||||
import { usePlaybackRateOrbitSync } from '@/features/orbit';
|
||||
import { usePerfProbeFlags } from '../utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import {
|
||||
persistSidebarCollapsed,
|
||||
readInitialSidebarCollapsed,
|
||||
|
||||
@@ -9,7 +9,7 @@ import { usePlayQueueSyncLedState } from '@/app/hooks/usePlayQueueSyncLedState';
|
||||
import type { ServerProfile } from '@/store/authStoreTypes';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { switchActiveServer } from '@/utils/server/switchActiveServer';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { serverListDisplayLabel } from '@/utils/server/serverDisplayName';
|
||||
|
||||
interface Props {
|
||||
|
||||
+11
-11
@@ -5,34 +5,34 @@ import { coverGetPipelineQueueStats, type CoverPipelineQueueStatsDto } from '@/a
|
||||
import { coverEnsureQueueStats } from '@/cover/ensureQueue';
|
||||
import { coverPeekQueueStats } from '@/cover/peekQueue';
|
||||
import PerfOverlaySparkline from '@/app/PerfOverlaySparkline';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import {
|
||||
formatPerfMs,
|
||||
getAnalysisTracksPerMinute,
|
||||
useAnalysisPerfLast,
|
||||
} from '@/utils/perf/analysisPerfStore';
|
||||
import { formatAnalysisPipelineQueueOverlay } from '@/utils/perf/formatAnalysisQueueStats';
|
||||
import { formatCoverPipelineQueueOverlay } from '@/utils/perf/formatCoverPipelineQueueOverlay';
|
||||
} from '@/lib/perf/analysisPerfStore';
|
||||
import { formatAnalysisPipelineQueueOverlay } from '@/lib/perf/formatAnalysisQueueStats';
|
||||
import { formatCoverPipelineQueueOverlay } from '@/lib/perf/formatCoverPipelineQueueOverlay';
|
||||
import {
|
||||
buildLiveOverlayItems,
|
||||
type LiveOverlayItem,
|
||||
} from '@/utils/perf/formatLiveOverlayItems';
|
||||
} from '@/lib/perf/formatLiveOverlayItems';
|
||||
import {
|
||||
getPerfLiveHistorySamples,
|
||||
} from '@/utils/perf/perfLiveHistory';
|
||||
import { usePerfLiveSnapshot } from '@/utils/perf/perfLiveStore';
|
||||
import { usePerfLiveOverlayPins } from '@/utils/perf/perfOverlayPins';
|
||||
} from '@/lib/perf/perfLiveHistory';
|
||||
import { usePerfLiveSnapshot } from '@/lib/perf/perfLiveStore';
|
||||
import { usePerfLiveOverlayPins } from '@/lib/perf/perfOverlayPins';
|
||||
import {
|
||||
perfOverlayCornerClass,
|
||||
usePerfOverlayAppearance,
|
||||
} from '@/utils/perf/perfOverlayAppearance';
|
||||
} from '@/lib/perf/perfOverlayAppearance';
|
||||
import {
|
||||
resolveOverlayVisibility,
|
||||
usePerfOverlayMode,
|
||||
} from '@/utils/perf/perfOverlayMode';
|
||||
} from '@/lib/perf/perfOverlayMode';
|
||||
import { useAnalysisPerfListener } from '@/hooks/useAnalysisPerfListener';
|
||||
import { useCoverPerfListener } from '@/cover/useCoverPerfListener';
|
||||
import { getCoverCachedPerMinute, getCoverUiPerMinute } from '@/utils/perf/coverPerfStore';
|
||||
import { getCoverCachedPerMinute, getCoverUiPerMinute } from '@/lib/perf/coverPerfStore';
|
||||
|
||||
const SAMPLE_MS = 500;
|
||||
const TPM_REFRESH_MS = 500;
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import '@/features/playback/store/playbackEngineBridgeRegister'; // installs the
|
||||
import { lazy, Suspense, useEffect, useState } from 'react';
|
||||
import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import { showToast } from '../utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { WindowVisibilityProvider } from '@/lib/hooks/useWindowVisibility';
|
||||
import { DragDropProvider } from '@/lib/dnd/DragDropContext';
|
||||
import PasteClipboardHandler from '../components/PasteClipboardHandler';
|
||||
|
||||
@@ -22,7 +22,7 @@ vi.mock('../store/fontStore', () => ({
|
||||
vi.mock('../store/keybindingsStore', () => ({
|
||||
useKeybindingsStore: { persist: { rehydrate: keybindingsRehydrate } },
|
||||
}));
|
||||
vi.mock('../utils/perf/perfFlags', () => ({
|
||||
vi.mock('@/lib/perf/perfFlags', () => ({
|
||||
usePerfProbeFlags: () => ({ disableTooltipPortal: true }),
|
||||
}));
|
||||
vi.mock('@/lib/i18n', () => ({
|
||||
|
||||
@@ -7,7 +7,7 @@ import FpsOverlay from '@/app/FpsOverlay';
|
||||
import { useThemeStore } from '../store/themeStore';
|
||||
import { useFontStore } from '../store/fontStore';
|
||||
import { useKeybindingsStore } from '../store/keybindingsStore';
|
||||
import { usePerfProbeFlags } from '../utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import i18n from '@/lib/i18n';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useMemo, useRef } from 'react';
|
||||
import type { PerfLiveSample } from '@/utils/perf/perfLiveHistory';
|
||||
import { PERF_LIVE_HISTORY_MS } from '@/utils/perf/perfLiveHistory';
|
||||
import type { PerfLiveSample } from '@/lib/perf/perfLiveHistory';
|
||||
import { PERF_LIVE_HISTORY_MS } from '@/lib/perf/perfLiveHistory';
|
||||
|
||||
type SparklineKind = 'cpu' | 'memory';
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
subscribeIdleQueuePullSuspended,
|
||||
} from '@/features/playback/store/queuePlaybackIdle';
|
||||
import { clearQueueHandoffPending, isQueueHandoffPending } from '@/features/playback/store/queueSyncUiState';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
export function usePlayQueueSyncLedState(status: ConnectionStatus) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -8,7 +8,7 @@ import { search as subsonicSearch } from '@/lib/api/subsonicSearch';
|
||||
import { filterSongsForLuckyMixRatings, getMixMinRatingsConfigFromAuth } from '@/utils/mix/mixRatingFilter';
|
||||
import { shuffleArray } from '@/lib/util/shuffleArray';
|
||||
import { songToTrack } from '@/lib/media/songToTrack';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { switchActiveServer } from '@/utils/server/switchActiveServer';
|
||||
import i18n from '@/lib/i18n';
|
||||
import { usePlayerStore } from '@/features/playback/store/playerStore';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { decodeSharePayloadFromText } from '../utils/share/shareLink';
|
||||
import { decodeServerMagicStringFromText } from '../utils/server/serverMagicString';
|
||||
import { applySharePastePayload, applySharePasteQueue } from '../utils/share/applySharePaste';
|
||||
import { shareQueueServerContext } from '../utils/share/shareServerOriginLabel';
|
||||
import { showToast } from '../utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { useShareQueuePreview } from '@/features/search';
|
||||
import { ShareQueuePreviewModal } from '@/features/search';
|
||||
import {
|
||||
|
||||
@@ -11,7 +11,7 @@ import { useAuthStore } from '../store/authStore';
|
||||
import { useLibraryIndexStore } from '../store/libraryIndexStore';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { copyTextToClipboard } from '../utils/server/serverMagicString';
|
||||
import { showToast } from '../utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { formatTrackTime } from '@/lib/format/formatDuration';
|
||||
import { formatLastSeen } from '../utils/componentHelpers/userMgmtHelpers';
|
||||
import { libraryIsReady } from '@/lib/library/libraryReady';
|
||||
|
||||
@@ -7,7 +7,7 @@ import i18n from '@/lib/i18n';
|
||||
import { usePlayerStore } from '@/features/playback/store/playerStore';
|
||||
import { usePreviewStore } from '@/features/playback/store/previewStore';
|
||||
import { useLyricsStore } from '../store/lyricsStore';
|
||||
import { showToast } from '../utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import type { ActionContext, ShortcutSlot, ShortcutActionMeta } from '@/config/shortcutTypes';
|
||||
|
||||
let cliPremuteVolume: number | null = null;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { queueSongRating } from '@/features/playback/store/pendingStarSync';
|
||||
import i18n from '@/lib/i18n';
|
||||
import { usePlayerStore } from '@/features/playback/store/playerStore';
|
||||
import { showToast } from '../utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { playByOpaqueId } from '@/features/playback/utils/playback/playByOpaqueId';
|
||||
import type { ActionContext, CliContext } from '@/config/shortcutTypes';
|
||||
import {
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { ImgHTMLAttributes } from 'react';
|
||||
import type React from 'react';
|
||||
import { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
||||
import { DEFAULT_CACHED_IMAGE_PREPARE_MARGIN } from '@/ui/CachedImage';
|
||||
import { resolveIntersectionScrollRoot } from '../utils/ui/resolveIntersectionScrollRoot';
|
||||
import { resolveIntersectionScrollRoot } from '@/lib/dom/resolveIntersectionScrollRoot';
|
||||
import { coverEnsureQueued, coverEnsureReprioritize } from './ensureQueue';
|
||||
import { coverPrefetchBumpPriority } from './prefetchRegistry';
|
||||
import { coverServerReachable } from './reachability';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useEffect } from 'react';
|
||||
import { listen } from '@tauri-apps/api/event';
|
||||
import { coverGetPipelineQueueStats } from '@/api/coverCache';
|
||||
import { recordCoverProgress, recordCoverUiTotal } from '@/utils/perf/coverPerfStore';
|
||||
import { recordCoverProgress, recordCoverUiTotal } from '@/lib/perf/coverPerfStore';
|
||||
|
||||
/** How often to sample the backend's cumulative on-demand (UI) ensure count. */
|
||||
const UI_POLL_MS = 1000;
|
||||
|
||||
@@ -12,7 +12,7 @@ import { useAlbumDetailBack } from '@/features/album/hooks/useAlbumDetailBack';
|
||||
import { useThemeStore } from '@/store/themeStore';
|
||||
import StarRating from '@/ui/StarRating';
|
||||
import { copyEntityShareLink } from '@/utils/share/copyEntityShareLink';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { isAlbumRecentlyAdded } from '@/features/album/utils/albumRecency';
|
||||
import { formatLongDuration } from '@/lib/format/formatDuration';
|
||||
import { formatMb } from '@/lib/format/formatBytes';
|
||||
|
||||
@@ -4,7 +4,7 @@ import AlbumCard from '@/features/album/components/AlbumCard';
|
||||
import { ChevronLeft, ChevronRight, ArrowRight } from 'lucide-react';
|
||||
import { NavLink, useNavigate } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { dedupeById } from '@/lib/util/dedupeById';
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -35,11 +35,11 @@ import {
|
||||
} from '@/cover/ref';
|
||||
import { useAlbumCoverRef } from '@/cover/useLibraryCoverRef';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { useSelectionStore } from '@/store/selectionStore';
|
||||
import { sanitizeFilename } from '@/features/album/utils/albumDetailHelpers';
|
||||
import { albumArtistDisplayName, deriveAlbumHeaderArtistRefs } from '@/features/album/utils/deriveAlbumHeaderArtistRefs';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { albumGridWarmCovers } from '@/cover/layoutSizes';
|
||||
import { VirtualCardGrid } from '@/ui/VirtualCardGrid';
|
||||
import LosslessModeBanner from '@/ui/LosslessModeBanner';
|
||||
|
||||
@@ -20,12 +20,12 @@ import { useDownloadModalStore } from '@/features/offline';
|
||||
import { usePlayerStore } from '@/features/playback/store/playerStore';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import { join } from '@tauri-apps/api/path';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { useZipDownloadStore } from '@/features/offline';
|
||||
import { Download, HardDriveDownload, Disc3, ListPlus } from 'lucide-react';
|
||||
import SelectionToggleButton from '@/ui/SelectionToggleButton';
|
||||
import FilterQuickClear from '@/ui/FilterQuickClear';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { useRangeSelection } from '@/lib/hooks/useRangeSelection';
|
||||
import { useMainstageInpageHeaderTight } from '@/lib/hooks/useMainstageInpageHeaderTight';
|
||||
import { useInpageScrollViewport } from '@/lib/hooks/useInpageScrollViewport';
|
||||
|
||||
@@ -6,7 +6,7 @@ import { ChevronLeft } from 'lucide-react';
|
||||
import AlbumCard from '@/features/album/components/AlbumCard';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { albumGridWarmCovers } from '@/cover/layoutSizes';
|
||||
import { VirtualCardGrid } from '@/ui/VirtualCardGrid';
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ import { usePlayerStore } from '@/features/playback/store/playerStore';
|
||||
import { useZipDownloadStore } from '@/features/offline';
|
||||
import { useRangeSelection } from '@/lib/hooks/useRangeSelection';
|
||||
import { useMainstageInpageHeaderTight } from '@/lib/hooks/useMainstageInpageHeaderTight';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import { join } from '@tauri-apps/api/path';
|
||||
import { Download, HardDriveDownload, ListPlus } from 'lucide-react';
|
||||
|
||||
@@ -16,10 +16,10 @@ 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 '@/lib/dom/toast';
|
||||
import { useZipDownloadStore } from '@/features/offline';
|
||||
import { useRangeSelection } from '@/lib/hooks/useRangeSelection';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { useMainstageInpageHeaderTight } from '@/lib/hooks/useMainstageInpageHeaderTight';
|
||||
import { albumGridWarmCovers } from '@/cover/layoutSizes';
|
||||
import { VirtualCardGrid } from '@/ui/VirtualCardGrid';
|
||||
|
||||
@@ -20,10 +20,10 @@ 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 '@/lib/dom/toast';
|
||||
import { useZipDownloadStore } from '@/features/offline';
|
||||
import { useRangeSelection } from '@/lib/hooks/useRangeSelection';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { albumGridWarmCovers, COVER_DENSE_GRID_MIN_CELL_CSS_PX } from '@/cover/layoutSizes';
|
||||
import {
|
||||
primeAlbumCoversForDisplay,
|
||||
|
||||
@@ -30,7 +30,7 @@ import ArtistDetailTopTracks from '@/features/artist/components/ArtistDetailTopT
|
||||
import ArtistDetailSimilarArtists from '@/features/artist/components/ArtistDetailSimilarArtists';
|
||||
import { ArtistCard } from '@/features/nowPlaying';
|
||||
import LosslessModeBanner from '@/ui/LosslessModeBanner';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { albumGridWarmCovers, COVER_DENSE_GRID_MIN_CELL_CSS_PX, GRID_COVER_WARM_LIMIT } from '@/cover/layoutSizes';
|
||||
import { artistDetailCoverWarmAlbums } from '@/features/artist/components/topSongAlbumForCover';
|
||||
import { useLibraryCoverPrefetch } from '@/cover/useLibraryCoverPrefetch';
|
||||
|
||||
@@ -11,7 +11,7 @@ import { useVirtualizer } from '@tanstack/react-virtual';
|
||||
import { APP_MAIN_SCROLL_VIEWPORT_ID, ARTISTS_INPAGE_SCROLL_VIEWPORT_ID } from '@/constants/appScroll';
|
||||
import { useElementClientHeightById, useElementClientHeightForElement } from '@/lib/hooks/useResizeClientHeight';
|
||||
import { useVirtualizerScrollMargin } from '@/lib/hooks/useVirtualizerScrollMargin';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import {
|
||||
ALL_SENTINEL,
|
||||
ALPHABET,
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { SubsonicArtist } from '@/lib/api/subsonicTypes';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { copyEntityShareLink } from '@/utils/share/copyEntityShareLink';
|
||||
import { invalidateCoverArt } from '@/utils/imageCache';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
export interface RunArtistEntityRatingDeps {
|
||||
artist: SubsonicArtist | null;
|
||||
|
||||
@@ -15,9 +15,9 @@ import { usePlayerStore } from '@/features/playback/store/playerStore';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { copyEntityShareLink } from '@/utils/share/copyEntityShareLink';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { sanitizeHtml } from '@/lib/util/sanitizeHtml';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { albumGridWarmCovers } from '@/cover/layoutSizes';
|
||||
import { VirtualCardGrid } from '@/ui/VirtualCardGrid';
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import { readComposerBrowseRestore } from '@/utils/navigation/albumDetailNavigat
|
||||
import { filterArtistsWithRoleAlbumCredits } from '@/lib/library/composerBrowse';
|
||||
import { ALL_SENTINEL, artistLetterBucket } from '@/features/artist';
|
||||
import { useLibraryIgnoredArticles } from '@/lib/library/hooks/useLibraryIgnoredArticles';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { VirtualCardGrid } from '@/ui/VirtualCardGrid';
|
||||
import OverlayScrollArea from '@/ui/OverlayScrollArea';
|
||||
import { useVirtualizerScrollMargin } from '@/lib/hooks/useVirtualizerScrollMargin';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ListMusic, Plus } from 'lucide-react';
|
||||
import { getPlaylist, updatePlaylist } from '@/lib/api/subsonicPlaylists';
|
||||
import type { SubsonicPlaylist } from '@/lib/api/subsonicTypes';
|
||||
import { usePlaylistStore } from '@/features/playlist';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import {
|
||||
confirmAddAllDuplicates,
|
||||
isSmartPlaylistName,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ListMusic, Plus } from 'lucide-react';
|
||||
import { resolveAlbum, resolveMediaServerId, resolvePlaylist } from '@/features/offline';
|
||||
import type { SubsonicPlaylist } from '@/lib/api/subsonicTypes';
|
||||
import { usePlaylistStore } from '@/features/playlist';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import {
|
||||
confirmAddAllDuplicates,
|
||||
isSmartPlaylistName,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { resolveAlbum, resolveArtist, resolveMediaServerId, resolvePlaylist } fr
|
||||
import { getPlaylists } from '@/lib/api/subsonicPlaylists';
|
||||
import type { SubsonicPlaylist } from '@/lib/api/subsonicTypes';
|
||||
import { usePlaylistStore } from '@/features/playlist';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import {
|
||||
confirmAddAllDuplicates,
|
||||
isSmartPlaylistName,
|
||||
|
||||
@@ -64,7 +64,7 @@ export default function PlaylistContextItems(props: ContextMenuItemsProps) {
|
||||
<>
|
||||
<div className="context-menu-divider" />
|
||||
<div className="context-menu-item" style={{ color: 'var(--danger)' }} onClick={() => handleAction(async () => {
|
||||
const { showToast } = await import('@/utils/ui/toast');
|
||||
const { showToast } = await import('@/lib/dom/toast');
|
||||
const { deletePlaylist } = await import('@/lib/api/subsonicPlaylists');
|
||||
const { removeId } = usePlaylistStore.getState();
|
||||
try {
|
||||
@@ -112,7 +112,7 @@ export default function PlaylistContextItems(props: ContextMenuItemsProps) {
|
||||
)}
|
||||
{offlinePolicy.canEditPlaylist && (
|
||||
<div className="context-menu-item" style={{ color: 'var(--danger)' }} onClick={() => handleAction(async () => {
|
||||
const { showToast } = await import('@/utils/ui/toast');
|
||||
const { showToast } = await import('@/lib/dom/toast');
|
||||
const { deletePlaylist } = await import('@/lib/api/subsonicPlaylists');
|
||||
const { removeId } = usePlaylistStore.getState();
|
||||
const deletedIds: string[] = [];
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from 're
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ListMusic, Plus } from 'lucide-react';
|
||||
import { usePlaylistStore } from '@/features/playlist';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { isSmartPlaylistName } from '@/utils/componentHelpers/contextMenuHelpers';
|
||||
|
||||
interface SingleProps {
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { Track } from '@/lib/media/trackTypes';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { usePlaylistStore } from '@/features/playlist';
|
||||
import { songToTrack } from '@/lib/media/songToTrack';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { suggestOrbitTrack, hostEnqueueToOrbit, evaluateOrbitSuggestGate, OrbitSuggestBlockedError } from '@/features/orbit';
|
||||
import { renderPresetIcon } from '@/music-network';
|
||||
import StarRating from '@/ui/StarRating';
|
||||
@@ -179,7 +179,7 @@ export default function SongContextItems(props: ContextMenuItemsProps) {
|
||||
{offlinePolicy.canEditPlaylist && playlistId && playlistSongIndex !== undefined && (
|
||||
<div className="context-menu-item" style={{ color: 'var(--danger)' }} onClick={() => handleAction(async () => {
|
||||
const { updatePlaylist } = await import('@/lib/api/subsonicPlaylists');
|
||||
const { showToast } = await import('@/utils/ui/toast');
|
||||
const { showToast } = await import('@/lib/dom/toast');
|
||||
const touchPlaylist = usePlaylistStore.getState().touchPlaylist;
|
||||
try {
|
||||
const serverId = resolveMediaServerId();
|
||||
|
||||
@@ -4,7 +4,7 @@ import { queueSongRating } from '@/features/playback/store/pendingStarSync';
|
||||
import type { SubsonicAlbum, SubsonicArtist } from '@/lib/api/subsonicTypes';
|
||||
import type { Track } from '@/lib/media/trackTypes';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
type RatingKind = 'song' | 'album' | 'artist';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef } from 'react';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import type { TFunction } from 'i18next';
|
||||
import { useDeviceSyncStore, type DeviceSyncSource } from '@/features/deviceSync/store/deviceSyncStore';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
export interface DeviceSyncDeviceScanResult {
|
||||
scanDevice: () => Promise<void>;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { listen } from '@tauri-apps/api/event';
|
||||
import type { TFunction } from 'i18next';
|
||||
import { useDeviceSyncJobStore } from '@/features/deviceSync/store/deviceSyncJobStore';
|
||||
import { useDeviceSyncStore } from '@/features/deviceSync/store/deviceSyncStore';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { trackToSyncInfo } from '@/features/deviceSync/utils/deviceSyncHelpers';
|
||||
import { fetchTracksForSource } from '@/features/playback/utils/playback/fetchTracksForSource';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { invoke } from '@tauri-apps/api/core';
|
||||
import { open as openDialog } from '@tauri-apps/plugin-dialog';
|
||||
import type { TFunction } from 'i18next';
|
||||
import { useDeviceSyncStore, type DeviceSyncSource } from '@/features/deviceSync/store/deviceSyncStore';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
export interface RunDeviceSyncChooseFolderDeps {
|
||||
t: TFunction;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { buildDownloadUrl } from '@/lib/api/subsonicStreamUrl';
|
||||
import type { SubsonicSong } from '@/lib/api/subsonicTypes';
|
||||
import { useDeviceSyncStore, type DeviceSyncSource } from '@/features/deviceSync/store/deviceSyncStore';
|
||||
import { useDeviceSyncJobStore } from '@/features/deviceSync/store/deviceSyncJobStore';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { trackToSyncInfo, uuid } from '@/features/deviceSync/utils/deviceSyncHelpers';
|
||||
import { fetchTracksForSource } from '@/features/playback/utils/playback/fetchTracksForSource';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useWordLyricsSync } from '@/features/lyrics';
|
||||
import { getPlaybackProgressSnapshot, subscribePlaybackProgress } from '@/features/playback/store/playbackProgress';
|
||||
import type { LrcLine } from '@/features/lyrics';
|
||||
import type { Track } from '@/lib/media/trackTypes';
|
||||
import { EaseScroller, targetForFraction } from '@/utils/ui/easeScroll';
|
||||
import { EaseScroller, targetForFraction } from '@/lib/dom/easeScroll';
|
||||
|
||||
// Fullscreen synced lyrics.
|
||||
// Full-screen scrollable list. The active line auto-scrolls following the
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
readAlbumBrowseRestore,
|
||||
readAlbumDetailReturnTo,
|
||||
} from '@/utils/navigation/albumDetailNavigation';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { runBulkEnqueue, runBulkPlayAll, runBulkShuffle } from '@/features/playback/utils/playback/runBulkPlay';
|
||||
|
||||
export default function GenreDetail() {
|
||||
|
||||
@@ -18,7 +18,7 @@ import { useWindowVisibility } from '@/lib/hooks/useWindowVisibility';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { useThemeStore } from '@/store/themeStore';
|
||||
import { filterAlbumsByMixRatings, getMixMinRatingsConfigFromAuth } from '@/utils/mix/mixRatingFilter';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { playAlbum, playAlbumShuffled } from '@/features/playback/utils/playback/playAlbum';
|
||||
import { useLongPressAction } from '@/lib/hooks/useLongPressAction';
|
||||
import { LongPressWaveOverlay } from '@/ui/LongPressWaveOverlay';
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { SubsonicSong } from '@/lib/api/subsonicTypes';
|
||||
import React, { useRef, useState, useEffect, useMemo } from 'react';
|
||||
import { ChevronLeft, ChevronRight, RefreshCw } from 'lucide-react';
|
||||
import SongCard from '@/features/home/components/SongCard';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { dedupeById } from '@/lib/util/dedupeById';
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -14,8 +14,8 @@ import { ChevronRight } from 'lucide-react';
|
||||
import { useHomeStore } from '@/features/home/store/homeStore';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { filterAlbumsByMixRatings, getMixMinRatingsConfigFromAuth } from '@/utils/mix/mixRatingFilter';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { bumpPerfCounter } from '@/utils/perf/perfTelemetry';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { bumpPerfCounter } from '@/lib/perf/perfTelemetry';
|
||||
import { dedupeById } from '@/lib/util/dedupeById';
|
||||
import { shuffleArray } from '@/lib/util/shuffleArray';
|
||||
import { useLibraryCoverPrefetch } from '@/cover/useLibraryCoverPrefetch';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useLyrics, type WordLyricsLine } from '@/features/lyrics/hooks/useLyric
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import type { Track } from '@/lib/media/trackTypes';
|
||||
import { EaseScroller, targetForFraction } from '@/utils/ui/easeScroll';
|
||||
import { EaseScroller, targetForFraction } from '@/lib/dom/easeScroll';
|
||||
import OverlayScrollArea from '@/ui/OverlayScrollArea';
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -9,7 +9,7 @@ import { useAuthStore } from '@/store/authStore';
|
||||
import { usePlayerStore } from '@/features/playback/store/playerStore';
|
||||
import { AlbumCoverArtImage } from '@/cover/AlbumCoverArtImage';
|
||||
import { coverServerScopeForServerId } from '@/cover/serverScope';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { GRID_COVER_WARM_LIMIT } from '@/cover/layoutSizes';
|
||||
import { VirtualCardGrid } from '@/ui/VirtualCardGrid';
|
||||
import { OfflineLibraryDiskStat } from '@/features/offline/components/OfflineLibraryDiskStat';
|
||||
@@ -32,7 +32,7 @@ import {
|
||||
type OfflineCoverQuadCell,
|
||||
type OfflineLibraryCard,
|
||||
} from '@/features/offline/utils/offlineLibraryHelpers';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { shuffleArray } from '@/lib/util/shuffleArray';
|
||||
import { getMediaDir } from '@/lib/media/mediaDir';
|
||||
import { canonicalQueueServerKey, resolveIndexKey } from '@/utils/server/serverIndexKey';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { create } from 'zustand';
|
||||
import { persist, createJSONStorage } from 'zustand/middleware';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { useOfflineJobStore, cancelledDownloads } from '@/features/offline/store/offlineJobStore';
|
||||
import { useLocalPlaybackStore, type PinSource } from '@/store/localPlaybackStore';
|
||||
import { getMediaDir } from '@/lib/media/mediaDir';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Copy, Trash2 } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useOrbitStore } from '@/features/orbit/store/orbitStore';
|
||||
import { usePlayerStore } from '@/features/playback/store/playerStore';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { computeOrbitDriftMs } from '@/features/orbit/utils/orbit';
|
||||
import {
|
||||
clearOrbitEvents,
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from '@/features/orbit/utils/orbit';
|
||||
import { switchActiveServer } from '@/utils/server/switchActiveServer';
|
||||
import { useOrbitAccountPickerStore } from '@/features/orbit/store/orbitAccountPickerStore';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
interface Props {
|
||||
onClose: () => void;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { useOrbitStore } from '@/features/orbit/store/orbitStore';
|
||||
import { updateOrbitSettings, triggerOrbitShuffleNow } from '@/features/orbit/utils/orbit';
|
||||
import { ORBIT_DEFAULT_SETTINGS, ORBIT_SHUFFLE_INTERVAL_PRESETS_MIN, type OrbitShuffleIntervalMin } from '@/features/orbit/api/orbit';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
interface Props {
|
||||
anchorRef: React.RefObject<HTMLElement | null>;
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
forgetPendingSuggestion,
|
||||
resetPendingResendState,
|
||||
} from '@/features/orbit/utils/orbit';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import i18n from '@/lib/i18n';
|
||||
import { estimateLivePosition, type OrbitState } from '@/features/orbit/api/orbit';
|
||||
import { pushOrbitEvent } from '@/features/orbit/utils/orbitDiag';
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
type OrbitState,
|
||||
type OrbitQueueItem,
|
||||
} from '@/features/orbit/api/orbit';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import i18n from '@/lib/i18n';
|
||||
import { pushOrbitEvent } from '@/features/orbit/utils/orbitDiag';
|
||||
import { useOrbitOutboxHeartbeat } from '@/features/orbit/hooks/useOrbitOutboxHeartbeat';
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
evaluateOrbitSuggestGate,
|
||||
OrbitSuggestBlockedError,
|
||||
} from '@/features/orbit/utils/orbit';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
/**
|
||||
* Shared behaviour for song rows that in "normal mode" swallow a full list
|
||||
|
||||
@@ -21,7 +21,7 @@ import { usePlaybackDelayPress } from '@/features/playback/hooks/usePlaybackDela
|
||||
import PlaybackDelayModal from '@/features/playback/components/PlaybackDelayModal';
|
||||
import { usePlaybackScheduleRemaining } from '@/features/playback/utils/playbackScheduleFormat';
|
||||
import { usePreviewStore } from '@/features/playback/store/previewStore';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { coerceOpenArtistRefs } from '@/lib/api/openArtistRefs';
|
||||
import { resolveTrackArtistRefs } from '@/features/playback/utils/playback/trackArtistRefs';
|
||||
import { PlayerTrackInfo } from '@/features/playback/components/playerBar/PlayerTrackInfo';
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { TFunction } from 'i18next';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { IS_MACOS } from '@/lib/util/platform';
|
||||
import { sortAudioDeviceIds } from '@/features/playback/utils/audio/audioDeviceLabels';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
interface UseAudioDevicesProbeResult {
|
||||
audioDevices: string[];
|
||||
|
||||
@@ -17,8 +17,8 @@ import {
|
||||
playListenSessionOpen,
|
||||
} from '@/features/playback/store/playListenSession';
|
||||
import { appendTimelineLeaveTrack } from '@/features/playback/store/timelineSessionHistory';
|
||||
import { getPerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { bumpPerfCounter } from '@/utils/perf/perfTelemetry';
|
||||
import { getPerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { bumpPerfCounter } from '@/lib/perf/perfTelemetry';
|
||||
import {
|
||||
getPlaybackCacheServerKey,
|
||||
getPlaybackIndexKey,
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
import { resolvePlaybackUrl } from '@/features/playback/utils/playback/resolvePlaybackUrl';
|
||||
import { resolveReplayGainDb } from '@/features/playback/utils/audio/resolveReplayGainDb';
|
||||
import { audioPlayHiResBlendArgs } from '@/lib/audio/hiResCrossfadeResample';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { getPlayGeneration, setIsAudioPaused } from '@/features/playback/store/engineState';
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { applyServerPlayQueue } from '@/features/playback/store/applyServerPlayQueue';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import i18n from '@/lib/i18n';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import {
|
||||
bumpPlayGeneration,
|
||||
|
||||
@@ -15,7 +15,7 @@ const hoisted = vi.hoisted(() => {
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock('@/utils/ui/toast', () => ({ showToast: hoisted.showToastMock }));
|
||||
vi.mock('@/lib/dom/toast', () => ({ showToast: hoisted.showToastMock }));
|
||||
vi.mock('@/features/playback/store/playerStore', () => ({
|
||||
usePlayerStore: {
|
||||
getState: hoisted.playerStateGet,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { usePlayerStore } from '@/features/playback/store/playerStore';
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Download, X } from 'lucide-react';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import type { SpotifyCsvTrack } from '@/features/playlist/utils/spotifyCsvImport';
|
||||
|
||||
interface CsvReportModalProps {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type React from 'react';
|
||||
import type { TFunction } from 'i18next';
|
||||
import type { SubsonicPlaylist, SubsonicSong } from '@/lib/api/subsonicTypes';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
export interface PlaylistSongMutationsDeps {
|
||||
songs: SubsonicSong[];
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
import PlaylistsSmartEditor from '@/features/playlist/components/PlaylistsSmartEditor';
|
||||
import PlaylistsHeader from '@/features/playlist/components/PlaylistsHeader';
|
||||
import PlaylistCard from '@/features/playlist/components/PlaylistCard';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { VirtualCardGrid } from '@/ui/VirtualCardGrid';
|
||||
import { useOfflineBrowseContext } from '@/features/offline';
|
||||
import { offlineActionPolicy } from '@/features/offline';
|
||||
|
||||
@@ -3,7 +3,7 @@ import { open as openDialog } from '@tauri-apps/plugin-dialog';
|
||||
import { readTextFile } from '@tauri-apps/plugin-fs';
|
||||
import { search } from '@/lib/api/subsonicSearch';
|
||||
import type { SubsonicSong } from '@/lib/api/subsonicTypes';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { parseSpotifyCsv, type SpotifyCsvTrack } from '@/features/playlist/utils/spotifyCsvImport';
|
||||
import {
|
||||
cleanTrackTitle,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { TFunction } from 'i18next';
|
||||
import { getPlaylist, updatePlaylistMeta, uploadPlaylistCoverArt } from '@/lib/api/subsonicPlaylists';
|
||||
import type { SubsonicPlaylist } from '@/lib/api/subsonicTypes';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
export interface RunPlaylistSaveMetaDeps {
|
||||
id: string;
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { TFunction } from 'i18next';
|
||||
import { deletePlaylist, getPlaylist, updatePlaylist } from '@/lib/api/subsonicPlaylists';
|
||||
import type { SubsonicPlaylist } from '@/lib/api/subsonicTypes';
|
||||
import { usePlaylistStore } from '@/features/playlist/store/playlistStore';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
export interface RunPlaylistDeleteDeps {
|
||||
e: React.MouseEvent;
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
defaultSmartFilters, displayPlaylistName, isSmartPlaylistName,
|
||||
parseSmartRulesToFilters, type SmartFilters,
|
||||
} from '@/features/playlist/utils/playlistsSmart';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
export interface RunPlaylistsOpenSmartEditorDeps {
|
||||
pl: SubsonicPlaylist;
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
buildSmartRulesPayload, defaultSmartFilters, SMART_PREFIX,
|
||||
type PendingSmartPlaylist, type SmartFilters,
|
||||
} from '@/features/playlist/utils/playlistsSmart';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
export interface RunPlaylistsSaveSmartDeps {
|
||||
isNavidromeServer: boolean;
|
||||
|
||||
@@ -15,7 +15,7 @@ import { useAuthStore } from '@/store/authStore';
|
||||
import { encodeSharePayload } from '@/utils/share/shareLink';
|
||||
import { serverShareBaseUrl } from '@/utils/server/serverEndpoint';
|
||||
import { copyTextToClipboard } from '@/utils/server/serverMagicString';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { useThemeStore } from '@/store/themeStore';
|
||||
import { useLyricsStore } from '@/store/lyricsStore';
|
||||
import { LyricsPane } from '@/features/lyrics';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import {
|
||||
type InternetRadioStation, type RadioBrowserStation, RADIO_PAGE_SIZE,
|
||||
} from '@/lib/api/subsonicTypes';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
interface RadioDirectoryModalProps {
|
||||
onClose: () => void;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { InternetRadioStation } from '@/lib/api/subsonicTypes';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import {
|
||||
guessAzuraCastApiUrl,
|
||||
normaliseAzuraCastHomepageUrl,
|
||||
|
||||
@@ -7,13 +7,13 @@ import { setRadioVolume } from '@/features/playback/store/radioPlayer';
|
||||
import { fadeOut } from '@/features/playback/utils/playback/fadeOut';
|
||||
import { invalidateCoverArt } from '@/utils/imageCache';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import RadioToolbar from '@/features/radio/components/RadioToolbar';
|
||||
import AlphabetFilterBar from '@/features/radio/components/AlphabetFilterBar';
|
||||
import RadioCard from '@/features/radio/components/RadioCard';
|
||||
import RadioEditModal from '@/features/radio/components/RadioEditModal';
|
||||
import RadioDirectoryModal from '@/features/radio/components/RadioDirectoryModal';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { VirtualCardGrid } from '@/ui/VirtualCardGrid';
|
||||
import { useNavidromeAdminRole, canManageNavidromeRadio } from '@/hooks/useNavidromeAdminRole';
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import { pushQueueUndoFromGetter } from '@/features/playback/store/queueUndo';
|
||||
import { usePlayerStore } from '@/features/playback/store/playerStore';
|
||||
import { useLuckyMixStore } from '@/features/randomMix/store/luckyMixStore';
|
||||
import { isLuckyMixAvailable } from '@/features/randomMix/hooks/useLuckyMixAvailable';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import {
|
||||
bindQueueServerForPlayback,
|
||||
playbackServerDiffersFromActive,
|
||||
|
||||
@@ -36,7 +36,7 @@ import { ArtistCoverArtImage } from '@/cover/ArtistCoverArtImage';
|
||||
import { CoverArtImage } from '@/cover/CoverArtImage';
|
||||
import { COVER_DENSE_SEARCH_CSS_PX } from '@/cover/layoutSizes';
|
||||
import { albumCoverRef } from '@/cover/ref';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { useShareSearch } from '@/features/search/hooks/useShareSearch';
|
||||
import ShareSearchResults from '@/features/search/components/ShareSearchResults';
|
||||
import {
|
||||
|
||||
@@ -15,7 +15,7 @@ import { AlbumCoverArtImage } from '@/cover/AlbumCoverArtImage';
|
||||
import { ArtistCoverArtImage } from '@/cover/ArtistCoverArtImage';
|
||||
import { CoverArtImage } from '@/cover/CoverArtImage';
|
||||
import { albumCoverRefForSong } from '@/cover/ref';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { albumArtistDisplayName } from '@/features/album';
|
||||
import { useShareSearch } from '@/features/search/hooks/useShareSearch';
|
||||
import ShareSearchResults from '@/features/search/components/ShareSearchResults';
|
||||
|
||||
@@ -10,7 +10,7 @@ import { usePlayerStore } from '@/features/playback/store/playerStore';
|
||||
import { SongRail } from '@/features/home';
|
||||
import { playSongNow } from '@/features/playback/utils/playback/playSong';
|
||||
import { ndListSongs, ndInvalidateSongsCache } from '@/lib/api/navidromeBrowse';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { useNavigateToAlbum } from '@/features/album';
|
||||
import { useNavigateToArtist } from '@/features/artist';
|
||||
import { OpenArtistRefInline } from '@/features/artist';
|
||||
|
||||
@@ -57,7 +57,7 @@ import {
|
||||
} from '@/lib/library/browseTextSearch';
|
||||
import { useLibraryIndexStore } from '@/store/libraryIndexStore';
|
||||
import { MOOD_GROUP_IDS } from '@/config/moodGroups';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { useSongBrowseList, type SongBrowseListRestore } from '@/features/search/hooks/useSongBrowseList';
|
||||
import TracksPageChrome from '@/features/search/components/TracksPageChrome';
|
||||
import SongBrowseSection from '@/features/search/components/SongBrowseSection';
|
||||
|
||||
@@ -11,11 +11,11 @@ vi.mock('@/api/network', () => ({
|
||||
}));
|
||||
|
||||
// showToast mocked so we can assert two-LAN validation surfaced the error.
|
||||
vi.mock('@/utils/ui/toast', () => ({
|
||||
vi.mock('@/lib/dom/toast', () => ({
|
||||
showToast: vi.fn(),
|
||||
}));
|
||||
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
describe('AddServerForm — dual-address behaviour', () => {
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import type { CustomHeaderEntry, CustomHeadersApplyTo, ServerProfile } from '@/store/authStoreTypes';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import {
|
||||
DEFAULT_CUSTOM_HEADERS_APPLY_TO,
|
||||
serverCustomHeadersFromForm,
|
||||
|
||||
@@ -23,7 +23,7 @@ import { libraryGetTracksBatch, type LibraryTrackDto, type TrackRefDto } from '@
|
||||
import { buildStreamUrlForServer } from '@/lib/api/subsonicStreamUrl';
|
||||
import { serverListDisplayLabel } from '@/utils/server/serverDisplayName';
|
||||
import { serverIndexKeyForProfile } from '@/utils/server/serverIndexKey';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import {
|
||||
ANALYTICS_STRATEGIES,
|
||||
ADVANCED_PARALLELISM_MAX,
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
pickBackupExportPath,
|
||||
pickBackupImportPath,
|
||||
} from '@/features/settings/utils/backup';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
|
||||
type BackupMode = 'full' | 'library' | 'config';
|
||||
type BackupAction = 'export' | 'import';
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
import { clearDiskSrcCacheForServer } from '@/cover/diskSrcCache';
|
||||
import { serverListDisplayLabel } from '@/utils/server/serverDisplayName';
|
||||
import { serverIndexKeyForProfile } from '@/utils/server/serverIndexKey';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { formatBytes } from '@/lib/format/formatBytes';
|
||||
import { clearImageCache, getImageCacheSize } from '@/utils/imageCache';
|
||||
import { wakeLibraryCoverBackfill } from '@/lib/library/coverBackfillWake';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { uninstallTheme } from '@/lib/themes/uninstallTheme';
|
||||
import { installThemeFromRegistry } from '@/lib/themes/installThemeFromRegistry';
|
||||
import { useThemeUpdates } from '@/features/settings/hooks/useThemeUpdates';
|
||||
import { useThemeAnimationRisk } from '@/features/settings/hooks/useThemeAnimationRisk';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { AnimatedThemeBadge } from '@/features/settings/components/AnimatedThemeBadge';
|
||||
import { FIXED_THEMES } from '@/lib/themes/fixedThemes';
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
runIndexKeyRemigration,
|
||||
} from '@/utils/server/serverUrlRemigration';
|
||||
import { useConfirmModalStore } from '@/store/confirmModalStore';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { FEATURE_AUDIOMUSE_SIMILAR_TRACKS } from '@/serverCapabilities/catalog';
|
||||
import { isFeatureActiveForServer, resolveFeatureForServer } from '@/serverCapabilities/storeView';
|
||||
import type { ResolvedCapability } from '@/serverCapabilities/types';
|
||||
|
||||
@@ -10,7 +10,7 @@ import i18n from '@/lib/i18n';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import type { ClockFormat, LinuxWaylandTextRenderProfile, LoggingMode } from '@/store/authStoreTypes';
|
||||
import { IS_LINUX } from '@/lib/util/platform';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { AboutPsysonicBrandHeader } from '@/features/settings/components/AboutPsysonicLol';
|
||||
import CustomSelect from '@/ui/CustomSelect';
|
||||
import LicensesPanel from '@/features/settings/components/LicensesPanel';
|
||||
|
||||
@@ -5,7 +5,7 @@ import { invoke } from '@tauri-apps/api/core';
|
||||
import { open } from '@tauri-apps/plugin-dialog';
|
||||
import { useInstalledThemesStore } from '@/store/installedThemesStore';
|
||||
import { validateThemePackage, type ValidatedTheme } from '@/lib/themes/validateThemePackage';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import ConfirmModal from '@/components/ConfirmModal';
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Shield, Wand2 } from 'lucide-react';
|
||||
import { ndUpdateUser, type NdLibrary, type NdUser } from '@/lib/api/navidromeAdmin';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import {
|
||||
copyTextToClipboard,
|
||||
encodeServerMagicString,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { Share2 } from 'lucide-react';
|
||||
import SettingsSubSection from '@/features/settings/components/SettingsSubSection';
|
||||
import { SettingsGroup } from '@/features/settings/components/SettingsGroup';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import {
|
||||
errorI18nKey,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { createPortal } from 'react-dom';
|
||||
import { X } from 'lucide-react';
|
||||
import type { TFunction } from 'i18next';
|
||||
import { ndUpdateUser, type NdUser } from '@/lib/api/navidromeAdmin';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import {
|
||||
copyTextToClipboard,
|
||||
encodeServerMagicString,
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
type NdLibrary,
|
||||
type NdUser,
|
||||
} from '@/lib/api/navidromeAdmin';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import {
|
||||
copyTextToClipboard,
|
||||
encodeServerMagicString,
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
getSystemItemsForReorder,
|
||||
} from '@/features/sidebar/utils/sidebarNavReorder';
|
||||
import { useLuckyMixAvailable } from '@/features/randomMix';
|
||||
import { usePerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { usePerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { useSidebarNewReleasesUnread } from '@/features/sidebar/hooks/useSidebarNewReleasesUnread';
|
||||
import { useSidebarNavDnd } from '@/features/sidebar/hooks/useSidebarNavDnd';
|
||||
import { useSidebarLibraryDropdown } from '@/features/sidebar/hooks/useSidebarLibraryDropdown';
|
||||
|
||||
@@ -6,10 +6,10 @@ import SidebarPerfProbeTogglesTab from '@/features/sidebar/components/perfProbe/
|
||||
import SidebarPerfProbeTuningTab from '@/features/sidebar/components/perfProbe/SidebarPerfProbeTuningTab';
|
||||
import SidebarPerfProbeLogsTab from '@/features/sidebar/components/perfProbe/SidebarPerfProbeLogsTab';
|
||||
import SidebarPerfProbeConnectionsTab from '@/features/sidebar/components/perfProbe/SidebarPerfProbeConnectionsTab';
|
||||
import { resetPerfProbeFlags, type PerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import { clearPerfLiveOverlayPins } from '@/utils/perf/perfOverlayPins';
|
||||
import { resetPerfOverlayAppearance } from '@/utils/perf/perfOverlayAppearance';
|
||||
import { resetPerfOverlayMode } from '@/utils/perf/perfOverlayMode';
|
||||
import { resetPerfProbeFlags, type PerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import { clearPerfLiveOverlayPins } from '@/lib/perf/perfOverlayPins';
|
||||
import { resetPerfOverlayAppearance } from '@/lib/perf/perfOverlayAppearance';
|
||||
import { resetPerfOverlayMode } from '@/lib/perf/perfOverlayMode';
|
||||
|
||||
type TabId = 'monitor' | 'connections' | 'toggles' | 'tuning' | 'logs';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { perfLiveCpuSnapshotSupported } from '@/utils/perf/perfLiveCpuSnapshot';
|
||||
import { perfLiveCpuSnapshotSupported } from '@/lib/perf/perfLiveCpuSnapshot';
|
||||
import {
|
||||
PERF_LIVE_POLL_MS_MAX,
|
||||
PERF_LIVE_POLL_MS_MIN,
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
setPerfLivePollIntervalMs,
|
||||
usePerfLiveIncludeThreadGroups,
|
||||
usePerfLivePollIntervalMs,
|
||||
} from '@/utils/perf/perfLivePollSettings';
|
||||
} from '@/lib/perf/perfLivePollSettings';
|
||||
|
||||
export default function PerfLivePollControls() {
|
||||
const pollMs = usePerfLivePollIntervalMs();
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
setPerfOverlayCorner,
|
||||
setPerfOverlayOpacity,
|
||||
usePerfOverlayAppearance,
|
||||
} from '@/utils/perf/perfOverlayAppearance';
|
||||
} from '@/lib/perf/perfOverlayAppearance';
|
||||
|
||||
export default function PerfOverlayAppearanceControls() {
|
||||
const { corner, opacity } = usePerfOverlayAppearance();
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
PERF_OVERLAY_MODE_OPTIONS,
|
||||
setPerfOverlayMode,
|
||||
usePerfOverlayMode,
|
||||
} from '@/utils/perf/perfOverlayMode';
|
||||
} from '@/lib/perf/perfOverlayMode';
|
||||
|
||||
export default function PerfOverlayModeControls() {
|
||||
const mode = usePerfOverlayMode();
|
||||
|
||||
@@ -16,8 +16,8 @@ import { invoke } from '@tauri-apps/api/core';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import type { LoggingMode } from '@/store/authStoreTypes';
|
||||
import CustomSelect from '@/ui/CustomSelect';
|
||||
import { filterLogLines } from '@/utils/perf/filterLogLines';
|
||||
import { sanitizeLogLine } from '@/utils/perf/sanitizeLogLine';
|
||||
import { filterLogLines } from '@/lib/perf/filterLogLines';
|
||||
import { sanitizeLogLine } from '@/lib/perf/sanitizeLogLine';
|
||||
|
||||
function formatLogLinesText(lines: RuntimeLogLine[]): string {
|
||||
return lines.map(line => line.text).join('\n');
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { useMemo, useRef } from 'react';
|
||||
import { isPerfLivePollWaitingForCpu, usePerfLiveSnapshot } from '@/utils/perf/perfLiveStore';
|
||||
import { usePerfLiveIncludeThreadGroups } from '@/utils/perf/perfLivePollSettings';
|
||||
import { isPerfLivePollWaitingForCpu, usePerfLiveSnapshot } from '@/lib/perf/perfLiveStore';
|
||||
import { usePerfLiveIncludeThreadGroups } from '@/lib/perf/perfLivePollSettings';
|
||||
import {
|
||||
togglePerfLiveOverlayPin,
|
||||
togglePipelineOverlayPin,
|
||||
usePerfLiveOverlayPins,
|
||||
usePipelineOverlayPinned,
|
||||
type PerfLiveOverlayPinId,
|
||||
} from '@/utils/perf/perfOverlayPins';
|
||||
} from '@/lib/perf/perfOverlayPins';
|
||||
import PerfProbeMetricCard, { PerfProbeMetricSection } from '@/features/sidebar/components/perfProbe/PerfProbeMetricCard';
|
||||
import PerfOverlayAppearanceControls from '@/features/sidebar/components/perfProbe/PerfOverlayAppearanceControls';
|
||||
import PerfOverlayModeControls from '@/features/sidebar/components/perfProbe/PerfOverlayModeControls';
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { useState, type CSSProperties } from 'react';
|
||||
import { ChevronRight } from 'lucide-react';
|
||||
import { setPerfProbeFlag, type PerfProbeFlags } from '@/utils/perf/perfFlags';
|
||||
import type { PerfToggleEngineLeaf, PerfToggleLeaf, PerfToggleNode } from '@/utils/perf/perfProbeToggleTree';
|
||||
import { setPerfProbeFlag, type PerfProbeFlags } from '@/lib/perf/perfFlags';
|
||||
import type { PerfToggleEngineLeaf, PerfToggleLeaf, PerfToggleNode } from '@/lib/perf/perfProbeToggleTree';
|
||||
import {
|
||||
isPerfToggleEngineLeaf,
|
||||
isPerfToggleGroup,
|
||||
PERF_PROBE_TOGGLE_TREE,
|
||||
} from '@/utils/perf/perfProbeToggleTree';
|
||||
} from '@/lib/perf/perfProbeToggleTree';
|
||||
|
||||
interface EngineProps {
|
||||
hotCacheEnabled: boolean;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { acquirePerfLivePoll, patchPerfLiveAnalysis } from '@/utils/perf/perfLiveStore';
|
||||
import { setPerfProbeTelemetryActive } from '@/utils/perf/perfTelemetry';
|
||||
import { useAnalysisPerfLast } from '@/utils/perf/analysisPerfStore';
|
||||
import { acquirePerfLivePoll, patchPerfLiveAnalysis } from '@/lib/perf/perfLiveStore';
|
||||
import { setPerfProbeTelemetryActive } from '@/lib/perf/perfTelemetry';
|
||||
import { useAnalysisPerfLast } from '@/lib/perf/analysisPerfStore';
|
||||
import { useAnalysisPerfListener } from '@/hooks/useAnalysisPerfListener';
|
||||
import { useCoverPerfListener, useCoverUiThroughputPoll } from '@/cover/useCoverPerfListener';
|
||||
import {
|
||||
getPerfProbeFlags,
|
||||
subscribePerfProbeFlags,
|
||||
} from '@/utils/perf/perfFlags';
|
||||
import { hasAnyLiveMetricPollNeed, usePerfLiveOverlayPins } from '@/utils/perf/perfOverlayPins';
|
||||
} from '@/lib/perf/perfFlags';
|
||||
import { hasAnyLiveMetricPollNeed, usePerfLiveOverlayPins } from '@/lib/perf/perfOverlayPins';
|
||||
import { useSyncExternalStore } from 'react';
|
||||
|
||||
interface Result {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { X } from 'lucide-react';
|
||||
import { save } from '@tauri-apps/plugin-dialog';
|
||||
import { writeFile } from '@tauri-apps/plugin-fs';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { showToast } from '@/lib/dom/toast';
|
||||
import {
|
||||
exportAlbumCardBlob,
|
||||
renderAlbumCardCanvas,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { SeekbarStyle } from '@/store/authStoreTypes';
|
||||
import { bumpPerfCounter } from '@/utils/perf/perfTelemetry';
|
||||
import { bumpPerfCounter } from '@/lib/perf/perfTelemetry';
|
||||
import { AnimState, makeAnimState } from '@/features/waveform/utils/waveformSeekHelpers';
|
||||
import {
|
||||
drawBar, drawLineDot, drawNeon, drawSegmented, drawThick, drawWaveform,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user