add configure button to source card
This commit is contained in:
@@ -48,7 +48,7 @@ interface IProps {
|
||||
export default function SourceCard(props: IProps) {
|
||||
const {
|
||||
source: {
|
||||
id, name, lang, iconUrl, supportsLatest,
|
||||
id, name, lang, iconUrl, supportsLatest, isConfigurable,
|
||||
},
|
||||
} = props;
|
||||
|
||||
@@ -76,6 +76,7 @@ export default function SourceCard(props: IProps) {
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
{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>
|
||||
|
||||
Vendored
+1
@@ -26,6 +26,7 @@ interface ISource {
|
||||
iconUrl: string
|
||||
supportsLatest: boolean
|
||||
history: any
|
||||
isConfigurable: boolean
|
||||
}
|
||||
|
||||
interface IMangaCard {
|
||||
|
||||
Reference in New Issue
Block a user