refactor: replace window.confirm with a double-click UI confirmation for the clear session button and enhance its styling.
All checks were successful
Build and Deploy / build (push) Successful in 1m38s
All checks were successful
Build and Deploy / build (push) Successful in 1m38s
This commit is contained in:
@@ -1 +1,7 @@
|
||||
# Development Status (Central)
|
||||
|
||||
## Active Tasks
|
||||
- [x] Enable Clear Session Button (2025-12-20)
|
||||
|
||||
## Devlog Index
|
||||
- [Enable Clear Session](./devlog/2025-12-20-014500_enable_clear_session.md) - Improved UI/UX for session clearing in CubeManager.
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# Enable Clear Session Button in Pack Generator
|
||||
|
||||
## Object
|
||||
Enable and improve the "Clear Session" button in the Cube Manager (Pack Generator) to allow users to restart the generation process from a clean state.
|
||||
|
||||
## Changes
|
||||
- Modified `CubeManager.tsx`:
|
||||
- Updated `handleReset` logic (verified).
|
||||
- enhanced "Clear Session" button styling to be more visible (red border/text) and indicate its destructive nature.
|
||||
- Added `disabled={loading}` to prevent state conflicts during active operations.
|
||||
- **Replaced `window.confirm` with a double-click UI confirmation pattern** to ensure reliability and better UX (fixed issue where native confirmation dialog was failing).
|
||||
|
||||
## Status
|
||||
- [x] Implementation complete.
|
||||
- [x] Verified logic for `localStorage` clearing.
|
||||
- [x] Verified interaction in browser (button changes state, clears data on second click).
|
||||
Reference in New Issue
Block a user