add EmptyView to DownloadQueue, refactro strings (#53)
* Added the Emty view message in the /download path * Changed a few expression to template string
This commit is contained in:
@@ -149,10 +149,7 @@ export default function ChapterCard(props: IProps) {
|
|||||||
{!chapter.bookmarked && 'Bookmark'}
|
{!chapter.bookmarked && 'Bookmark'}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem onClick={() => sendChange('read', !chapter.read)}>
|
<MenuItem onClick={() => sendChange('read', !chapter.read)}>
|
||||||
Mark as
|
{`Mark as ${chapter.read && 'unread'} ${!chapter.read && 'read'}`}
|
||||||
{' '}
|
|
||||||
{chapter.read && 'unread'}
|
|
||||||
{!chapter.read && 'read'}
|
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem onClick={() => sendChange('markPrevRead', true)}>
|
<MenuItem onClick={() => sendChange('markPrevRead', true)}>
|
||||||
Mark previous as Read
|
Mark previous as Read
|
||||||
|
|||||||
@@ -205,24 +205,18 @@ export default function MangaDetails(props: IProps) {
|
|||||||
{manga.title}
|
{manga.title}
|
||||||
</h1>
|
</h1>
|
||||||
<h3>
|
<h3>
|
||||||
Author:
|
{'Author: '}
|
||||||
{' '}
|
|
||||||
<span>{getValueOrUnknown(manga.author)}</span>
|
<span>{getValueOrUnknown(manga.author)}</span>
|
||||||
</h3>
|
</h3>
|
||||||
<h3>
|
<h3>
|
||||||
Artist:
|
{'Artist: '}
|
||||||
{' '}
|
|
||||||
<span>{getValueOrUnknown(manga.artist)}</span>
|
<span>{getValueOrUnknown(manga.artist)}</span>
|
||||||
</h3>
|
</h3>
|
||||||
<h3>
|
<h3>
|
||||||
Status:
|
{`Status: ${manga.status}`}
|
||||||
{' '}
|
|
||||||
{manga.status}
|
|
||||||
</h3>
|
</h3>
|
||||||
<h3>
|
<h3>
|
||||||
Source:
|
{`Source: ${getSourceName(manga.source)}`}
|
||||||
{' '}
|
|
||||||
{getSourceName(manga.source)}
|
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -332,13 +332,7 @@ export default function ReaderNavBar(props: IProps) {
|
|||||||
<hr />
|
<hr />
|
||||||
<div className={classes.navigation}>
|
<div className={classes.navigation}>
|
||||||
<span>
|
<span>
|
||||||
Currently on page
|
{`Currently on page ${curPage + 1} of ${chapter.pageCount}`}
|
||||||
{' '}
|
|
||||||
{curPage + 1}
|
|
||||||
{' '}
|
|
||||||
of
|
|
||||||
{' '}
|
|
||||||
{chapter.pageCount}
|
|
||||||
</span>
|
</span>
|
||||||
<div className={classes.navigationChapters}>
|
<div className={classes.navigationChapters}>
|
||||||
{chapter.index > 1
|
{chapter.index > 1
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import DragHandleIcon from '@mui/icons-material/DragHandle';
|
|||||||
import ListItem from '@mui/material/ListItem';
|
import ListItem from '@mui/material/ListItem';
|
||||||
import { ListItemIcon } from '@mui/material';
|
import { ListItemIcon } from '@mui/material';
|
||||||
import ListItemText from '@mui/material/ListItemText';
|
import ListItemText from '@mui/material/ListItemText';
|
||||||
|
import EmptyView from 'components/EmptyView';
|
||||||
|
|
||||||
const baseWebsocketUrl = JSON.parse(window.localStorage.getItem('serverBaseURL')!).replace('http', 'ws');
|
const baseWebsocketUrl = JSON.parse(window.localStorage.getItem('serverBaseURL')!).replace('http', 'ws');
|
||||||
|
|
||||||
@@ -91,6 +92,10 @@ export default function DownloadQueue() {
|
|||||||
const onDragEnd = (result: DropResult) => {
|
const onDragEnd = (result: DropResult) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (queue.length === 0) {
|
||||||
|
return <EmptyView message="No downloads" />;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<DragDropContext onDragEnd={onDragEnd}>
|
<DragDropContext onDragEnd={onDragEnd}>
|
||||||
|
|||||||
Reference in New Issue
Block a user