add configure button to source card
This commit is contained in:
@@ -48,7 +48,7 @@ interface IProps {
|
|||||||
export default function SourceCard(props: IProps) {
|
export default function SourceCard(props: IProps) {
|
||||||
const {
|
const {
|
||||||
source: {
|
source: {
|
||||||
id, name, lang, iconUrl, supportsLatest,
|
id, name, lang, iconUrl, supportsLatest, isConfigurable,
|
||||||
},
|
},
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
@@ -76,6 +76,7 @@ export default function SourceCard(props: IProps) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ display: 'flex' }}>
|
<div style={{ display: 'flex' }}>
|
||||||
|
{isConfigurable && <Button variant="outlined" style={{ marginLeft: 20 }} onClick={() => { window.location.href = `/sources/${id}/latest/`; }}>Configure</Button>}
|
||||||
<Button variant="outlined" style={{ marginLeft: 20 }} onClick={() => { window.location.href = `/sources/${id}/search/`; }}>Search</Button>
|
<Button variant="outlined" style={{ marginLeft: 20 }} onClick={() => { window.location.href = `/sources/${id}/search/`; }}>Search</Button>
|
||||||
{supportsLatest && <Button variant="outlined" style={{ marginLeft: 20 }} onClick={() => { window.location.href = `/sources/${id}/latest/`; }}>Latest</Button>}
|
{supportsLatest && <Button variant="outlined" style={{ marginLeft: 20 }} onClick={() => { window.location.href = `/sources/${id}/latest/`; }}>Latest</Button>}
|
||||||
<Button variant="outlined" style={{ marginLeft: 20 }} onClick={() => { window.location.href = `/sources/${id}/popular/`; }}>Browse</Button>
|
<Button variant="outlined" style={{ marginLeft: 20 }} onClick={() => { window.location.href = `/sources/${id}/popular/`; }}>Browse</Button>
|
||||||
|
|||||||
Vendored
+1
@@ -26,6 +26,7 @@ interface ISource {
|
|||||||
iconUrl: string
|
iconUrl: string
|
||||||
supportsLatest: boolean
|
supportsLatest: boolean
|
||||||
history: any
|
history: any
|
||||||
|
isConfigurable: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IMangaCard {
|
interface IMangaCard {
|
||||||
|
|||||||
Reference in New Issue
Block a user