Fix "exclude scanlator" dialog title

This commit is contained in:
schroda
2025-06-10 01:20:31 +02:00
parent 7c0ffe9bd3
commit b723eab4ce
3 changed files with 9 additions and 3 deletions

View File

@@ -147,7 +147,8 @@
"chapter_number": "Chapter number",
"source_title": "Source title"
}
}
},
"exclude_scanlators": "Exclude scanlators"
},
"status": {
"label": {

View File

@@ -35,6 +35,7 @@ export const ChapterExcludeSanlatorsFilter = ({
checked={!!excludedScanlators.length}
/>
<CheckboxListSetting
title={t('chapter.option.exclude_scanlators')}
open={popupState.isOpen}
onClose={(selectedScanlators) => {
if (selectedScanlators) {

View File

@@ -19,6 +19,8 @@ import { CheckboxInput } from '@/modules/core/components/inputs/CheckboxInput.ts
import { useSelectableCollection } from '@/modules/collection/hooks/useSelectableCollection.ts';
export function CheckboxListSetting<Item>({
title,
emptyMessage,
items,
getId,
getLabel,
@@ -26,6 +28,8 @@ export function CheckboxListSetting<Item>({
open,
onClose,
}: {
title: string;
emptyMessage?: string;
items: Item[];
getId: (item: Item) => string;
getLabel: (item: Item) => string;
@@ -70,10 +74,10 @@ export function CheckboxListSetting<Item>({
open={open}
onClose={handleCancel}
>
<DialogTitle>{t('category.title.set_categories')}</DialogTitle>
<DialogTitle>{title}</DialogTitle>
<DialogContent dividers>
<FormGroup>
{items.length === 0 && <span>{t('category.error.no_categories_found.label.info')}</span>}
{items.length === 0 && <span>{emptyMessage}</span>}
{items.map((item) => (
<CheckboxInput
checked={selectedItemIds.includes(getId(item))}