mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 21:50:35 +02:00
restructure files onto electron-vite boilerplate
This commit is contained in:
@@ -20,9 +20,10 @@ import {
|
||||
RiUserVoiceFill,
|
||||
RiUserVoiceLine,
|
||||
} from 'react-icons/ri';
|
||||
import { AppRoute } from '/@/renderer/router/routes';
|
||||
import { generatePath } from 'react-router';
|
||||
|
||||
import { LibraryItem } from '/@/renderer/api/types';
|
||||
import { AppRoute } from '/@/renderer/router/routes';
|
||||
|
||||
interface SidebarIconProps {
|
||||
active?: boolean;
|
||||
@@ -35,36 +36,36 @@ export const SidebarIcon = ({ active, route, size }: SidebarIconProps) => {
|
||||
case AppRoute.HOME:
|
||||
if (active) return <RiHome6Fill size={size} />;
|
||||
return <RiHome6Line size={size} />;
|
||||
case AppRoute.LIBRARY_ALBUMS:
|
||||
if (active) return <RiAlbumFill size={size} />;
|
||||
return <RiAlbumLine size={size} />;
|
||||
case AppRoute.LIBRARY_ALBUM_ARTISTS:
|
||||
if (active) return <RiUserVoiceFill size={size} />;
|
||||
return <RiUserVoiceLine size={size} />;
|
||||
case AppRoute.LIBRARY_ALBUMS:
|
||||
if (active) return <RiAlbumFill size={size} />;
|
||||
return <RiAlbumLine size={size} />;
|
||||
case AppRoute.LIBRARY_ARTISTS:
|
||||
if (active) return <RiUserVoiceFill size={size} />;
|
||||
return <RiUserVoiceLine size={size} />;
|
||||
case AppRoute.PLAYLISTS:
|
||||
if (active) return <RiPlayListFill size={size} />;
|
||||
return <RiPlayListLine size={size} />;
|
||||
case AppRoute.LIBRARY_SONGS:
|
||||
if (active) return <RiMusic2Fill size={size} />;
|
||||
return <RiMusic2Line size={size} />;
|
||||
case AppRoute.LIBRARY_FOLDERS:
|
||||
if (active) return <RiFolder3Fill size={size} />;
|
||||
return <RiFolder3Line size={size} />;
|
||||
case AppRoute.LIBRARY_GENRES:
|
||||
if (active) return <RiFlag2Fill size={size} />;
|
||||
return <RiFlag2Line size={size} />;
|
||||
case generatePath(AppRoute.SEARCH, { itemType: LibraryItem.SONG }):
|
||||
if (active) return <RiSearchFill size={size} />;
|
||||
return <RiSearchLine size={size} />;
|
||||
case AppRoute.SETTINGS:
|
||||
if (active) return <RiSettings2Fill size={size} />;
|
||||
return <RiSettings2Line size={size} />;
|
||||
case AppRoute.LIBRARY_SONGS:
|
||||
if (active) return <RiMusic2Fill size={size} />;
|
||||
return <RiMusic2Line size={size} />;
|
||||
case AppRoute.NOW_PLAYING:
|
||||
if (active) return <RiPlayFill size={size} />;
|
||||
return <RiPlayLine size={size} />;
|
||||
case AppRoute.PLAYLISTS:
|
||||
if (active) return <RiPlayListFill size={size} />;
|
||||
return <RiPlayListLine size={size} />;
|
||||
case AppRoute.SETTINGS:
|
||||
if (active) return <RiSettings2Fill size={size} />;
|
||||
return <RiSettings2Line size={size} />;
|
||||
case generatePath(AppRoute.SEARCH, { itemType: LibraryItem.SONG }):
|
||||
if (active) return <RiSearchFill size={size} />;
|
||||
return <RiSearchLine size={size} />;
|
||||
default:
|
||||
return <RiHome6Line size={size} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user