diff --git a/public/locales/en/modules/torrents-status.json b/public/locales/en/modules/torrents-status.json index 83d75d6dd..82e5e731f 100644 --- a/public/locales/en/modules/torrents-status.json +++ b/public/locales/en/modules/torrents-status.json @@ -1,9 +1,9 @@ { "descriptor": { - "name": "BitTorrent", + "name": "Torrent", "description": "Displays a list of the torrent which are currently downloading", "settings": { - "title": "Settings for BitTorrent integration", + "title": "Settings for Torrent integration", "refreshInterval": { "label": "Refresh interval (in seconds)" }, @@ -51,4 +51,4 @@ "title": "Loading..." } } -} \ No newline at end of file +} diff --git a/src/components/Dashboard/Modals/EditAppModal/Tabs/IntegrationTab/Components/IntegrationOptionsRenderer/IntegrationOptionsRenderer.tsx b/src/components/Dashboard/Modals/EditAppModal/Tabs/IntegrationTab/Components/IntegrationOptionsRenderer/IntegrationOptionsRenderer.tsx index c5ebc14af..0d8d4bfd9 100644 --- a/src/components/Dashboard/Modals/EditAppModal/Tabs/IntegrationTab/Components/IntegrationOptionsRenderer/IntegrationOptionsRenderer.tsx +++ b/src/components/Dashboard/Modals/EditAppModal/Tabs/IntegrationTab/Components/IntegrationOptionsRenderer/IntegrationOptionsRenderer.tsx @@ -52,7 +52,10 @@ export const IntegrationOptionsRenderer = ({ form }: IntegrationOptionsRendererP { form.setFieldValue(`integration.properties.${index}.value`, value); - form.setFieldValue(`integration.properties.${index}.isDefined`, value !== undefined); + form.setFieldValue( + `integration.properties.${index}.isDefined`, + value !== undefined + ); }} key={`input-${property}`} label={`${property} (potentionally unmapped)`} diff --git a/src/tools/config/migrateConfig.ts b/src/tools/config/migrateConfig.ts index 00965af06..0f5a25046 100644 --- a/src/tools/config/migrateConfig.ts +++ b/src/tools/config/migrateConfig.ts @@ -5,7 +5,7 @@ import { AreaType } from '../../types/area'; import { CategoryType } from '../../types/category'; import { ConfigType } from '../../types/config'; import { SearchEngineCommonSettingsType } from '../../types/settings'; -import { IBitTorrent } from '../../widgets/bitTorrent/BitTorrentTile'; +import { ITorrent } from '../../widgets/torrent/TorrentTile'; import { ICalendarWidget } from '../../widgets/calendar/CalendarTile'; import { IDashDotTile } from '../../widgets/dashDot/DashDotTile'; import { IDateWidget } from '../../widgets/date/DateTile'; @@ -194,7 +194,7 @@ const migrateModules = (config: Config): IWidget[] => { }, }, shape: {}, - } as IBitTorrent; + } as ITorrent; case 'weather': return { id: 'weather', diff --git a/src/widgets/index.ts b/src/widgets/index.ts index 977302b88..bd8e0607f 100644 --- a/src/widgets/index.ts +++ b/src/widgets/index.ts @@ -3,7 +3,7 @@ import calendar from './calendar/CalendarTile'; import dashdot from './dashDot/DashDotTile'; import usenet from './useNet/UseNetTile'; import weather from './weather/WeatherTile'; -import bitTorrent from './bitTorrent/BitTorrentTile'; +import torrent from './torrent/TorrentTile'; import torrentNetworkTraffic from './torrentNetworkTraffic/TorrentNetworkTrafficTile'; export default { @@ -11,7 +11,7 @@ export default { dashdot, usenet, weather, - 'torrents-status': bitTorrent, + 'torrents-status': torrent, dlspeed: torrentNetworkTraffic, date, }; diff --git a/src/widgets/bitTorrent/BitTorrentQueueItem.tsx b/src/widgets/torrent/TorrentQueueItem.tsx similarity index 93% rename from src/widgets/bitTorrent/BitTorrentQueueItem.tsx rename to src/widgets/torrent/TorrentQueueItem.tsx index 3c2283a58..a6b8329f5 100644 --- a/src/widgets/bitTorrent/BitTorrentQueueItem.tsx +++ b/src/widgets/torrent/TorrentQueueItem.tsx @@ -4,11 +4,11 @@ import { useElementSize } from '@mantine/hooks'; import { calculateETA } from '../../tools/calculateEta'; import { humanFileSize } from '../../tools/humanFileSize'; -interface BitTorrentQueueItemProps { +interface TorrentQueueItemProps { torrent: NormalizedTorrent; } -export const BitTorrrentQueueItem = ({ torrent }: BitTorrentQueueItemProps) => { +export const BitTorrrentQueueItem = ({ torrent }: TorrentQueueItemProps) => { const MIN_WIDTH_MOBILE = useMantineTheme().breakpoints.xs; const { width } = useElementSize(); diff --git a/src/widgets/bitTorrent/BitTorrentTile.tsx b/src/widgets/torrent/TorrentTile.tsx similarity index 94% rename from src/widgets/bitTorrent/BitTorrentTile.tsx rename to src/widgets/torrent/TorrentTile.tsx index 96ebd03fc..89dd90b90 100644 --- a/src/widgets/bitTorrent/BitTorrentTile.tsx +++ b/src/widgets/torrent/TorrentTile.tsx @@ -23,7 +23,7 @@ import { useGetTorrentData } from '../../hooks/widgets/torrents/useGetTorrentDat import { AppIntegrationType } from '../../types/app'; import { defineWidget } from '../helper'; import { IWidget } from '../widgets'; -import { BitTorrrentQueueItem } from './BitTorrentQueueItem'; +import { BitTorrrentQueueItem } from './TorrentQueueItem'; dayjs.extend(duration); dayjs.extend(relativeTime); @@ -56,16 +56,16 @@ const definition = defineWidget({ maxWidth: 12, maxHeight: 14, }, - component: BitTorrentTile, + component: TorrentTile, }); -export type IBitTorrent = IWidget; +export type ITorrent = IWidget; -interface BitTorrentTileProps { - widget: IBitTorrent; +interface TorrentTileProps { + widget: ITorrent; } -function BitTorrentTile({ widget }: BitTorrentTileProps) { +function TorrentTile({ widget }: TorrentTileProps) { const { t } = useTranslation('modules/torrents-status'); const MIN_WIDTH_MOBILE = useMantineTheme().breakpoints.xs; const { width } = useElementSize(); diff --git a/src/widgets/widgets.ts b/src/widgets/widgets.ts index 4ef0453d0..2a084de3d 100644 --- a/src/widgets/widgets.ts +++ b/src/widgets/widgets.ts @@ -39,8 +39,8 @@ export type IWidgetOptionValue = // Interface for data type interface DataType { - label: string - value: string + label: string; + value: string; } // will show a multi-select with specified data