mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
show user categories in select on edit
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
|||||||
TextField,
|
TextField,
|
||||||
useTheme,
|
useTheme,
|
||||||
} from '@material-ui/core'
|
} from '@material-ui/core'
|
||||||
import { HighlightOff as HighlightOffIcon, Clear } from '@material-ui/icons'
|
import { HighlightOff as HighlightOffIcon } from '@material-ui/icons'
|
||||||
import { TORRENT_CATEGORIES } from 'components/categories'
|
import { TORRENT_CATEGORIES } from 'components/categories'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -69,6 +69,9 @@ export default function RightSideComponent({
|
|||||||
checkImageURL(url).then(setIsPosterUrlCorrect)
|
checkImageURL(url).then(setIsPosterUrlCorrect)
|
||||||
setIsUserInteractedWithPoster(true)
|
setIsUserInteractedWithPoster(true)
|
||||||
}
|
}
|
||||||
|
// main categories
|
||||||
|
const catIndex = TORRENT_CATEGORIES.findIndex(e => e.key === category)
|
||||||
|
// const catArray = TORRENT_CATEGORIES.find(e => e.key === category)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RightSide>
|
<RightSide>
|
||||||
@@ -168,6 +171,14 @@ export default function RightSideComponent({
|
|||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
{category.length > 1 && catIndex < 0 ? (
|
||||||
|
<MenuItem key={category} value={category}>
|
||||||
|
{t(category)}
|
||||||
|
</MenuItem>
|
||||||
|
) : (
|
||||||
|
''
|
||||||
|
)}
|
||||||
|
|
||||||
{TORRENT_CATEGORIES.map(category => (
|
{TORRENT_CATEGORIES.map(category => (
|
||||||
<MenuItem key={category.key} value={category.key}>
|
<MenuItem key={category.key} value={category.key}>
|
||||||
{t(category.name)}
|
{t(category.name)}
|
||||||
|
|||||||
Reference in New Issue
Block a user