Show info text when no available migration destination sources

This commit is contained in:
schroda
2026-05-16 02:49:07 +02:00
parent 05a722de8d
commit 8d90a91537
4 changed files with 17 additions and 7 deletions

View File

@@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- (**Migration**) Fix aborting bulk migration search/execution while webUI is served on a subpath
- (**Migration**) Fix retry button never being shown for failed search/migration entries
- (**Migration**) Fix showing an empty "Available" source group header when all sources are selected
- (**Migration**) Fix showing no info message when no sources are available to select as destinations
- (**Reader**) Fix scrollbar appearing with "fit to widt/height/screen" page scale mode and applied safe area insets
- (**Reader**) Fix wrongly positioned mobile progress bar current page indicator
- (**Reader**) Fix mobile progress bar previous/next chapter button visibility on hover and while disabled

View File

@@ -35,6 +35,7 @@ import DragHandle from '@mui/icons-material/DragHandle';
import { languageCodeToName } from '@/base/utils/Languages.ts';
import { DEFAULT_FULL_FAB_HEIGHT } from '@/base/components/buttons/StyledFab.tsx';
import Stack from '@mui/material/Stack';
import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewAbsoluteCentered.tsx';
const SourceCard = memo(
({
@@ -88,7 +89,7 @@ const SourceCard = memo(
},
);
export const MigrationSourceList = ({
export const MigrationDestinationSourceList = ({
sources,
handleSelection,
selectedSourceIds,
@@ -161,6 +162,10 @@ export const MigrationSourceList = ({
handlePriorityChange(oldIndex, newIndex);
};
if (!allSources.length) {
return <EmptyViewAbsoluteCentered message={t`No sources available to migrate to`} />;
}
return (
<DndContext
sensors={dndSensors}

View File

@@ -13,7 +13,6 @@ import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewA
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
import { MigrationManager } from '@/features/migration/MigrationManager.ts';
import { MigrationSourceList } from '@/features/migration/components/MigrationSourceList.tsx';
import { useSelectableCollection } from '@/base/collection/hooks/useSelectableCollection.ts';
import type { SourceIdInfo } from '@/features/source/Source.types.ts';
import { useCallback, useMemo } from 'react';
@@ -30,6 +29,7 @@ import ToggleOnIcon from '@mui/icons-material/ToggleOn';
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
import { MigrationBulkSearchOptionsDialog } from '@/features/migration/components/MigrationBulkSearchOptionsDialog.tsx';
import { AwaitableComponent } from 'awaitable-component';
import { MigrationDestinationSourceList } from '@/features/migration/components/MigrationDestinationSourceList.tsx';
export const MigrationSelectDestinationSources = () => {
const { t } = useLingui();
@@ -155,7 +155,7 @@ export const MigrationSelectDestinationSources = () => {
return (
<>
<MigrationSourceList
<MigrationDestinationSourceList
sources={sources}
selectedSourceIds={selectedItemIds}
handleSelection={handleSelection}

View File

@@ -522,7 +522,7 @@ msgstr "Automatically refresh metadata"
msgid "Automatically use webtoon mode for entries that are detected to likely use the long strip format"
msgstr "Automatically use webtoon mode for entries that are detected to likely use the long strip format"
#: src/features/migration/components/MigrationSourceList.tsx
#: src/features/migration/components/MigrationDestinationSourceList.tsx
msgid "Available"
msgstr "Available"
@@ -1144,7 +1144,7 @@ msgstr "Creating theme…"
msgid "Crimson"
msgstr "Crimson"
#: src/features/migration/components/MigrationSourceList.tsx
#: src/features/migration/components/MigrationDestinationSourceList.tsx
msgid "Current source"
msgstr "Current source"
@@ -1436,7 +1436,7 @@ msgstr "Downloading"
msgid "Downloads"
msgstr "Downloads"
#: src/features/migration/components/MigrationSourceList.tsx
#: src/features/migration/components/MigrationDestinationSourceList.tsx
msgid "Drag to prioritize"
msgstr "Drag to prioritize"
@@ -2464,6 +2464,10 @@ msgstr "No match found"
msgid "No pages found"
msgstr "No pages found"
#: src/features/migration/components/MigrationDestinationSourceList.tsx
msgid "No sources available to migrate to"
msgstr "No sources available to migrate to"
#: src/features/browse/sources/Sources.tsx
msgid "No sources found. Install Some extensions first."
msgstr "No sources found. Install Some extensions first."
@@ -3066,7 +3070,7 @@ msgstr "Select enabled sources"
msgid "Select pinned sources"
msgstr "Select pinned sources"
#: src/features/migration/components/MigrationSourceList.tsx
#: src/features/migration/components/MigrationDestinationSourceList.tsx
msgid "Selected"
msgstr "Selected"