From de8137bfbf419219755c61f51ff89c5a82df1a8a Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sat, 6 Apr 2024 05:14:27 +0300 Subject: [PATCH] update web for categories --- server/torr/apihelper.go | 5 +++-- web/src/components/Add/RightSideComponent.jsx | 10 +++++----- web/src/components/TorrentCard/index.jsx | 13 +++++------- web/src/components/TorrentCard/style.js | 20 ++++++++----------- web/src/components/categories.jsx | 4 ++-- web/src/locales/bg/translation.json | 9 +++++++++ web/src/locales/en/translation.json | 8 ++++++++ web/src/locales/ru/translation.json | 8 ++++++++ web/src/locales/ua/translation.json | 9 +++++++++ web/src/locales/zh/translation.json | 9 +++++++++ 10 files changed, 66 insertions(+), 29 deletions(-) diff --git a/server/torr/apihelper.go b/server/torr/apihelper.go index 178bed9..83dcffe 100644 --- a/server/torr/apihelper.go +++ b/server/torr/apihelper.go @@ -61,8 +61,8 @@ func AddTorrent(spec *torrent.TorrentSpec, title, poster string, data string, ca if torr.Category == "" { if torDB != nil { torr.Category = torDB.Category - } else { - torr.Category = "Unknown" + // } else { + // torr.Category = "None" } } @@ -72,6 +72,7 @@ func AddTorrent(spec *torrent.TorrentSpec, title, poster string, data string, ca torr.Poster = torDB.Poster } } + if torr.Data == "" { torr.Data = data if torr.Data == "" && torDB != nil { diff --git a/web/src/components/Add/RightSideComponent.jsx b/web/src/components/Add/RightSideComponent.jsx index 4f403f1..8a81f14 100644 --- a/web/src/components/Add/RightSideComponent.jsx +++ b/web/src/components/Add/RightSideComponent.jsx @@ -3,9 +3,9 @@ import { rgba } from 'polished' import { NoImageIcon } from 'icons' import { FormControl, + FormHelperText, IconButton, InputAdornment, - InputLabel, MenuItem, Select, TextField, @@ -136,19 +136,19 @@ export default function RightSideComponent({ variant='outlined' fullWidth /> - - Torrent category + + {t('AddDialog.CategoryHelperText')} +