Show info text when no available migration destination sources
This commit is contained in:
@@ -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 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 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 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 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 wrongly positioned mobile progress bar current page indicator
|
||||||
- (**Reader**) Fix mobile progress bar previous/next chapter button visibility on hover and while disabled
|
- (**Reader**) Fix mobile progress bar previous/next chapter button visibility on hover and while disabled
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import DragHandle from '@mui/icons-material/DragHandle';
|
|||||||
import { languageCodeToName } from '@/base/utils/Languages.ts';
|
import { languageCodeToName } from '@/base/utils/Languages.ts';
|
||||||
import { DEFAULT_FULL_FAB_HEIGHT } from '@/base/components/buttons/StyledFab.tsx';
|
import { DEFAULT_FULL_FAB_HEIGHT } from '@/base/components/buttons/StyledFab.tsx';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
|
import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewAbsoluteCentered.tsx';
|
||||||
|
|
||||||
const SourceCard = memo(
|
const SourceCard = memo(
|
||||||
({
|
({
|
||||||
@@ -88,7 +89,7 @@ const SourceCard = memo(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
export const MigrationSourceList = ({
|
export const MigrationDestinationSourceList = ({
|
||||||
sources,
|
sources,
|
||||||
handleSelection,
|
handleSelection,
|
||||||
selectedSourceIds,
|
selectedSourceIds,
|
||||||
@@ -161,6 +162,10 @@ export const MigrationSourceList = ({
|
|||||||
handlePriorityChange(oldIndex, newIndex);
|
handlePriorityChange(oldIndex, newIndex);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!allSources.length) {
|
||||||
|
return <EmptyViewAbsoluteCentered message={t`No sources available to migrate to`} />;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DndContext
|
<DndContext
|
||||||
sensors={dndSensors}
|
sensors={dndSensors}
|
||||||
@@ -13,7 +13,6 @@ import { EmptyViewAbsoluteCentered } from '@/base/components/feedback/EmptyViewA
|
|||||||
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
|
||||||
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
||||||
import { MigrationManager } from '@/features/migration/MigrationManager.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 { useSelectableCollection } from '@/base/collection/hooks/useSelectableCollection.ts';
|
||||||
import type { SourceIdInfo } from '@/features/source/Source.types.ts';
|
import type { SourceIdInfo } from '@/features/source/Source.types.ts';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
@@ -30,6 +29,7 @@ import ToggleOnIcon from '@mui/icons-material/ToggleOn';
|
|||||||
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
import { CustomTooltip } from '@/base/components/CustomTooltip.tsx';
|
||||||
import { MigrationBulkSearchOptionsDialog } from '@/features/migration/components/MigrationBulkSearchOptionsDialog.tsx';
|
import { MigrationBulkSearchOptionsDialog } from '@/features/migration/components/MigrationBulkSearchOptionsDialog.tsx';
|
||||||
import { AwaitableComponent } from 'awaitable-component';
|
import { AwaitableComponent } from 'awaitable-component';
|
||||||
|
import { MigrationDestinationSourceList } from '@/features/migration/components/MigrationDestinationSourceList.tsx';
|
||||||
|
|
||||||
export const MigrationSelectDestinationSources = () => {
|
export const MigrationSelectDestinationSources = () => {
|
||||||
const { t } = useLingui();
|
const { t } = useLingui();
|
||||||
@@ -155,7 +155,7 @@ export const MigrationSelectDestinationSources = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<MigrationSourceList
|
<MigrationDestinationSourceList
|
||||||
sources={sources}
|
sources={sources}
|
||||||
selectedSourceIds={selectedItemIds}
|
selectedSourceIds={selectedItemIds}
|
||||||
handleSelection={handleSelection}
|
handleSelection={handleSelection}
|
||||||
|
|||||||
@@ -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"
|
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"
|
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"
|
msgid "Available"
|
||||||
msgstr "Available"
|
msgstr "Available"
|
||||||
|
|
||||||
@@ -1144,7 +1144,7 @@ msgstr "Creating theme…"
|
|||||||
msgid "Crimson"
|
msgid "Crimson"
|
||||||
msgstr "Crimson"
|
msgstr "Crimson"
|
||||||
|
|
||||||
#: src/features/migration/components/MigrationSourceList.tsx
|
#: src/features/migration/components/MigrationDestinationSourceList.tsx
|
||||||
msgid "Current source"
|
msgid "Current source"
|
||||||
msgstr "Current source"
|
msgstr "Current source"
|
||||||
|
|
||||||
@@ -1436,7 +1436,7 @@ msgstr "Downloading"
|
|||||||
msgid "Downloads"
|
msgid "Downloads"
|
||||||
msgstr "Downloads"
|
msgstr "Downloads"
|
||||||
|
|
||||||
#: src/features/migration/components/MigrationSourceList.tsx
|
#: src/features/migration/components/MigrationDestinationSourceList.tsx
|
||||||
msgid "Drag to prioritize"
|
msgid "Drag to prioritize"
|
||||||
msgstr "Drag to prioritize"
|
msgstr "Drag to prioritize"
|
||||||
|
|
||||||
@@ -2464,6 +2464,10 @@ msgstr "No match found"
|
|||||||
msgid "No pages found"
|
msgid "No pages found"
|
||||||
msgstr "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
|
#: src/features/browse/sources/Sources.tsx
|
||||||
msgid "No sources found. Install Some extensions first."
|
msgid "No sources found. Install Some extensions first."
|
||||||
msgstr "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"
|
msgid "Select pinned sources"
|
||||||
msgstr "Select pinned sources"
|
msgstr "Select pinned sources"
|
||||||
|
|
||||||
#: src/features/migration/components/MigrationSourceList.tsx
|
#: src/features/migration/components/MigrationDestinationSourceList.tsx
|
||||||
msgid "Selected"
|
msgid "Selected"
|
||||||
msgstr "Selected"
|
msgstr "Selected"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user