feat: add possibility to remove torrent category

This commit is contained in:
LIAUD Corentin
2024-04-06 21:55:01 +02:00
parent fd83838e20
commit c8f272acab
8 changed files with 49 additions and 3 deletions

View File

@@ -167,6 +167,25 @@ https://github.com/vladlenas
Synology NAS packages repo source: https://grigi.lt Synology NAS packages repo source: https://grigi.lt
### Development
#### Go server
To run the Go server locally, just run
```bash
cd server
go run ./cmd
```
#### Web development
To run the web server locally, just run
```bash
yarn start
```
### Build ### Build
#### Server #### Server
@@ -262,7 +281,7 @@ local:127.0.0.1
- [FaintGhost](https://github.com/FaintGhost) Zhang Yaowei for Simplified Chinese web translation - [FaintGhost](https://github.com/FaintGhost) Zhang Yaowei for Simplified Chinese web translation
- [Anton111111](https://github.com/Anton111111) Anton Potekhin for sleep on Windows fixes - [Anton111111](https://github.com/Anton111111) Anton Potekhin for sleep on Windows fixes
- [lieranderl](https://github.com/lieranderl) Evgeni for adding SSL support code - [lieranderl](https://github.com/lieranderl) Evgeni for adding SSL support code
- [cocool97](https://github.com/cocool97) for openapi API documentation - [cocool97](https://github.com/cocool97) for openapi API documentation and torrent categories
- [shadeov](https://github.com/shadeov) for README improvements - [shadeov](https://github.com/shadeov) for README improvements
- [butaford](https://github.com/butaford) Pavel for make docker file and scripts - [butaford](https://github.com/butaford) Pavel for make docker file and scripts
- [filimonic](https://github.com/filimonic) Alexey D. Filimonov - [filimonic](https://github.com/filimonic) Alexey D. Filimonov

View File

@@ -11,7 +11,7 @@ import {
TextField, TextField,
useTheme, useTheme,
} from '@material-ui/core' } 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 { TORRENT_CATEGORIES } from 'components/categories'
import { import {
@@ -148,7 +148,21 @@ export default function RightSideComponent({
onChange={handleCategoryChange} onChange={handleCategoryChange}
variant='outlined' variant='outlined'
fullWidth fullWidth
defaultValue='other' defaultValue=''
IconComponent={
category.length > 1
? () => (
<IconButton
size='small'
onClick={(e) => {
setCategory("");
}}
>
<Clear />
</IconButton>
)
: undefined
}
> >
{TORRENT_CATEGORIES.map(category => ( {TORRENT_CATEGORIES.map(category => (
<MenuItem key={category.key} value={category.key}> <MenuItem key={category.key} value={category.key}>

View File

@@ -12,6 +12,7 @@ import AboutDialog from 'components/About'
import CloseServer from 'components/CloseServer' import CloseServer from 'components/CloseServer'
import { memo } from 'react' import { memo } from 'react'
import CheckIcon from '@material-ui/icons/Check' import CheckIcon from '@material-ui/icons/Check'
import ClearIcon from '@material-ui/icons/Clear'
import { TORRENT_CATEGORIES } from 'components/categories' import { TORRENT_CATEGORIES } from 'components/categories'
import FilterByCategory from 'components/FilterByCategory' import FilterByCategory from 'components/FilterByCategory'
@@ -47,6 +48,13 @@ const Sidebar = ({ isDrawerOpen, setIsDonationDialogOpen, isOffline, isLoading,
setGlobalFilterCategory={setGlobalFilterCategory} setGlobalFilterCategory={setGlobalFilterCategory}
/> />
))} ))}
<FilterByCategory
key='uncategorized'
categoryKey=''
categoryName={t('Uncategorized')}
icon={<ClearIcon />}
setGlobalFilterCategory={setGlobalFilterCategory}
/>
</List> </List>
<Divider /> <Divider />

View File

@@ -188,6 +188,7 @@
"TorrentStatus": "Статус на торента", "TorrentStatus": "Статус на торента",
"TorrentWorking": "Активен", "TorrentWorking": "Активен",
"TurnOff": "Изключване", "TurnOff": "Изключване",
"Uncategorized": "Некатегоризиран",
"UploadFile": "Качи файл", "UploadFile": "Качи файл",
"UploadSpeed": "Скорост на качване", "UploadSpeed": "Скорост на качване",
"Viewed": "Гледан" "Viewed": "Гледан"

View File

@@ -188,6 +188,7 @@
"TorrentStatus": "Torrent Status", "TorrentStatus": "Torrent Status",
"TorrentWorking": "Active", "TorrentWorking": "Active",
"TurnOff": "Turn Off", "TurnOff": "Turn Off",
"Uncategorized": "Uncategorized",
"UploadFile": "Upload File", "UploadFile": "Upload File",
"UploadSpeed": "Upload speed", "UploadSpeed": "Upload speed",
"Viewed": "Viewed" "Viewed": "Viewed"

View File

@@ -188,6 +188,7 @@
"TorrentStatus": "Состояние торрента", "TorrentStatus": "Состояние торрента",
"TorrentWorking": "Активен", "TorrentWorking": "Активен",
"TurnOff": "Выключить", "TurnOff": "Выключить",
"Uncategorized": "Без категории",
"UploadFile": "Загрузить файл", "UploadFile": "Загрузить файл",
"UploadSpeed": "Скорость отдачи", "UploadSpeed": "Скорость отдачи",
"Viewed": "Просм." "Viewed": "Просм."

View File

@@ -188,6 +188,7 @@
"TorrentStatus": "Статус торенту", "TorrentStatus": "Статус торенту",
"TorrentWorking": "Активний", "TorrentWorking": "Активний",
"TurnOff": "Виключити", "TurnOff": "Виключити",
"Uncategorized": "Без категорії",
"UploadFile": "Завантажити файл", "UploadFile": "Завантажити файл",
"UploadSpeed": "Швидкість відвантаження", "UploadSpeed": "Швидкість відвантаження",
"Viewed": "Перегл." "Viewed": "Перегл."

View File

@@ -188,6 +188,7 @@
"TorrentStatus": "种子状态", "TorrentStatus": "种子状态",
"TorrentWorking": "活跃", "TorrentWorking": "活跃",
"TurnOff": "关闭", "TurnOff": "关闭",
"Uncategorized": "未分类",
"UploadFile": "上传文件", "UploadFile": "上传文件",
"UploadSpeed": "上传速度", "UploadSpeed": "上传速度",
"Viewed": "查看" "Viewed": "查看"