阶段七:完成CardList React feature化与批量追加边界

This commit is contained in:
Christ committed 2026-08-15 00:45:16 +08:00
1 parent 03f108639d
commit 66ac84b32d
18 files changed
+1105 -975

No files matched your search

+7 -13
View File
@@ -1,13 +1,7 @@
import type { Card } from '../types';
export const filterCards = (
cards: Card[],
typeFilter: Card['type'] | '',
nameSearch: string,
): Card[] => {
const keyword = nameSearch.trim().toLocaleLowerCase();
return cards.filter(card => (
(!typeFilter || card.type === typeFilter)
&& (!keyword || card.name.toLocaleLowerCase().includes(keyword))
));
};
// 旧目录保留兼容入口,实际卡密筛选和批量状态逻辑已归入 cards feature。
export {
canSubmitAppend,
filterCards,
isCurrentCardRequest,
previewAppendContent,
} from '../app/features/cards/batchState';