mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 20:40:21 +02:00
Add internet radio (#1384)
This commit is contained in:
@@ -38,6 +38,7 @@ export const CollapsedSidebar = () => {
|
||||
Home: t('page.sidebar.home', { postProcess: 'titleCase' }),
|
||||
'Now Playing': t('page.sidebar.nowPlaying', { postProcess: 'titleCase' }),
|
||||
Playlists: t('page.sidebar.playlists', { postProcess: 'titleCase' }),
|
||||
Radio: t('page.sidebar.radio', { postProcess: 'titleCase' }),
|
||||
Search: t('page.sidebar.search', { postProcess: 'titleCase' }),
|
||||
Settings: t('page.sidebar.settings', { postProcess: 'titleCase' }),
|
||||
Tracks: t('page.sidebar.tracks', { postProcess: 'titleCase' }),
|
||||
|
||||
@@ -15,6 +15,8 @@ import {
|
||||
RiPlayLine,
|
||||
RiPlayListFill,
|
||||
RiPlayListLine,
|
||||
RiRadioFill,
|
||||
RiRadioLine,
|
||||
RiSearchFill,
|
||||
RiSearchLine,
|
||||
RiSettings2Fill,
|
||||
@@ -64,6 +66,9 @@ export const SidebarIcon = ({ active, route, size }: SidebarIconProps) => {
|
||||
case AppRoute.PLAYLISTS:
|
||||
if (isActive) return <RiPlayListFill size={size} />;
|
||||
return <RiPlayListLine size={size} />;
|
||||
case AppRoute.RADIO:
|
||||
if (isActive) return <RiRadioFill size={size} />;
|
||||
return <RiRadioLine size={size} />;
|
||||
case AppRoute.SETTINGS:
|
||||
if (isActive) return <RiSettings2Fill size={size} />;
|
||||
return <RiSettings2Line size={size} />;
|
||||
|
||||
@@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import styles from './sidebar.module.css';
|
||||
|
||||
import { ContextMenuController } from '/@/renderer/features/context-menu/context-menu-controller';
|
||||
import { useRadioStore } from '/@/renderer/features/radio/hooks/use-radio-player';
|
||||
import { ActionBar } from '/@/renderer/features/sidebar/components/action-bar';
|
||||
import { ServerSelector } from '/@/renderer/features/sidebar/components/server-selector';
|
||||
import { SidebarIcon } from '/@/renderer/features/sidebar/components/sidebar-icon';
|
||||
@@ -52,6 +53,7 @@ export const Sidebar = () => {
|
||||
Home: t('page.sidebar.home', { postProcess: 'titleCase' }),
|
||||
'Now Playing': t('page.sidebar.nowPlaying', { postProcess: 'titleCase' }),
|
||||
Playlists: t('page.sidebar.playlists', { postProcess: 'titleCase' }),
|
||||
Radio: t('page.sidebar.radio', { postProcess: 'titleCase' }),
|
||||
Search: t('page.sidebar.search', { postProcess: 'titleCase' }),
|
||||
Settings: t('page.sidebar.settings', { postProcess: 'titleCase' }),
|
||||
Tracks: t('page.sidebar.tracks', { postProcess: 'titleCase' }),
|
||||
@@ -61,7 +63,9 @@ export const Sidebar = () => {
|
||||
|
||||
const { sidebarItems } = useGeneralSettings();
|
||||
const { windowBarStyle } = useWindowSettings();
|
||||
const showImage = useAppStore((state) => state.sidebar.image);
|
||||
const sidebarImageEnabled = useAppStore((state) => state.sidebar.image);
|
||||
const isRadioPlaying = useRadioStore((state) => state.isPlaying);
|
||||
const showImage = sidebarImageEnabled && !isRadioPlaying;
|
||||
|
||||
const sidebarItemsWithRoute: SidebarItemType[] = useMemo(() => {
|
||||
if (!sidebarItems) return [];
|
||||
|
||||
Reference in New Issue
Block a user