fix: complete remaining tab migrations, fix LeftPanel ghost fields, remove backup files
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m42s

This commit is contained in:
Refactoring Agent
2026-05-04 16:52:43 +02:00
parent 837d963b63
commit bb8edaf57a
6 changed files with 176 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
// ─── Crafting Store ─────────────────────────────────────────────────────
// Handles equipment crafting, enchantment design, and crafting progress
// This is a modular store that manages all crafting-related state
import { create } from 'zustand';
import { persist } from 'zustand/middleware';
import type { DesignProgress, PreparationProgress, ApplicationProgress, EquipmentCraftingProgress } from '../types';
export interface CraftingState {
// Crafting progress
designProgress: DesignProgress | null;
designProgress2: DesignProgress | null; // For ENCHANT_MASTERY (2 concurrent designs)
preparationProgress: PreparationProgress | null;
applicationProgress: ApplicationProgress | null;
equipmentCraftingProgress: EquipmentCraftingProgress | null;
}
export interface CraftingActions {
// Actions for design progress
setDesignProgress: (progress: DesignProgress | null) => void;
setDesignProgress2: (progress: DesignProgress | null) => void;
// Actions for preparation progress
setPreparationProgress: (progress: PreparationProgress | null) => void;
// Actions for application progress
setApplicationProgress: (progress: ApplicationProgress | null) => void;
// Actions for equipment crafting progress
setEquipmentCraftingProgress: (progress: EquipmentCraftingProgress | null) => void;
}
export type CraftingStore = CraftingState & CraftingActions;
export const useCraftingStore = create<CraftingStore>()(
persist(
(set) => ({
// Initial state
designProgress: null,
designProgress2: null,
preparationProgress: null,
applicationProgress: null,
equipmentCraftingProgress: null,
// Actions
setDesignProgress: (progress) => set({ designProgress: progress }),
setDesignProgress2: (progress) => set({ designProgress2: progress }),
setPreparationProgress: (progress) => set({ preparationProgress: progress }),
setApplicationProgress: (progress) => set({ applicationProgress: progress }),
setEquipmentCraftingProgress: (progress) => set({ equipmentCraftingProgress: progress }),
}),
{
name: 'mana-loop-crafting',
partialize: (state) => ({
designProgress: state.designProgress,
designProgress2: state.designProgress2,
preparationProgress: state.preparationProgress,
applicationProgress: state.applicationProgress,
equipmentCraftingProgress: state.equipmentCraftingProgress,
}),
}
)
);