mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
feat: add possibility to remove torrent category
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
TextField,
|
||||
useTheme,
|
||||
} from '@material-ui/core'
|
||||
import { HighlightOff as HighlightOffIcon } from '@material-ui/icons'
|
||||
import { HighlightOff as HighlightOffIcon, Clear } from '@material-ui/icons'
|
||||
import { TORRENT_CATEGORIES } from 'components/categories'
|
||||
|
||||
import {
|
||||
@@ -148,7 +148,21 @@ export default function RightSideComponent({
|
||||
onChange={handleCategoryChange}
|
||||
variant='outlined'
|
||||
fullWidth
|
||||
defaultValue='other'
|
||||
defaultValue=''
|
||||
IconComponent={
|
||||
category.length > 1
|
||||
? () => (
|
||||
<IconButton
|
||||
size='small'
|
||||
onClick={(e) => {
|
||||
setCategory("");
|
||||
}}
|
||||
>
|
||||
<Clear />
|
||||
</IconButton>
|
||||
)
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
{TORRENT_CATEGORIES.map(category => (
|
||||
<MenuItem key={category.key} value={category.key}>
|
||||
|
||||
@@ -12,6 +12,7 @@ import AboutDialog from 'components/About'
|
||||
import CloseServer from 'components/CloseServer'
|
||||
import { memo } from 'react'
|
||||
import CheckIcon from '@material-ui/icons/Check'
|
||||
import ClearIcon from '@material-ui/icons/Clear'
|
||||
import { TORRENT_CATEGORIES } from 'components/categories'
|
||||
import FilterByCategory from 'components/FilterByCategory'
|
||||
|
||||
@@ -47,6 +48,13 @@ const Sidebar = ({ isDrawerOpen, setIsDonationDialogOpen, isOffline, isLoading,
|
||||
setGlobalFilterCategory={setGlobalFilterCategory}
|
||||
/>
|
||||
))}
|
||||
<FilterByCategory
|
||||
key='uncategorized'
|
||||
categoryKey=''
|
||||
categoryName={t('Uncategorized')}
|
||||
icon={<ClearIcon />}
|
||||
setGlobalFilterCategory={setGlobalFilterCategory}
|
||||
/>
|
||||
</List>
|
||||
|
||||
<Divider />
|
||||
|
||||
@@ -188,6 +188,7 @@
|
||||
"TorrentStatus": "Статус на торента",
|
||||
"TorrentWorking": "Активен",
|
||||
"TurnOff": "Изключване",
|
||||
"Uncategorized": "Некатегоризиран",
|
||||
"UploadFile": "Качи файл",
|
||||
"UploadSpeed": "Скорост на качване",
|
||||
"Viewed": "Гледан"
|
||||
|
||||
@@ -188,6 +188,7 @@
|
||||
"TorrentStatus": "Torrent Status",
|
||||
"TorrentWorking": "Active",
|
||||
"TurnOff": "Turn Off",
|
||||
"Uncategorized": "Uncategorized",
|
||||
"UploadFile": "Upload File",
|
||||
"UploadSpeed": "Upload speed",
|
||||
"Viewed": "Viewed"
|
||||
|
||||
@@ -188,6 +188,7 @@
|
||||
"TorrentStatus": "Состояние торрента",
|
||||
"TorrentWorking": "Активен",
|
||||
"TurnOff": "Выключить",
|
||||
"Uncategorized": "Без категории",
|
||||
"UploadFile": "Загрузить файл",
|
||||
"UploadSpeed": "Скорость отдачи",
|
||||
"Viewed": "Просм."
|
||||
|
||||
@@ -188,6 +188,7 @@
|
||||
"TorrentStatus": "Статус торенту",
|
||||
"TorrentWorking": "Активний",
|
||||
"TurnOff": "Виключити",
|
||||
"Uncategorized": "Без категорії",
|
||||
"UploadFile": "Завантажити файл",
|
||||
"UploadSpeed": "Швидкість відвантаження",
|
||||
"Viewed": "Перегл."
|
||||
|
||||
@@ -188,6 +188,7 @@
|
||||
"TorrentStatus": "种子状态",
|
||||
"TorrentWorking": "活跃",
|
||||
"TurnOff": "关闭",
|
||||
"Uncategorized": "未分类",
|
||||
"UploadFile": "上传文件",
|
||||
"UploadSpeed": "上传速度",
|
||||
"Viewed": "查看"
|
||||
|
||||
Reference in New Issue
Block a user