don't show anime anymore
This commit is contained in:
@@ -12,8 +12,6 @@ import List from '@mui/material/List';
|
|||||||
import ListItem from '@mui/material/ListItem';
|
import ListItem from '@mui/material/ListItem';
|
||||||
import ListItemIcon from '@mui/material/ListItemIcon';
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
||||||
import CollectionsBookmarkIcon from '@mui/icons-material/CollectionsBookmark';
|
import CollectionsBookmarkIcon from '@mui/icons-material/CollectionsBookmark';
|
||||||
import CollectionsBookmarkOutlinedIcon from '@mui/icons-material/CollectionsBookmarkOutlined';
|
|
||||||
import VideoLibraryOutlinedIcon from '@mui/icons-material/VideoLibraryOutlined';
|
|
||||||
import ExploreIcon from '@mui/icons-material/Explore';
|
import ExploreIcon from '@mui/icons-material/Explore';
|
||||||
import ExtensionIcon from '@mui/icons-material/Extension';
|
import ExtensionIcon from '@mui/icons-material/Extension';
|
||||||
import GetAppIcon from '@mui/icons-material/GetApp';
|
import GetAppIcon from '@mui/icons-material/GetApp';
|
||||||
@@ -21,7 +19,6 @@ import NewReleasesIcon from '@mui/icons-material/NewReleases';
|
|||||||
import ListItemText from '@mui/material/ListItemText';
|
import ListItemText from '@mui/material/ListItemText';
|
||||||
import SettingsIcon from '@mui/icons-material/Settings';
|
import SettingsIcon from '@mui/icons-material/Settings';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import useLocalStorage from 'util/useLocalStorage';
|
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles({
|
||||||
list: {
|
list: {
|
||||||
@@ -37,17 +34,6 @@ interface IProps {
|
|||||||
|
|
||||||
export default function TemporaryDrawer({ drawerOpen, setDrawerOpen }: IProps) {
|
export default function TemporaryDrawer({ drawerOpen, setDrawerOpen }: IProps) {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
const [workingMode, setWorkingMode] = useLocalStorage<'manga' | 'anime'>('workingMode', 'manga');
|
|
||||||
|
|
||||||
const otherMode = () => {
|
|
||||||
if (workingMode === 'manga') return 'Anime';
|
|
||||||
return 'Manga';
|
|
||||||
};
|
|
||||||
|
|
||||||
const switchMode = () => {
|
|
||||||
if (workingMode === 'manga') setWorkingMode('anime');
|
|
||||||
else setWorkingMode('manga');
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -63,29 +49,25 @@ export default function TemporaryDrawer({ drawerOpen, setDrawerOpen }: IProps) {
|
|||||||
onKeyDown={() => setDrawerOpen(false)}
|
onKeyDown={() => setDrawerOpen(false)}
|
||||||
>
|
>
|
||||||
<List>
|
<List>
|
||||||
{workingMode === 'manga'
|
<Link to="/library" style={{ color: 'inherit', textDecoration: 'none' }}>
|
||||||
&& (
|
<ListItem button key="Library">
|
||||||
<>
|
<ListItemIcon>
|
||||||
<Link to="/library" style={{ color: 'inherit', textDecoration: 'none' }}>
|
<CollectionsBookmarkIcon />
|
||||||
<ListItem button key="Library">
|
</ListItemIcon>
|
||||||
<ListItemIcon>
|
<ListItemText primary="Library" />
|
||||||
<CollectionsBookmarkIcon />
|
</ListItem>
|
||||||
</ListItemIcon>
|
</Link>
|
||||||
<ListItemText primary="Library" />
|
|
||||||
</ListItem>
|
|
||||||
</Link>
|
|
||||||
|
|
||||||
<Link to="/updates" style={{ color: 'inherit', textDecoration: 'none' }}>
|
<Link to="/updates" style={{ color: 'inherit', textDecoration: 'none' }}>
|
||||||
<ListItem button key="Updates">
|
<ListItem button key="Updates">
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<NewReleasesIcon />
|
<NewReleasesIcon />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText primary="Updates" />
|
<ListItemText primary="Updates" />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
|
||||||
)}
|
<Link to="/manga/extensions" style={{ color: 'inherit', textDecoration: 'none' }}>
|
||||||
<Link to={`/${workingMode}/extensions`} style={{ color: 'inherit', textDecoration: 'none' }}>
|
|
||||||
<ListItem button key="Extensions">
|
<ListItem button key="Extensions">
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<ExtensionIcon />
|
<ExtensionIcon />
|
||||||
@@ -93,7 +75,7 @@ export default function TemporaryDrawer({ drawerOpen, setDrawerOpen }: IProps) {
|
|||||||
<ListItemText primary="Extensions" />
|
<ListItemText primary="Extensions" />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</Link>
|
</Link>
|
||||||
<Link to={`/${workingMode}/sources`} style={{ color: 'inherit', textDecoration: 'none' }}>
|
<Link to="/manga/sources" style={{ color: 'inherit', textDecoration: 'none' }}>
|
||||||
<ListItem button key="Sources">
|
<ListItem button key="Sources">
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<ExploreIcon />
|
<ExploreIcon />
|
||||||
@@ -101,17 +83,14 @@ export default function TemporaryDrawer({ drawerOpen, setDrawerOpen }: IProps) {
|
|||||||
<ListItemText primary="Sources" />
|
<ListItemText primary="Sources" />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</Link>
|
</Link>
|
||||||
{workingMode === 'manga'
|
<Link to="/manga/downloads" style={{ color: 'inherit', textDecoration: 'none' }}>
|
||||||
&& (
|
<ListItem button key="Manga Download Queue">
|
||||||
<Link to="/manga/downloads" style={{ color: 'inherit', textDecoration: 'none' }}>
|
<ListItemIcon>
|
||||||
<ListItem button key="Manga Download Queue">
|
<GetAppIcon />
|
||||||
<ListItemIcon>
|
</ListItemIcon>
|
||||||
<GetAppIcon />
|
<ListItemText primary="Downloads" />
|
||||||
</ListItemIcon>
|
</ListItem>
|
||||||
<ListItemText primary="Downloads" />
|
</Link>
|
||||||
</ListItem>
|
|
||||||
</Link>
|
|
||||||
)}
|
|
||||||
<Link to="/settings" style={{ color: 'inherit', textDecoration: 'none' }}>
|
<Link to="/settings" style={{ color: 'inherit', textDecoration: 'none' }}>
|
||||||
<ListItem button key="settings">
|
<ListItem button key="settings">
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
@@ -120,13 +99,6 @@ export default function TemporaryDrawer({ drawerOpen, setDrawerOpen }: IProps) {
|
|||||||
<ListItemText primary="Settings" />
|
<ListItemText primary="Settings" />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</Link>
|
</Link>
|
||||||
<ListItem button key="SwitchMode" onClick={switchMode}>
|
|
||||||
<ListItemIcon>
|
|
||||||
{workingMode === 'manga' && <VideoLibraryOutlinedIcon />}
|
|
||||||
{workingMode === 'anime' && <CollectionsBookmarkOutlinedIcon />}
|
|
||||||
</ListItemIcon>
|
|
||||||
<ListItemText primary={`Switch to ${otherMode()}`} />
|
|
||||||
</ListItem>
|
|
||||||
</List>
|
</List>
|
||||||
</div>
|
</div>
|
||||||
</Drawer>
|
</Drawer>
|
||||||
|
|||||||
Reference in New Issue
Block a user