mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
added key to .map
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -6,44 +6,44 @@ import DialogTitle from '@material-ui/core/DialogTitle'
|
||||
import DialogContent from '@material-ui/core/DialogContent'
|
||||
import { cacheHost } from '../utils/Hosts'
|
||||
|
||||
const style = {
|
||||
cache: {
|
||||
paddingLeft: "6px",
|
||||
paddingRight: "2px",
|
||||
lineHeight: "11px",
|
||||
},
|
||||
piece: {
|
||||
width: "12px",
|
||||
height: "12px",
|
||||
backgroundColor: "#eef2f4",
|
||||
border: "1px solid #eef2f4",
|
||||
display: "inline-block",
|
||||
marginRight: "1px",
|
||||
},
|
||||
pieceComplete: {
|
||||
backgroundColor: "#3fb57a",
|
||||
borderColor: "#3fb57a",
|
||||
},
|
||||
pieceLoading: {
|
||||
backgroundColor: "#00d0d0",
|
||||
borderColor: "#00d0d0",
|
||||
},
|
||||
readerRange: {
|
||||
borderColor: "#9a9aff !important",
|
||||
},
|
||||
pieceReader: {
|
||||
borderColor: "#000000 !important",
|
||||
},
|
||||
pieceProgress: {
|
||||
position: "relative",
|
||||
zIndex: "1",
|
||||
backgroundColor: "#009090",
|
||||
// const style = {
|
||||
// cache: {
|
||||
// paddingLeft: "6px",
|
||||
// paddingRight: "2px",
|
||||
// lineHeight: "11px",
|
||||
// },
|
||||
// piece: {
|
||||
// width: "12px",
|
||||
// height: "12px",
|
||||
// backgroundColor: "#eef2f4",
|
||||
// border: "1px solid #eef2f4",
|
||||
// display: "inline-block",
|
||||
// marginRight: "1px",
|
||||
// },
|
||||
// pieceComplete: {
|
||||
// backgroundColor: "#3fb57a",
|
||||
// borderColor: "#3fb57a",
|
||||
// },
|
||||
// pieceLoading: {
|
||||
// backgroundColor: "#00d0d0",
|
||||
// borderColor: "#00d0d0",
|
||||
// },
|
||||
// readerRange: {
|
||||
// borderColor: "#9a9aff !important",
|
||||
// },
|
||||
// pieceReader: {
|
||||
// borderColor: "#000000 !important",
|
||||
// },
|
||||
// pieceProgress: {
|
||||
// position: "relative",
|
||||
// zIndex: "1",
|
||||
// backgroundColor: "#009090",
|
||||
|
||||
left: "-1px",
|
||||
top: "-1px",
|
||||
width: "12px",
|
||||
},
|
||||
}
|
||||
// left: "-1px",
|
||||
// top: "-1px",
|
||||
// width: "12px",
|
||||
// },
|
||||
// }
|
||||
|
||||
export default function DialogCacheInfo(props) {
|
||||
const [hash] = React.useState(props.hash)
|
||||
@@ -101,7 +101,7 @@ export default function DialogCacheInfo(props) {
|
||||
return (
|
||||
<div>
|
||||
<DialogTitle id="form-dialog-title">
|
||||
<Typography fullWidth>
|
||||
<Typography>
|
||||
<b>Hash </b> {cache.Hash}
|
||||
<br />
|
||||
<b>Capacity </b> {humanizeSize(cache.Capacity)}
|
||||
@@ -125,7 +125,13 @@ export default function DialogCacheInfo(props) {
|
||||
</DialogTitle>
|
||||
<DialogContent>
|
||||
<div className="cache">
|
||||
{pMap.map((itm) => <span className={itm.class} title={itm.info}>{itm.prc>0 && itm.prc<100 && (<div className="piece-progress" style={{height: itm.prc/100*12+"px"}}></div>)}</span>)}
|
||||
{pMap.map(itm => (
|
||||
<span key={itm.info} className={itm.class} title={itm.info}>
|
||||
{itm.prc > 0 && itm.prc < 100 && (
|
||||
<div className="piece-progress" style={{ height: itm.prc / 100 * 12 + "px" }}></div>
|
||||
)}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</DialogContent>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user