mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -03:00
Remove site.webmanifest and refactor state initialization in RecipeManager and HeaderManager
- Deleted the site.webmanifest file as it is no longer needed. - Simplified state management by removing initPageState from RecipeManager and integrating it into HeaderManager. - Cleaned up console logging in loraApi.js to reduce unnecessary output. - Minor formatting adjustments in FilterManager to enhance code readability.
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
|
||||||
@@ -57,8 +57,6 @@ export async function loadMoreLoras(resetPage = false, updateFolders = false) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Loading loras with params:', params.toString());
|
|
||||||
|
|
||||||
const response = await fetch(`/api/loras?${params}`);
|
const response = await fetch(`/api/loras?${params}`);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`Failed to fetch loras: ${response.statusText}`);
|
throw new Error(`Failed to fetch loras: ${response.statusText}`);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { updateService } from '../managers/UpdateService.js';
|
|||||||
import { toggleTheme } from '../utils/uiHelpers.js';
|
import { toggleTheme } from '../utils/uiHelpers.js';
|
||||||
import { SearchManager } from '../managers/SearchManager.js';
|
import { SearchManager } from '../managers/SearchManager.js';
|
||||||
import { FilterManager } from '../managers/FilterManager.js';
|
import { FilterManager } from '../managers/FilterManager.js';
|
||||||
|
import { initPageState } from '../state/index.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Header.js - Manages the application header behavior across different pages
|
* Header.js - Manages the application header behavior across different pages
|
||||||
@@ -10,6 +11,7 @@ import { FilterManager } from '../managers/FilterManager.js';
|
|||||||
export class HeaderManager {
|
export class HeaderManager {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.currentPage = this.detectCurrentPage();
|
this.currentPage = this.detectCurrentPage();
|
||||||
|
initPageState(this.currentPage);
|
||||||
this.searchManager = null;
|
this.searchManager = null;
|
||||||
this.filterManager = null;
|
this.filterManager = null;
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,10 @@ import { appCore } from './core.js';
|
|||||||
import { ImportManager } from './managers/ImportManager.js';
|
import { ImportManager } from './managers/ImportManager.js';
|
||||||
import { RecipeCard } from './components/RecipeCard.js';
|
import { RecipeCard } from './components/RecipeCard.js';
|
||||||
import { RecipeModal } from './components/RecipeModal.js';
|
import { RecipeModal } from './components/RecipeModal.js';
|
||||||
import { state, getCurrentPageState, setCurrentPageType, initPageState } from './state/index.js';
|
import { getCurrentPageState } from './state/index.js';
|
||||||
|
|
||||||
class RecipeManager {
|
class RecipeManager {
|
||||||
constructor() {
|
constructor() {
|
||||||
// Initialize recipe page state
|
|
||||||
initPageState('recipes');
|
|
||||||
|
|
||||||
// Get page state
|
// Get page state
|
||||||
this.pageState = getCurrentPageState();
|
this.pageState = getCurrentPageState();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user