mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
fix checkbox on dark theme and respect mini too
This commit is contained in:
@@ -54,7 +54,9 @@ export default function DetailedView({
|
|||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
control={
|
control={
|
||||||
<Checkbox
|
<Checkbox
|
||||||
|
color='primary'
|
||||||
checked={isSnakeDebugMode}
|
checked={isSnakeDebugMode}
|
||||||
|
disableRipple
|
||||||
onChange={({ target: { checked } }) => {
|
onChange={({ target: { checked } }) => {
|
||||||
setIsSnakeDebugMode(checked)
|
setIsSnakeDebugMode(checked)
|
||||||
localStorage.setItem('isSnakeDebugMode', checked)
|
localStorage.setItem('isSnakeDebugMode', checked)
|
||||||
@@ -62,6 +64,7 @@ export default function DetailedView({
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
label={t('DebugMode')}
|
label={t('DebugMode')}
|
||||||
|
labelPlacement='start'
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</SectionTitle>
|
</SectionTitle>
|
||||||
|
|||||||
@@ -91,16 +91,16 @@ const TorrentCache = ({ cache, isMini, isSnakeDebugMode }) => {
|
|||||||
ctx.strokeRect(0, 0, pieceSize, pieceSize)
|
ctx.strokeRect(0, 0, pieceSize, pieceSize)
|
||||||
ctx.setTransform(1, 0, 0, 1, 0, 0)
|
ctx.setTransform(1, 0, 0, 1, 0, 0)
|
||||||
|
|
||||||
if (!isMini && isSnakeDebugMode && priority > 0) {
|
if (isSnakeDebugMode && priority > 0) {
|
||||||
let info = ''
|
let info = ''
|
||||||
if (priority === 1) info = '*'
|
if (priority === 1) info = '*'
|
||||||
else if (priority === 2) info = 'H'
|
else if (priority === 2) info = 'H'
|
||||||
else if (priority === 3) info = 'R'
|
else if (priority === 3) info = 'R'
|
||||||
else if (priority === 4) info = 'N'
|
else if (priority === 4) info = 'N'
|
||||||
else if (priority === 5) info = 'A'
|
else if (priority === 5) info = 'A'
|
||||||
ctx.font = '10px monospace'
|
ctx.font = isMini ? '13px monospace' : '10px monospace'
|
||||||
const xpad = pieceSize * 0.28
|
const xpad = isMini ? pieceSize * 0.35 : pieceSize * 0.29
|
||||||
const ypad = pieceSize * 0.78
|
const ypad = isMini ? pieceSize * 0.69 : pieceSize * 0.78
|
||||||
ctx.fillStyle = 'black'
|
ctx.fillStyle = 'black'
|
||||||
ctx.fillText(info, x + xpad, y + ypad)
|
ctx.fillText(info, x + xpad, y + ypad)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
|||||||
const [playableFileList, setPlayableFileList] = useState()
|
const [playableFileList, setPlayableFileList] = useState()
|
||||||
const [seasonAmount, setSeasonAmount] = useState(null)
|
const [seasonAmount, setSeasonAmount] = useState(null)
|
||||||
const [selectedSeason, setSelectedSeason] = useState()
|
const [selectedSeason, setSelectedSeason] = useState()
|
||||||
|
const [isSnakeDebugMode] = useState(JSON.parse(localStorage.getItem('isSnakeDebugMode')) || false)
|
||||||
|
|
||||||
const {
|
const {
|
||||||
poster,
|
poster,
|
||||||
@@ -210,7 +211,7 @@ export default function DialogTorrentDetailsContent({ closeDialog, torrent }) {
|
|||||||
/>
|
/>
|
||||||
</SectionHeader>
|
</SectionHeader>
|
||||||
|
|
||||||
<TorrentCache isMini cache={cache} />
|
<TorrentCache isMini cache={cache} isSnakeDebugMode={isSnakeDebugMode} />
|
||||||
<Button
|
<Button
|
||||||
style={{ marginTop: '30px' }}
|
style={{ marginTop: '30px' }}
|
||||||
variant='contained'
|
variant='contained'
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
"RemoveViews": "Очистить просмотры",
|
"RemoveViews": "Очистить просмотры",
|
||||||
"Resolution": "Разреш.",
|
"Resolution": "Разреш.",
|
||||||
"Save": "Сохранить",
|
"Save": "Сохранить",
|
||||||
"ScrollDown": "прокрутить вниз",
|
"ScrollDown": "прокрутите вниз",
|
||||||
"Season": "Сезон",
|
"Season": "Сезон",
|
||||||
"Sec": "c",
|
"Sec": "c",
|
||||||
"Seconds": "Секунды",
|
"Seconds": "Секунды",
|
||||||
|
|||||||
Reference in New Issue
Block a user