From 5d7741c2afa48cec30a4ac246cd336b6cf73657f Mon Sep 17 00:00:00 2001 From: Daniel Shleifman Date: Tue, 29 Jun 2021 11:10:14 +0300 Subject: [PATCH] about dialog updated --- web/src/components/About/LinkComponent.jsx | 17 ++++++++++ web/src/components/About/NameComponent.jsx | 17 ---------- web/src/components/About/index.jsx | 36 ++++++++++++---------- web/src/components/About/style.js | 24 ++++++--------- web/src/locales/en/translation.json | 4 ++- web/src/locales/ru/translation.json | 4 ++- 6 files changed, 52 insertions(+), 50 deletions(-) create mode 100644 web/src/components/About/LinkComponent.jsx delete mode 100644 web/src/components/About/NameComponent.jsx diff --git a/web/src/components/About/LinkComponent.jsx b/web/src/components/About/LinkComponent.jsx new file mode 100644 index 0000000..c46c6a7 --- /dev/null +++ b/web/src/components/About/LinkComponent.jsx @@ -0,0 +1,17 @@ +import { GitHub as GitHubIcon } from '@material-ui/icons' + +import { LinkWrapper, LinkIcon } from './style' + +export default function LinkComponent({ name, link }) { + return ( + + {link && ( + + + + )} + +
{name}
+
+ ) +} diff --git a/web/src/components/About/NameComponent.jsx b/web/src/components/About/NameComponent.jsx deleted file mode 100644 index d36021b..0000000 --- a/web/src/components/About/NameComponent.jsx +++ /dev/null @@ -1,17 +0,0 @@ -import { GitHub as GitHubIcon } from '@material-ui/icons' - -import { NameWrapper, NameIcon } from './style' - -export default function NameComponent({ name, link }) { - return ( - - {link && ( - - - - )} - - {name} - - ) -} diff --git a/web/src/components/About/index.jsx b/web/src/components/About/index.jsx index db96256..73f87a9 100644 --- a/web/src/components/About/index.jsx +++ b/web/src/components/About/index.jsx @@ -6,12 +6,11 @@ import ListItem from '@material-ui/core/ListItem' import ListItemIcon from '@material-ui/core/ListItemIcon' import ListItemText from '@material-ui/core/ListItemText' import { useTranslation } from 'react-i18next' -import { GitHub as GitHubIcon } from '@material-ui/icons' import { useMediaQuery } from '@material-ui/core' -import NameComponent from './NameComponent' +import LinkComponent from './LinkComponent' import tsIcon from './ts-icon-192x192.png' -import { DialogWrapper, HeaderSection, ThanksSection, SpecialThanksSection, FooterSection } from './style' +import { DialogWrapper, HeaderSection, ThanksSection, Section, FooterSection } from './style' export default function AboutDialog() { const { t } = useTranslation() @@ -43,27 +42,30 @@ export default function AboutDialog() {
{t('ThanksToEveryone')} - +
+ {t('Links')} + +
+ + + +
+
+ +
{t('SpecialThanks')}
- - - - - + + + + +
- +
- - - - diff --git a/web/src/components/About/style.js b/web/src/components/About/style.js index 343e5a1..7075720 100644 --- a/web/src/components/About/style.js +++ b/web/src/components/About/style.js @@ -44,8 +44,8 @@ export const ThanksSection = styled.section` } ` -export const SpecialThanksSection = styled.section` - padding: 40px 20px; +export const Section = styled.section` + padding: 20px; color: #323637; > span { @@ -54,6 +54,10 @@ export const SpecialThanksSection = styled.section` margin-bottom: 15px; } + a { + text-decoration: none; + } + > div { display: grid; gap: 10px; @@ -75,20 +79,12 @@ export const SpecialThanksSection = styled.section` export const FooterSection = styled.div` padding: 20px; - display: grid; - grid-auto-flow: column; - grid-template-columns: repeat(2, max-content); - justify-content: end; - gap: 15px; - align-self: end; + display: flex; + justify-content: flex-end; background: #e8e5eb; - - a { - text-decoration: none; - } ` -export const NameWrapper = styled.a` +export const LinkWrapper = styled.a` ${({ isLink }) => css` display: inline-flex; align-items: center; @@ -122,7 +118,7 @@ export const NameWrapper = styled.a` `} ` -export const NameIcon = styled.div` +export const LinkIcon = styled.div` display: grid; margin-right: 10px; ` diff --git a/web/src/locales/en/translation.json b/web/src/locales/en/translation.json index 3569292..bc7bbb2 100644 --- a/web/src/locales/en/translation.json +++ b/web/src/locales/en/translation.json @@ -62,6 +62,7 @@ "Host": "Host", "Info": "Info", "LatestFilePlayed": "Latest file played:", + "Links": "Links", "Name": "Name", "NoTorrentsAdded": "No torrents added", "Offline": "Offline", @@ -74,8 +75,9 @@ "PiecesLength": "Pieces length", "Preload": "Preload", "PreloadBuffer": "Preload Buffer", - "ProjectSource": "Project source", + "ProjectSource": "Project page", "ReaderReadAHead": "Reader Read Ahead (5-100%)", + "Releases": "Releases", "RemoveAll": "Remove All", "RemoveCacheOnDrop": "Remove Cache from Disk on Drop Torrent", "RemoveCacheOnDropDesc": "If disabled, remove cache on delete torrent.", diff --git a/web/src/locales/ru/translation.json b/web/src/locales/ru/translation.json index eb7e522..7a575db 100644 --- a/web/src/locales/ru/translation.json +++ b/web/src/locales/ru/translation.json @@ -62,6 +62,7 @@ "Host": "Хост", "Info": "Инфо", "LatestFilePlayed": "Последний воспроизведенный файл:", + "Links": "Ссылки", "Name": "Название", "NoTorrentsAdded": "Нет торрентов", "Offline": "Сервер не доступен", @@ -74,8 +75,9 @@ "PiecesLength": "Размер блока", "Preload": "Предзагр.", "PreloadBuffer": "Наполнять кеш перед началом воспроизведения", - "ProjectSource": "Проект", + "ProjectSource": "Сайт проекта", "ReaderReadAHead": "Кеш предзагрузки (5-100%, рек. 95%)", + "Releases": "Релизы", "RemoveAll": "Удалить все", "RemoveCacheOnDrop": "Очищать кеш на диске при отключении торрента", "RemoveCacheOnDropDesc": "Если отключено, кэш очищается при удалении торрента.",