import { UnstyledButton } from '@mantine/core'; import { motion } from 'framer-motion'; import { RiUserVoiceLine, RiMenuFill, RiFlag2Line, RiFolder3Line, RiPlayListLine, RiAlbumLine, RiHome6Line, RiMusic2Line, RiHome6Fill, RiAlbumFill, RiMusic2Fill, RiUserVoiceFill, RiFlag2Fill, RiFolder3Fill, RiPlayListFill, } from 'react-icons/ri'; import { useLocation } from 'react-router'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; import { DropdownMenu, ScrollArea } from '/@/renderer/components'; import { CollapsedSidebarItem } from '/@/renderer/features/sidebar/components/collapsed-sidebar-item'; import { AppMenu } from '/@/renderer/features/titlebar/components/app-menu'; import { AppRoute } from '/@/renderer/router/routes'; import { useWindowSettings } from '/@/renderer/store'; import { Platform } from '/@/renderer/types'; const SidebarContainer = styled(motion.div)<{ windowBarStyle: Platform }>` display: flex; flex-direction: column; height: 100%; max-height: ${(props) => props.windowBarStyle === Platform.WEB ? 'calc(100vh - 149px)' : 'calc(100vh - 119px)'}; // Playerbar (90px), titlebar (65px), windowbar (30px) user-select: none; `; export const CollapsedSidebar = () => { const location = useLocation(); const { windowBarStyle } = useWindowSettings(); return ( } component={UnstyledButton} icon={} label="Menu" /> } component={Link} icon={} label="Home" to={AppRoute.HOME} /> } component={Link} icon={} label="Albums" to={AppRoute.LIBRARY_ALBUMS} /> } component={Link} icon={} label="Tracks" to={AppRoute.LIBRARY_SONGS} /> } component={Link} icon={} label="Artists" to={AppRoute.LIBRARY_ALBUM_ARTISTS} /> } component={Link} icon={} label="Genres" to={AppRoute.LIBRARY_GENRES} /> } component={Link} icon={} label="Folders" to={AppRoute.LIBRARY_FOLDERS} /> } component={Link} icon={} label="Playlists" to={AppRoute.PLAYLISTS} /> ); };