fix links to work on a bare host (#132)
This commit is contained in:
@@ -7,8 +7,20 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ListItem, { ListItemProps } from '@mui/material/ListItem';
|
import ListItem, { ListItemProps } from '@mui/material/ListItem';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
export default function ListItemLink(props: ListItemProps<'a', { button?: true }>) {
|
export default function ListItemLink(props: ListItemProps<Link, {}>) {
|
||||||
|
return (
|
||||||
|
<ListItem
|
||||||
|
// @ts-ignore
|
||||||
|
// sx={{ color: 'white', textDecoration: 'none', '-webkit-text-decoration': 'none' }}
|
||||||
|
// @ts-ignore
|
||||||
|
button
|
||||||
|
component={Link}
|
||||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||||
return <ListItem button component="a" {...props} />;
|
{...props}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||||
|
// return <ListItem button component="a" {...props} />;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,13 +60,13 @@ export default function Settings() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<List sx={{ padding: 0 }}>
|
<List sx={{ padding: 0 }}>
|
||||||
<ListItemLink href="/settings/categories">
|
<ListItemLink to="/settings/categories">
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<ListAltIcon />
|
<ListAltIcon />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText primary="Categories" />
|
<ListItemText primary="Categories" />
|
||||||
</ListItemLink>
|
</ListItemLink>
|
||||||
<ListItemLink href="/settings/backup">
|
<ListItemLink to="/settings/backup">
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<BackupIcon />
|
<BackupIcon />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
@@ -134,7 +134,7 @@ export default function Settings() {
|
|||||||
</IconButton>
|
</IconButton>
|
||||||
</ListItemSecondaryAction>
|
</ListItemSecondaryAction>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItemLink href="/settings/about">
|
<ListItemLink to="/settings/about">
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<InfoIcon />
|
<InfoIcon />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
|
|||||||
@@ -44,10 +44,10 @@ export default function About() {
|
|||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemText primary="Build time" secondary={buildTime()} />
|
<ListItemText primary="Build time" secondary={buildTime()} />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItemLink href={about.github}>
|
<ListItemLink to={about.github}>
|
||||||
<ListItemText primary="Github" secondary={about.github} />
|
<ListItemText primary="Github" secondary={about.github} />
|
||||||
</ListItemLink>
|
</ListItemLink>
|
||||||
<ListItemLink href={about.discord}>
|
<ListItemLink to={about.discord}>
|
||||||
<ListItemText primary="Discord" secondary={about.discord} />
|
<ListItemText primary="Discord" secondary={about.discord} />
|
||||||
</ListItemLink>
|
</ListItemLink>
|
||||||
</List>
|
</List>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export default function Backup() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<List sx={{ padding: 0 }}>
|
<List sx={{ padding: 0 }}>
|
||||||
<ListItemLink href={`${baseURL}/api/v1/backup/export/file`}>
|
<ListItemLink to={`${baseURL}/api/v1/backup/export/file`}>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary="Create Backup"
|
primary="Create Backup"
|
||||||
secondary="Backup library as a Tachiyomi backup"
|
secondary="Backup library as a Tachiyomi backup"
|
||||||
|
|||||||
Reference in New Issue
Block a user