mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +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
|
||||
control={
|
||||
<Checkbox
|
||||
color='primary'
|
||||
checked={isSnakeDebugMode}
|
||||
disableRipple
|
||||
onChange={({ target: { checked } }) => {
|
||||
setIsSnakeDebugMode(checked)
|
||||
localStorage.setItem('isSnakeDebugMode', checked)
|
||||
@@ -62,6 +64,7 @@ export default function DetailedView({
|
||||
/>
|
||||
}
|
||||
label={t('DebugMode')}
|
||||
labelPlacement='start'
|
||||
/>
|
||||
</div>
|
||||
</SectionTitle>
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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 }) {
|
||||
/>
|
||||
</SectionHeader>
|
||||
|
||||
<TorrentCache isMini cache={cache} />
|
||||
<TorrentCache isMini cache={cache} isSnakeDebugMode={isSnakeDebugMode} />
|
||||
<Button
|
||||
style={{ marginTop: '30px' }}
|
||||
variant='contained'
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
"RemoveViews": "Очистить просмотры",
|
||||
"Resolution": "Разреш.",
|
||||
"Save": "Сохранить",
|
||||
"ScrollDown": "прокрутить вниз",
|
||||
"ScrollDown": "прокрутите вниз",
|
||||
"Season": "Сезон",
|
||||
"Sec": "c",
|
||||
"Seconds": "Секунды",
|
||||
|
||||
Reference in New Issue
Block a user