diff --git a/web/src/components/DialogTorrentDetailsContent/DetailedView/index.jsx b/web/src/components/DialogTorrentDetailsContent/DetailedView/index.jsx index 5dc8e2b..a9d31f4 100644 --- a/web/src/components/DialogTorrentDetailsContent/DetailedView/index.jsx +++ b/web/src/components/DialogTorrentDetailsContent/DetailedView/index.jsx @@ -54,7 +54,9 @@ export default function DetailedView({ { setIsSnakeDebugMode(checked) localStorage.setItem('isSnakeDebugMode', checked) @@ -62,6 +64,7 @@ export default function DetailedView({ /> } label={t('DebugMode')} + labelPlacement='start' /> diff --git a/web/src/components/DialogTorrentDetailsContent/TorrentCache/index.jsx b/web/src/components/DialogTorrentDetailsContent/TorrentCache/index.jsx index ba21254..847cb70 100644 --- a/web/src/components/DialogTorrentDetailsContent/TorrentCache/index.jsx +++ b/web/src/components/DialogTorrentDetailsContent/TorrentCache/index.jsx @@ -91,16 +91,16 @@ const TorrentCache = ({ cache, isMini, isSnakeDebugMode }) => { ctx.strokeRect(0, 0, pieceSize, pieceSize) ctx.setTransform(1, 0, 0, 1, 0, 0) - if (!isMini && isSnakeDebugMode && priority > 0) { + if (isSnakeDebugMode && priority > 0) { let info = '' if (priority === 1) info = '*' else if (priority === 2) info = 'H' else if (priority === 3) info = 'R' else if (priority === 4) info = 'N' else if (priority === 5) info = 'A' - ctx.font = '10px monospace' - const xpad = pieceSize * 0.28 - const ypad = pieceSize * 0.78 + ctx.font = isMini ? '13px monospace' : '10px monospace' + const xpad = isMini ? pieceSize * 0.35 : pieceSize * 0.29 + const ypad = isMini ? pieceSize * 0.69 : pieceSize * 0.78 ctx.fillStyle = 'black' ctx.fillText(info, x + xpad, y + ypad) } diff --git a/web/src/components/DialogTorrentDetailsContent/index.jsx b/web/src/components/DialogTorrentDetailsContent/index.jsx index c4696f2..c761ba5 100644 --- a/web/src/components/DialogTorrentDetailsContent/index.jsx +++ b/web/src/components/DialogTorrentDetailsContent/index.jsx @@ -45,6 +45,7 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) { const [playableFileList, setPlayableFileList] = useState() const [seasonAmount, setSeasonAmount] = useState(null) const [selectedSeason, setSelectedSeason] = useState() + const [isSnakeDebugMode] = useState(JSON.parse(localStorage.getItem('isSnakeDebugMode')) || false) const { poster, @@ -210,7 +211,7 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) { /> - +