feat(remote download): show download node in list page

This commit is contained in:
HFO4 2022-10-30 10:37:35 +08:00
parent d4e9d5926d
commit dc81a86ae8
5 changed files with 25 additions and 1 deletions

View File

@ -378,6 +378,7 @@
"InfoHash": "InfoHash: ",
"seederCount": "Seeders:",
"seeding": "Seeding: ",
"downloadNode": "Node: ",
"isSeeding": "Yes",
"notSeeding": "No",
"chunkSize": "Chunk size:",

View File

@ -378,6 +378,7 @@
"InfoHash": "InfoHash",
"seederCount": "做种者:",
"seeding": "做种中:",
"downloadNode": "节点:",
"isSeeding": "是",
"notSeeding": "否",
"chunkSize": "分片大小:",

View File

@ -158,9 +158,12 @@ const useStyles = makeStyles((theme) => ({
},
infoTitle: {
fontWeight: 700,
textAlign: "left",
},
infoValue: {
color: theme.palette.text.secondary,
textAlign: "left",
paddingLeft:theme.spacing(1),
},
bitmap: {
width: "100%",
@ -741,6 +744,14 @@ export default function DownloadingCard(props) {
{task.info.numPieces}
</Grid>
</Grid>
{props.task.node && <Grid container xs={12} sm={4}>
<Grid item xs={5} className={classes.infoTitle}>
{t("downloadNode")}
</Grid>
<Grid item xs={7} className={classes.infoValue}>
{props.task.node}
</Grid>
</Grid>}
</Grid>
</div>
</ExpansionPanelDetails>

View File

@ -155,9 +155,12 @@ const useStyles = makeStyles((theme) => ({
},
infoTitle: {
fontWeight: 700,
textAlign: "left",
},
infoValue: {
color: theme.palette.text.secondary,
textAlign: "left",
paddingLeft:theme.spacing(1),
},
}));
@ -470,6 +473,14 @@ export default function FinishedCard(props) {
{formatLocalTime(props.task.update)}
</Grid>
</Grid>
{props.task.node && <Grid container xs={12} sm={6}>
<Grid item xs={5} className={classes.infoTitle}>
{t("downloadNode")}
</Grid>
<Grid item xs={7} className={classes.infoValue}>
{props.task.node}
</Grid>
</Grid>}
</Grid>
</div>
</ExpansionPanelDetails>

View File

@ -11,7 +11,7 @@ import {
Checkbox,
} from "@material-ui/core";
import TextField from "@material-ui/core/TextField";
import { useTranslation } from "react-i18next";
import { useTranslation } from "react-i18next";
import { useInterval, usePrevious, useGetState } from "ahooks";
import { cancelDirectoryDownload } from "../../redux/explorer/action";
import Auth from "../../middleware/Auth";