mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 14:42:11 -03:00
refactor(filter): extract preset management logic into FilterPresetManager
Move filter preset creation, deletion, application, and storage logic from FilterManager into a dedicated FilterPresetManager class to improve separation of concerns and maintainability. - Add FilterPresetManager with preset CRUD operations - Update FilterManager to use preset manager via composition - Handle EMPTY_WILDCARD_MARKER for wildcard base model filters - Add preset-related translations to all locale files - Update filter preset UI styling and interactions
This commit is contained in:
@@ -103,6 +103,19 @@ export async function fetchRecipesPage(page = 1, pageSize = 100) {
|
||||
|
||||
// Add base model filters
|
||||
if (pageState.filters?.baseModel && pageState.filters.baseModel.length) {
|
||||
// Check for empty wildcard marker - if present, no models should match
|
||||
const EMPTY_WILDCARD_MARKER = '__EMPTY_WILDCARD_RESULT__';
|
||||
if (pageState.filters.baseModel.length === 1 &&
|
||||
pageState.filters.baseModel[0] === EMPTY_WILDCARD_MARKER) {
|
||||
// Wildcard resolved to no matches - return empty results
|
||||
return {
|
||||
items: [],
|
||||
totalItems: 0,
|
||||
totalPages: 0,
|
||||
currentPage: page,
|
||||
hasMore: false
|
||||
};
|
||||
}
|
||||
params.append('base_models', pageState.filters.baseModel.join(','));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user