mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 15:25:46 +00:00
refactor(music-network): co-locate MusicNetworkIndicator + presetIcon into music-network/ui (barrel-exported)
This commit is contained in:
@@ -28,7 +28,7 @@ import {
|
||||
mainRouteInpageScrollViewportId,
|
||||
} from '../constants/appScroll';
|
||||
import ConnectionIndicator from '@/app/ConnectionIndicator';
|
||||
import MusicNetworkIndicator from '../components/MusicNetworkIndicator';
|
||||
import { MusicNetworkIndicator } from '@/music-network';
|
||||
import { OfflineBanner } from '@/features/offline';
|
||||
import AppUpdater from '@/features/updater/components/AppUpdater';
|
||||
import TitleBar from '@/app/TitleBar';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { queueSongStar } from '@/features/playback/store/pendingStarSync';
|
||||
import { getMusicNetworkRuntime, useEnrichmentPrimary } from '@/music-network';
|
||||
import type { Track } from '@/lib/media/trackTypes';
|
||||
import { useAuthStore } from '@/store/authStore';
|
||||
import { renderPresetIcon } from '@/components/settings/musicNetwork/presetIcon';
|
||||
import { renderPresetIcon } from '@/music-network';
|
||||
import StarRating from '@/ui/StarRating';
|
||||
import { AddToPlaylistSubmenu } from '@/features/contextMenu/components/AddToPlaylistSubmenu';
|
||||
import type { ContextMenuItemsProps } from '@/features/contextMenu/components/contextMenuItemTypes';
|
||||
|
||||
@@ -11,7 +11,7 @@ import { usePlaylistStore } from '@/features/playlist';
|
||||
import { songToTrack } from '@/lib/media/songToTrack';
|
||||
import { showToast } from '@/utils/ui/toast';
|
||||
import { suggestOrbitTrack, hostEnqueueToOrbit, evaluateOrbitSuggestGate, OrbitSuggestBlockedError } from '@/features/orbit';
|
||||
import { renderPresetIcon } from '@/components/settings/musicNetwork/presetIcon';
|
||||
import { renderPresetIcon } from '@/music-network';
|
||||
import StarRating from '@/ui/StarRating';
|
||||
import { AddToPlaylistSubmenu } from '@/features/contextMenu/components/AddToPlaylistSubmenu';
|
||||
import type { ContextMenuItemsProps } from '@/features/contextMenu/components/contextMenuItemTypes';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { OpenArtistRefInline } from '@/features/artist';
|
||||
import { formatTrackTime } from '@/lib/format/formatDuration';
|
||||
import { useEnrichmentPrimaryLabel } from '@/hooks/useEnrichmentPrimaryLabel';
|
||||
import { useEnrichmentPrimaryIcon } from '@/hooks/useEnrichmentPrimaryIcon';
|
||||
import { renderPresetIcon } from '@/components/settings/musicNetwork/presetIcon';
|
||||
import { renderPresetIcon } from '@/music-network';
|
||||
|
||||
interface HeroProps {
|
||||
track: { title: string; artist: string; album: string; year?: number;
|
||||
|
||||
@@ -17,7 +17,7 @@ import { PlaybackBufferingOverlay } from '@/features/playback/components/Playbac
|
||||
import { usePlayerStore } from '@/features/playback/store/playerStore';
|
||||
import { useEnrichmentPrimaryLabel } from '@/hooks/useEnrichmentPrimaryLabel';
|
||||
import { useEnrichmentPrimaryIcon } from '@/hooks/useEnrichmentPrimaryIcon';
|
||||
import { renderPresetIcon } from '@/components/settings/musicNetwork/presetIcon';
|
||||
import { renderPresetIcon } from '@/music-network';
|
||||
import {
|
||||
usePlayerBarLayoutStore,
|
||||
type PlayerBarLayoutItemId,
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
type BuiltinPreset,
|
||||
type PresetId,
|
||||
} from '@/music-network';
|
||||
import { renderPresetIcon } from '@/components/settings/musicNetwork/presetIcon';
|
||||
import { renderPresetIcon } from '@/music-network';
|
||||
|
||||
/**
|
||||
* "Add a service" list, driven entirely by the preset registry. Token-poll
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { getPreset, type Account, type UserProfile } from '@/music-network';
|
||||
import { renderPresetIcon } from '@/components/settings/musicNetwork/presetIcon';
|
||||
import { renderPresetIcon } from '@/music-network';
|
||||
|
||||
/**
|
||||
* One connected account as a single self-contained block: header (icon, label,
|
||||
|
||||
@@ -12,6 +12,8 @@ export {
|
||||
export type { MusicNetworkStore, RuntimeHost } from './runtime/store';
|
||||
export { listPresets, getPreset } from './registry/presetRegistry';
|
||||
export { useEnrichmentPrimary, type EnrichmentPrimary } from './ui/useEnrichmentPrimary';
|
||||
export { renderPresetIcon } from './ui/presetIcon';
|
||||
export { default as MusicNetworkIndicator } from './ui/MusicNetworkIndicator';
|
||||
export {
|
||||
migrateLegacyLastfm,
|
||||
sanitizeAccounts,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useEnrichmentPrimary } from '../music-network';
|
||||
import { renderPresetIcon } from './settings/musicNetwork/presetIcon';
|
||||
import { useEnrichmentPrimary } from '@/music-network';
|
||||
import { renderPresetIcon } from '@/music-network/ui/presetIcon';
|
||||
|
||||
/**
|
||||
* Sidebar status indicator for the enrichment primary (the account that drives
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { Globe, Radio, Server, Music2, Headphones } from 'lucide-react';
|
||||
import LastfmIcon from '@/ui/LastfmIcon';
|
||||
import type { PresetIcon } from '../../../music-network';
|
||||
import type { PresetIcon } from '@/music-network';
|
||||
|
||||
/**
|
||||
* Maps a preset manifest icon id to a rendered icon. Feature code references the
|
||||
Reference in New Issue
Block a user