From b770b06ed86aa4d8016f2d91b746ce69a8b2fbd5 Mon Sep 17 00:00:00 2001 From: ajnart Date: Mon, 23 Jan 2023 23:56:38 +0900 Subject: [PATCH 01/14] =?UTF-8?q?=F0=9F=92=84=20Docker=20module=20improvem?= =?UTF-8?q?ents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a keybind, made the text bigger, offeset the scrollbar, made the table take more space --- src/modules/Docker/DockerModule.tsx | 3 +++ src/modules/Docker/DockerTable.tsx | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/modules/Docker/DockerModule.tsx b/src/modules/Docker/DockerModule.tsx index cfffbed00a2..684178dd90f 100644 --- a/src/modules/Docker/DockerModule.tsx +++ b/src/modules/Docker/DockerModule.tsx @@ -1,4 +1,5 @@ import { ActionIcon, Drawer, Text, Tooltip } from '@mantine/core'; +import { useHotkeys } from '@mantine/hooks'; import { showNotification } from '@mantine/notifications'; import { IconBrandDocker, IconX } from '@tabler/icons'; import axios from 'axios'; @@ -17,6 +18,7 @@ export default function DockerMenuButton(props: any) { const [selection, setSelection] = useState([]); const { config } = useConfigContext(); const { classes } = useCardStyles(true); + useHotkeys([['mod+B', () => setOpened(!opened)]]); const dockerEnabled = config?.settings.customization.layout.enabledDocker || false; @@ -60,6 +62,7 @@ export default function DockerMenuButton(props: any) { <> setOpened(false)} padding="xl" position="right" diff --git a/src/modules/Docker/DockerTable.tsx b/src/modules/Docker/DockerTable.tsx index 2925e399051..70f597d2391 100644 --- a/src/modules/Docker/DockerTable.tsx +++ b/src/modules/Docker/DockerTable.tsx @@ -7,6 +7,7 @@ import { ScrollArea, TextInput, useMantineTheme, + Text, } from '@mantine/core'; import { useElementSize } from '@mantine/hooks'; import { IconSearch } from '@tabler/icons'; @@ -78,8 +79,16 @@ export default function DockerTable({ transitionDuration={0} /> - {element.Names[0].replace('/', '')} - {width > MIN_WIDTH_MOBILE && {element.Image}} + + + {element.Names[0].replace('/', '')} + + + {width > MIN_WIDTH_MOBILE && ( + + {element.Image} + + )} {width > MIN_WIDTH_MOBILE && ( @@ -111,12 +120,13 @@ export default function DockerTable({ }); return ( - + } value={search} + autoFocus onChange={handleSearchChange} /> From a16866b269d3e9ee879a9ada5dcba9e30c3488e5 Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Mon, 23 Jan 2023 20:35:59 +0100 Subject: [PATCH 02/14] =?UTF-8?q?=F0=9F=90=9B=20Fix=20incorrect=20wrapper?= =?UTF-8?q?=20position=20increment=20#630=20#621?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Overview/AvailableElementsOverview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Dashboard/Modals/SelectElement/Components/Overview/AvailableElementsOverview.tsx b/src/components/Dashboard/Modals/SelectElement/Components/Overview/AvailableElementsOverview.tsx index edb68982155..d746ae334f8 100644 --- a/src/components/Dashboard/Modals/SelectElement/Components/Overview/AvailableElementsOverview.tsx +++ b/src/components/Dashboard/Modals/SelectElement/Components/Overview/AvailableElementsOverview.tsx @@ -50,7 +50,7 @@ export const AvailableElementTypes = ({ { id: uuidv4(), // Thank you ChatGPT ;) - position: previousConfig.wrappers.length + 1, + position: previousConfig.categories.length + 1, }, ], categories: [ From b94488175ed73424759e485455c2da406625008e Mon Sep 17 00:00:00 2001 From: ajnart Date: Thu, 26 Jan 2023 23:23:11 +0900 Subject: [PATCH 03/14] Rework media display for Overseerr Looks a lot better on mobile, fixes #502 --- src/components/layout/header/Search.tsx | 43 ++++++++++++++++--------- src/modules/common/MediaDisplay.tsx | 4 +-- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/components/layout/header/Search.tsx b/src/components/layout/header/Search.tsx index 0cb7755d22d..f927e2dd4bd 100644 --- a/src/components/layout/header/Search.tsx +++ b/src/components/layout/header/Search.tsx @@ -13,6 +13,7 @@ import { import { useDebouncedValue, useHotkeys } from '@mantine/hooks'; import { showNotification } from '@mantine/notifications'; import { IconBrandYoutube, IconDownload, IconMovie, IconSearch } from '@tabler/icons'; +import { useQuery } from '@tanstack/react-query'; import axios from 'axios'; import { useTranslation } from 'next-i18next'; import React, { forwardRef, useEffect, useRef, useState } from 'react'; @@ -142,13 +143,25 @@ export function Search() { const [OverseerrResults, setOverseerrResults] = useState([]); const [opened, setOpened] = useState(false); - useEffect(() => { - if (debounced !== '' && selectedSearchEngine.value === 'overseerr' && searchQuery.length > 3) { - axios.get(`/api/modules/overseerr?query=${searchQuery}`).then((res) => { - setOverseerrResults(res.data.results ?? []); - }); + const { data, isLoading, error } = useQuery( + ['overseerr', debounced], + async () => { + if (debounced !== '' && selectedSearchEngine.value === 'overseerr' && debounced.length > 3) { + const res = await axios.get(`/api/modules/overseerr?query=${debounced}`); + return res.data.results ?? []; + } + return []; + }, + { + refetchOnWindowFocus: false, + refetchOnMount: false, + refetchInterval: false, } - }, [debounced]); + ); + + useEffect(() => { + setOverseerrResults(data ?? []); + }, [data]); const isModuleEnabled = config?.settings.customization.layout.enabledSearchbar; if (!isModuleEnabled) { @@ -207,16 +220,14 @@ export function Search() { /> -
- - {OverseerrResults.slice(0, 5).map((result, index) => ( - - - {index < OverseerrResults.length - 1 && } - - ))} - -
+ + {OverseerrResults.slice(0, 4).map((result, index) => ( + + + {index < OverseerrResults.length - 1 && index < 3 && } + + ))} +
diff --git a/src/modules/common/MediaDisplay.tsx b/src/modules/common/MediaDisplay.tsx index 7c3631b184c..7fea14508c2 100644 --- a/src/modules/common/MediaDisplay.tsx +++ b/src/modules/common/MediaDisplay.tsx @@ -180,7 +180,7 @@ export function MediaDisplay({ media }: { media: IMedia }) { const { t } = useTranslation('modules/common-media-cards'); return ( - + @@ -223,7 +223,7 @@ export function MediaDisplay({ media }: { media: IMedia }) { {media.overview} - + {media.plexUrl && (
- {data.torrents.map((concatenatedTorrentList) => { - const app = config?.apps.find((x) => x.id === concatenatedTorrentList.appId); - return concatenatedTorrentList.torrents - .filter(filter) - .map((item: NormalizedTorrent, index: number) => ( - - )); - })} + {torrents.map((torrent, index) => ( + + ))}
- {!data.allSuccess && ( + {data.apps.some((x) => !x.success) && ( {t('card.footer.error')} diff --git a/src/widgets/torrentNetworkTraffic/TorrentNetworkTrafficTile.tsx b/src/widgets/torrentNetworkTraffic/TorrentNetworkTrafficTile.tsx deleted file mode 100644 index 3b494d130b6..00000000000 --- a/src/widgets/torrentNetworkTraffic/TorrentNetworkTrafficTile.tsx +++ /dev/null @@ -1,198 +0,0 @@ -import { NormalizedTorrent } from '@ctrl/shared-torrent'; -import { Text, Title, Group, useMantineTheme, Box, Card, ColorSwatch, Stack } from '@mantine/core'; -import { useListState } from '@mantine/hooks'; -import { showNotification } from '@mantine/notifications'; -import { linearGradientDef } from '@nivo/core'; -import { Datum, ResponsiveLine } from '@nivo/line'; -import { IconArrowsUpDown } from '@tabler/icons'; -import axios from 'axios'; -import { useTranslation } from 'next-i18next'; -import { useEffect, useState } from 'react'; -import { useConfigContext } from '../../config/provider'; -import { useSetSafeInterval } from '../../hooks/useSetSafeInterval'; -import { humanFileSize } from '../../tools/humanFileSize'; -import { NormalizedTorrentListResponse } from '../../types/api/NormalizedTorrentListResponse'; -import { defineWidget } from '../helper'; -import { IWidget } from '../widgets'; - -const definition = defineWidget({ - id: 'dlspeed', - icon: IconArrowsUpDown, - options: {}, - - gridstack: { - minWidth: 2, - minHeight: 2, - maxWidth: 12, - maxHeight: 6, - }, - component: TorrentNetworkTrafficTile, -}); - -export type ITorrentNetworkTraffic = IWidget; - -interface TorrentNetworkTrafficTileProps { - widget: ITorrentNetworkTraffic; -} - -function TorrentNetworkTrafficTile({ widget }: TorrentNetworkTrafficTileProps) { - const { t } = useTranslation(`modules/${definition.id}`); - const { colors } = useMantineTheme(); - const setSafeInterval = useSetSafeInterval(); - const { configVersion, config } = useConfigContext(); - - const [torrentHistory, torrentHistoryHandlers] = useListState([]); - const [torrents, setTorrents] = useState([]); - - const downloadServices = - config?.apps.filter( - (app) => - app.integration.type === 'qBittorrent' || - app.integration.type === 'transmission' || - app.integration.type === 'deluge' - ) ?? []; - const totalDownloadSpeed = torrents.reduce((acc, torrent) => acc + torrent.downloadSpeed, 0); - const totalUploadSpeed = torrents.reduce((acc, torrent) => acc + torrent.uploadSpeed, 0); - - useEffect(() => { - if (downloadServices.length === 0) return; - const interval = setSafeInterval(() => { - // Send one request with each download service inside - axios - .post('/api/modules/torrents') - .then((response) => { - const responseData: NormalizedTorrentListResponse = response.data; - setTorrents(responseData.torrents.flatMap((x) => x.torrents)); - }) - .catch((error) => { - if (error.status === 401) return; - setTorrents([]); - // eslint-disable-next-line no-console - console.error('Error while fetching torrents', error.response.data); - showNotification({ - title: 'Torrent speed module failed to fetch torrents', - autoClose: 1000, - disallowClose: true, - id: 'fail-torrent-speed-module', - color: 'red', - message: - 'Error fetching torrents, please check your config for any potential errors, check the console for more info', - }); - clearInterval(interval); - }); - }, 1000); - }, [configVersion]); - - useEffect(() => { - torrentHistoryHandlers.append({ - x: Date.now(), - down: totalDownloadSpeed, - up: totalUploadSpeed, - }); - }, [totalDownloadSpeed, totalUploadSpeed]); - - const history = torrentHistory.slice(-10); - const chartDataUp = history.map((load, i) => ({ - x: load.x, - y: load.up, - })) as Datum[]; - const chartDataDown = history.map((load, i) => ({ - x: load.x, - y: load.down, - })) as Datum[]; - - return ( - - {t('card.lineChart.title')} - - - - - {t('card.lineChart.totalDownload', { download: humanFileSize(totalDownloadSpeed) })} - - - - - - {t('card.lineChart.totalUpload', { upload: humanFileSize(totalUploadSpeed) })} - - - - - { - const Download = slice.points[0].data.y as number; - const Upload = slice.points[1].data.y as number; - // Get the number of seconds since the last update. - const seconds = (Date.now() - (slice.points[0].data.x as number)) / 1000; - // Round to the nearest second. - const roundedSeconds = Math.round(seconds); - return ( - - {t('card.lineChart.timeSpan', { seconds: roundedSeconds })} - - - - - - {t('card.lineChart.download', { download: humanFileSize(Download) })} - - - - - - {t('card.lineChart.upload', { upload: humanFileSize(Upload) })} - - - - - - ); - }} - data={[ - { - id: 'downloads', - data: chartDataUp, - }, - { - id: 'uploads', - data: chartDataDown, - }, - ]} - curve="monotoneX" - yFormat=" >-.2f" - axisTop={null} - axisRight={null} - enablePoints={false} - animate={false} - enableGridX={false} - enableGridY={false} - enableArea - defs={[ - linearGradientDef('gradientA', [ - { offset: 0, color: 'inherit' }, - { offset: 100, color: 'inherit', opacity: 0 }, - ]), - ]} - fill={[{ match: '*', id: 'gradientA' }]} - colors={[colors.blue[5], colors.green[5]]} - /> - - - ); -} - -export default definition; - -interface TorrentHistory { - x: number; - up: number; - down: number; -} diff --git a/src/widgets/useNet/UsenetQueueList.tsx b/src/widgets/useNet/UsenetQueueList.tsx index 5fec4f8426a..aa3dc99e610 100644 --- a/src/widgets/useNet/UsenetQueueList.tsx +++ b/src/widgets/useNet/UsenetQueueList.tsx @@ -1,13 +1,11 @@ import { ActionIcon, Alert, - Button, Center, Code, Group, Pagination, Progress, - ScrollArea, Skeleton, Stack, Table, From 2d3169682011d515cec65adab046744f3d2297ac Mon Sep 17 00:00:00 2001 From: Thomas Camlong <49837342+ajnart@users.noreply.github.com> Date: Sun, 29 Jan 2023 04:52:54 +0900 Subject: [PATCH 09/14] =?UTF-8?q?=E2=9C=A8=20Add=20autocomplete=20to=20the?= =?UTF-8?q?=20icon=20selection=20screen=20(#647)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tabs/AppereanceTab/AppereanceTab.tsx | 10 +++++-- src/pages/api/getLocalImages.ts | 27 +++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 src/pages/api/getLocalImages.ts diff --git a/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx b/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx index 8e46d0f516d..461bcef8a87 100644 --- a/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx +++ b/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx @@ -1,5 +1,6 @@ -import { createStyles, Flex, Tabs, TextInput } from '@mantine/core'; +import { Autocomplete, createStyles, Flex, Tabs, TextInput } from '@mantine/core'; import { UseFormReturnType } from '@mantine/form'; +import { useQuery } from '@tanstack/react-query'; import { useTranslation } from 'next-i18next'; import { AppType } from '../../../../../../types/app'; import { DebouncedAppIcon } from '../Shared/DebouncedAppIcon'; @@ -18,16 +19,21 @@ export const AppearanceTab = ({ }: AppearanceTabProps) => { const { t } = useTranslation('layout/modals/add-app'); const { classes } = useStyles(); + const { isLoading, error, data } = useQuery({ + queryKey: ['autocompleteLocale'], + queryFn: () => fetch('/api/getLocalImages').then((res) => res.json()), + }); return ( - } label={t('appearance.icon.label')} description={t('appearance.icon.description')} variant="default" + data={isLoading ? [] : data.files} withAsterisk required {...form.getInputProps('appearance.iconUrl')} diff --git a/src/pages/api/getLocalImages.ts b/src/pages/api/getLocalImages.ts new file mode 100644 index 00000000000..94fea61c06f --- /dev/null +++ b/src/pages/api/getLocalImages.ts @@ -0,0 +1,27 @@ +import { NextApiRequest, NextApiResponse } from 'next'; +import fs from 'fs'; + +function Get(req: NextApiRequest, res: NextApiResponse) { + // Get the name of all the files in the /public/icons folder handle if the folder doesn't exist + if (!fs.existsSync('./public/icons')) { + return res.status(200).json({ + files: [], + }); + } + const files = fs.readdirSync('./public/icons'); + // Return the list of files with the /public/icons prefix + return res.status(200).json({ + files: files.map((file) => `/icons/${file}`), + }); +} + +export default async (req: NextApiRequest, res: NextApiResponse) => { + // Filter out if the reuqest is a POST or a GET + if (req.method === 'GET') { + return Get(req, res); + } + return res.status(405).json({ + statusCode: 405, + message: 'Method not allowed', + }); +}; From 118e3108845b0b9a05ee06ae5059f12e18e74210 Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Sat, 28 Jan 2023 20:56:18 +0100 Subject: [PATCH 10/14] =?UTF-8?q?=F0=9F=94=96=20Bump=20version=20from=200.?= =?UTF-8?q?11.2=20to=200.11.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/constants.ts | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/constants.ts b/data/constants.ts index 5556a89661c..b1ff95a4910 100644 --- a/data/constants.ts +++ b/data/constants.ts @@ -1,3 +1,3 @@ export const REPO_URL = 'ajnart/homarr'; -export const CURRENT_VERSION = 'v0.11.2'; +export const CURRENT_VERSION = 'v0.11.3'; export const ICON_PICKER_SLICE_LIMIT = 36; diff --git a/package.json b/package.json index 41ffd4c40cc..ea144ed3e0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homarr", - "version": "0.11.2", + "version": "0.11.3", "description": "Homarr - A homepage for your server.", "license": "MIT", "repository": { From 52a1dc552311fb33c96b23a084091722ddec3946 Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Sat, 28 Jan 2023 21:03:57 +0100 Subject: [PATCH 11/14] =?UTF-8?q?=F0=9F=92=84=20Fix=20margin=20for=20categ?= =?UTF-8?q?ory=20accordeon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dashboard/Wrappers/Category/Category.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Dashboard/Wrappers/Category/Category.tsx b/src/components/Dashboard/Wrappers/Category/Category.tsx index ff8ed886b97..f2fda5028c2 100644 --- a/src/components/Dashboard/Wrappers/Category/Category.tsx +++ b/src/components/Dashboard/Wrappers/Category/Category.tsx @@ -30,7 +30,7 @@ export const DashboardCategory = ({ category }: DashboardCategoryProps) => { classNames={{ item: cardClasses.card, }} - mx={0} + mx={10} chevronPosition="left" multiple value={isEditMode ? categoryList : toggledCategories} From dabb7c2409d74ab9c47ef9869fc0197fb4f6310e Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Sat, 28 Jan 2023 23:01:15 +0100 Subject: [PATCH 12/14] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Pull=20request=20fee?= =?UTF-8?q?dback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tabs/AppereanceTab/AppereanceTab.tsx | 2 +- .../Wrappers/Category/useCategoryActions.tsx | 2 +- src/components/layout/header/Search.tsx | 19 ++++++++++--------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx b/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx index 461bcef8a87..94da0611af8 100644 --- a/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx +++ b/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx @@ -33,7 +33,7 @@ export const AppearanceTab = ({ label={t('appearance.icon.label')} description={t('appearance.icon.description')} variant="default" - data={isLoading ? [] : data.files} + data={data.files ?? []} withAsterisk required {...form.getInputProps('appearance.iconUrl')} diff --git a/src/components/Dashboard/Wrappers/Category/useCategoryActions.tsx b/src/components/Dashboard/Wrappers/Category/useCategoryActions.tsx index 925f825be2a..2ea0698ee79 100644 --- a/src/components/Dashboard/Wrappers/Category/useCategoryActions.tsx +++ b/src/components/Dashboard/Wrappers/Category/useCategoryActions.tsx @@ -184,7 +184,7 @@ export const useCategoryActions = (configName: string | undefined, category: Cat if (!configName) return; updateConfig( configName, - (previous): ConfigType => { + (previous) => { const currentItem = previous.categories.find((x) => x.id === category.id); if (!currentItem) return previous; // Find the main wrapper diff --git a/src/components/layout/header/Search.tsx b/src/components/layout/header/Search.tsx index f927e2dd4bd..bf9753425d9 100644 --- a/src/components/layout/header/Search.tsx +++ b/src/components/layout/header/Search.tsx @@ -140,10 +140,13 @@ export function Search() { const openInNewTab = config?.settings.common.searchEngine.properties.openInNewTab ? '_blank' : '_self'; - const [OverseerrResults, setOverseerrResults] = useState([]); const [opened, setOpened] = useState(false); - const { data, isLoading, error } = useQuery( + const { + data: OverseerrResults, + isLoading, + error, + } = useQuery( ['overseerr', debounced], async () => { if (debounced !== '' && selectedSearchEngine.value === 'overseerr' && debounced.length > 3) { @@ -159,10 +162,6 @@ export function Search() { } ); - useEffect(() => { - setOverseerrResults(data ?? []); - }, [data]); - const isModuleEnabled = config?.settings.customization.layout.enabledSearchbar; if (!isModuleEnabled) { return null; @@ -172,7 +171,7 @@ export function Search() { return ( 0 && opened && searchQuery.length > 3} + opened={OverseerrResults && OverseerrResults.length > 0 && opened && searchQuery.length > 3} position="bottom" withinPortal shadow="md" @@ -221,10 +220,12 @@ export function Search() { - {OverseerrResults.slice(0, 4).map((result, index) => ( + {OverseerrResults && OverseerrResults.slice(0, 4).map((result: any, index: number) => ( - {index < OverseerrResults.length - 1 && index < 3 && } + {index < OverseerrResults.length - 1 && index < 3 && ( + + )} ))} From 67ee1bfb9d4e62414fcd55cda9114fbd7dbf1e9e Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Sun, 29 Jan 2023 14:21:35 +0100 Subject: [PATCH 13/14] =?UTF-8?q?=F0=9F=90=9B=20Fix=20crash=20and=20missin?= =?UTF-8?q?g=20translations=20with=20icon=20picker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/locales/en/layout/modals/icon-picker.json | 7 +++++++ .../EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx | 2 +- .../Tabs/AppereanceTab/IconSelector/IconSelector.tsx | 2 +- src/tools/translation-namespaces.ts | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 public/locales/en/layout/modals/icon-picker.json diff --git a/public/locales/en/layout/modals/icon-picker.json b/public/locales/en/layout/modals/icon-picker.json new file mode 100644 index 00000000000..84f17ce545f --- /dev/null +++ b/public/locales/en/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "Search something...", + "searchLimitationTitle": "Limited to 30 results", + "searchLimitationMessage": "Search results were limited to 30 because there were too many matches" + } +} \ No newline at end of file diff --git a/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx b/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx index 94da0611af8..f74ab7d60da 100644 --- a/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx +++ b/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/AppereanceTab.tsx @@ -33,7 +33,7 @@ export const AppearanceTab = ({ label={t('appearance.icon.label')} description={t('appearance.icon.description')} variant="default" - data={data.files ?? []} + data={data?.files ?? []} withAsterisk required {...form.getInputProps('appearance.iconUrl')} diff --git a/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/IconSelector/IconSelector.tsx b/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/IconSelector/IconSelector.tsx index 8ec13cbb39d..ee853678a89 100644 --- a/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/IconSelector/IconSelector.tsx +++ b/src/components/Dashboard/Modals/EditAppModal/Tabs/AppereanceTab/IconSelector/IconSelector.tsx @@ -31,7 +31,7 @@ interface IconSelectorProps { } export const IconSelector = ({ onChange, allowAppNamePropagation, form }: IconSelectorProps) => { - const { t } = useTranslation('layout/tools'); + const { t } = useTranslation('layout/modals/icon-picker'); const { data, isLoading } = useRepositoryIconsQuery({ url: 'https://api.github.com/repos/walkxcode/Dashboard-Icons/contents/png', diff --git a/src/tools/translation-namespaces.ts b/src/tools/translation-namespaces.ts index facb3cbd4fd..6748c77dcc0 100644 --- a/src/tools/translation-namespaces.ts +++ b/src/tools/translation-namespaces.ts @@ -1,9 +1,9 @@ export const dashboardNamespaces = [ 'common', - 'layout/tools', 'layout/element-selector/selector', 'layout/modals/add-app', 'layout/modals/change-position', + 'layout/modals/icon-picker', 'layout/modals/about', 'layout/header/actions/toggle-edit-mode', 'layout/mobile/drawer', From cf45b4c82c3c996e48ab36e6ac39a362833f9ca6 Mon Sep 17 00:00:00 2001 From: Thomas Camlong <49837342+ajnart@users.noreply.github.com> Date: Mon, 30 Jan 2023 00:09:35 +0900 Subject: [PATCH 14/14] =?UTF-8?q?=F0=9F=8C=90=20New=20Crowdin=20updates=20?= =?UTF-8?q?(#617)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/locales/da/layout/modals/icon-picker.json | 7 +++++++ public/locales/de/layout/modals/icon-picker.json | 7 +++++++ public/locales/el/layout/modals/icon-picker.json | 7 +++++++ public/locales/el/settings/common.json | 2 +- public/locales/el/settings/general/config-changer.json | 2 +- public/locales/es/layout/modals/icon-picker.json | 7 +++++++ public/locales/fr/layout/modals/icon-picker.json | 7 +++++++ public/locales/he/layout/modals/icon-picker.json | 7 +++++++ public/locales/it/layout/modals/icon-picker.json | 7 +++++++ public/locales/it/modules/torrents-status.json | 8 ++++---- public/locales/ja/layout/modals/icon-picker.json | 7 +++++++ public/locales/ko/layout/modals/icon-picker.json | 7 +++++++ public/locales/lol/layout/modals/icon-picker.json | 7 +++++++ public/locales/nl/layout/modals/icon-picker.json | 7 +++++++ public/locales/pl/layout/modals/icon-picker.json | 7 +++++++ public/locales/pt/layout/modals/icon-picker.json | 7 +++++++ public/locales/ru/layout/modals/icon-picker.json | 7 +++++++ public/locales/sl/layout/modals/icon-picker.json | 7 +++++++ public/locales/sv/layout/modals/about.json | 2 +- public/locales/sv/layout/modals/add-app.json | 2 +- public/locales/sv/layout/modals/change-position.json | 4 ++-- public/locales/sv/layout/modals/icon-picker.json | 7 +++++++ public/locales/sv/modules/dashdot.json | 2 +- public/locales/uk/layout/modals/icon-picker.json | 7 +++++++ public/locales/uk/modules/torrents-status.json | 4 ++-- public/locales/vi/layout/modals/icon-picker.json | 7 +++++++ public/locales/zh/layout/modals/icon-picker.json | 7 +++++++ public/locales/zh/settings/common.json | 2 +- 28 files changed, 147 insertions(+), 14 deletions(-) create mode 100644 public/locales/da/layout/modals/icon-picker.json create mode 100644 public/locales/de/layout/modals/icon-picker.json create mode 100644 public/locales/el/layout/modals/icon-picker.json create mode 100644 public/locales/es/layout/modals/icon-picker.json create mode 100644 public/locales/fr/layout/modals/icon-picker.json create mode 100644 public/locales/he/layout/modals/icon-picker.json create mode 100644 public/locales/it/layout/modals/icon-picker.json create mode 100644 public/locales/ja/layout/modals/icon-picker.json create mode 100644 public/locales/ko/layout/modals/icon-picker.json create mode 100644 public/locales/lol/layout/modals/icon-picker.json create mode 100644 public/locales/nl/layout/modals/icon-picker.json create mode 100644 public/locales/pl/layout/modals/icon-picker.json create mode 100644 public/locales/pt/layout/modals/icon-picker.json create mode 100644 public/locales/ru/layout/modals/icon-picker.json create mode 100644 public/locales/sl/layout/modals/icon-picker.json create mode 100644 public/locales/sv/layout/modals/icon-picker.json create mode 100644 public/locales/uk/layout/modals/icon-picker.json create mode 100644 public/locales/vi/layout/modals/icon-picker.json create mode 100644 public/locales/zh/layout/modals/icon-picker.json diff --git a/public/locales/da/layout/modals/icon-picker.json b/public/locales/da/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/da/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/de/layout/modals/icon-picker.json b/public/locales/de/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/de/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/el/layout/modals/icon-picker.json b/public/locales/el/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/el/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/el/settings/common.json b/public/locales/el/settings/common.json index 3576da775df..d5ae45d9134 100644 --- a/public/locales/el/settings/common.json +++ b/public/locales/el/settings/common.json @@ -2,7 +2,7 @@ "title": "Ρυθμίσεις", "tooltip": "Ρυθμίσεις", "tabs": { - "common": "Συχνά", + "common": "Συχνές επιλογές", "customizations": "Παραμετροποιήσεις" }, "tips": { diff --git a/public/locales/el/settings/general/config-changer.json b/public/locales/el/settings/general/config-changer.json index 86b6a9a0672..4fe61e49c6f 100644 --- a/public/locales/el/settings/general/config-changer.json +++ b/public/locales/el/settings/general/config-changer.json @@ -62,7 +62,7 @@ } } }, - "saveCopy": "Αποθήκευση αντιγράφου" + "saveCopy": "Αποθηκεύστε ένα αντίγραφο" }, "dropzone": { "notifications": { diff --git a/public/locales/es/layout/modals/icon-picker.json b/public/locales/es/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/es/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/fr/layout/modals/icon-picker.json b/public/locales/fr/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/fr/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/he/layout/modals/icon-picker.json b/public/locales/he/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/he/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/it/layout/modals/icon-picker.json b/public/locales/it/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/it/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/it/modules/torrents-status.json b/public/locales/it/modules/torrents-status.json index 4b20d52fe5f..7b5ea8e30cb 100644 --- a/public/locales/it/modules/torrents-status.json +++ b/public/locales/it/modules/torrents-status.json @@ -18,7 +18,7 @@ "card": { "footer": { "error": "Errore", - "lastUpdated": "Ultimo aggiornamento {{time}} ago" + "lastUpdated": "Ultimo aggiornamento {{time}} fa" }, "table": { "header": { @@ -30,7 +30,7 @@ "progress": "Avanzamento" }, "item": { - "text": "Gestito da {{appName}}, rapporto {{ratio}}" + "text": "Gestito da {{appName}}, {{ratio}} ratio" }, "body": { "nothingFound": "Nessun torrent trovato" @@ -61,10 +61,10 @@ "introductionPrefix": "Gestito da", "metrics": { "queuePosition": "Posizione in coda - {{position}}", - "progress": "Progressi - {{progress}}%", + "progress": "Progresso - {{progress}}%", "totalSelectedSize": "Totale - {{totalSize}}", "state": "Stato - {{state}}", - "ratio": "Rapporto -", + "ratio": "Ratio -", "completed": "Completato" } } diff --git a/public/locales/ja/layout/modals/icon-picker.json b/public/locales/ja/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/ja/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/ko/layout/modals/icon-picker.json b/public/locales/ko/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/ko/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/lol/layout/modals/icon-picker.json b/public/locales/lol/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/lol/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/nl/layout/modals/icon-picker.json b/public/locales/nl/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/nl/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/pl/layout/modals/icon-picker.json b/public/locales/pl/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/pl/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/pt/layout/modals/icon-picker.json b/public/locales/pt/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/pt/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/ru/layout/modals/icon-picker.json b/public/locales/ru/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/ru/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/sl/layout/modals/icon-picker.json b/public/locales/sl/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/sl/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/sv/layout/modals/about.json b/public/locales/sv/layout/modals/about.json index e35dbbfed71..ffd97b0b8da 100644 --- a/public/locales/sv/layout/modals/about.json +++ b/public/locales/sv/layout/modals/about.json @@ -3,5 +3,5 @@ "i18n": "Laddade namnområden för I18n-översättningar", "locales": "Konfigurerade I18n lokalspråk", "contact": "Har du problem eller frågor? Kontakta oss!", - "addToDashboard": "Lägg till i instrumentpanel" + "addToDashboard": "Lägg till på instrumentpanel" } diff --git a/public/locales/sv/layout/modals/add-app.json b/public/locales/sv/layout/modals/add-app.json index 923c67f0db8..7f7c8b6e8e3 100644 --- a/public/locales/sv/layout/modals/add-app.json +++ b/public/locales/sv/layout/modals/add-app.json @@ -39,7 +39,7 @@ "appearance": { "icon": { "label": "Appikon", - "description": "Ikonen som kommer att visas på instrumentpanelen." + "description": "Ikon som kommer att visas på instrumentpanelen." } }, "integration": { diff --git a/public/locales/sv/layout/modals/change-position.json b/public/locales/sv/layout/modals/change-position.json index 5d1714b7553..2a358c34d3e 100644 --- a/public/locales/sv/layout/modals/change-position.json +++ b/public/locales/sv/layout/modals/change-position.json @@ -1,8 +1,8 @@ { - "xPosition": "X axel position", + "xPosition": "Position X-axel", "width": "Bredd", "height": "Höjd", - "yPosition": "Y axel position", + "yPosition": "Position Y-axel", "zeroOrHigher": "0 eller högre", "betweenXandY": "Mellan {{min}} och {{max}}" } \ No newline at end of file diff --git a/public/locales/sv/layout/modals/icon-picker.json b/public/locales/sv/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/sv/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/sv/modules/dashdot.json b/public/locales/sv/modules/dashdot.json index 2ae7fa75a3c..d6a019e5640 100644 --- a/public/locales/sv/modules/dashdot.json +++ b/public/locales/sv/modules/dashdot.json @@ -8,7 +8,7 @@ "label": "Flerkärnig CPU vy" }, "storageMultiView": { - "label": "Visning av flera lagrings enheter" + "label": "Visning av flera lagringsenheter" }, "useCompactView": { "label": "Använd kompakt vy" diff --git a/public/locales/uk/layout/modals/icon-picker.json b/public/locales/uk/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/uk/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/uk/modules/torrents-status.json b/public/locales/uk/modules/torrents-status.json index f6df3723070..69e8e03bc86 100644 --- a/public/locales/uk/modules/torrents-status.json +++ b/public/locales/uk/modules/torrents-status.json @@ -58,12 +58,12 @@ "title": "Завантаження..." }, "popover": { - "introductionPrefix": "Під керівництвом", + "introductionPrefix": "Керується", "metrics": { "queuePosition": "Позиція в черзі - {{position}}", "progress": "Прогрес - {{progress}}%.", "totalSelectedSize": "Всього - {{totalSize}}", - "state": "Держава - {{state}}", + "state": "Стан - {{state}}", "ratio": "Коефіцієнт -", "completed": "Завершено" } diff --git a/public/locales/vi/layout/modals/icon-picker.json b/public/locales/vi/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/vi/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/zh/layout/modals/icon-picker.json b/public/locales/zh/layout/modals/icon-picker.json new file mode 100644 index 00000000000..349810cb933 --- /dev/null +++ b/public/locales/zh/layout/modals/icon-picker.json @@ -0,0 +1,7 @@ +{ + "iconPicker": { + "textInputPlaceholder": "", + "searchLimitationTitle": "", + "searchLimitationMessage": "" + } +} \ No newline at end of file diff --git a/public/locales/zh/settings/common.json b/public/locales/zh/settings/common.json index f8d02828926..fffc224de74 100644 --- a/public/locales/zh/settings/common.json +++ b/public/locales/zh/settings/common.json @@ -22,7 +22,7 @@ "enablelsidebar": "启用左边的侧边栏", "enablesearchbar": "启用搜索栏", "enabledocker": "启用docker集成", - "enableping": "启用平移功能", + "enableping": "启用Ping功能", "enablelsidebardesc": "可选的。只能用于应用程序和集成", "enablersidebardesc": "可选的。只能用于应用程序和集成" }