feat(version): bump to 0.8.110 and update project specifications
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / playwright-tests (push) Successful in 1m15s
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / playwright-tests (push) Successful in 1m15s
- Updated app version to 0.8.110 and database schema version to 20260512057, reflecting recent enhancements. - Revised project status documentation to include new versioning and next steps for development. - Enhanced the functional specification for training modules and combination exercises, detailing upcoming features and improvements. - Improved technical specifications to align with the latest code changes, ensuring consistency across documentation. - Introduced new UI elements for toast notifications and unsaved changes prompts to enhance user experience. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
81fd7d9b3b
commit
49adb395dd
24 files changed
+1001
-268
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import { useCallback, useEffect } from 'react'
|
||||
import { useBlocker } from 'react-router-dom'
|
||||
|
||||
/**
|
||||
* Blockiert SPA-internes Routing bei ungesichertem Bearbeitungszustand (data router oder BrowserRouter ab RR 6.22).
|
||||
* Kombination mit einem Dialog (Speichern / Abbrechen / Verwerfen) und optionally useBeforeUnloadWhen.
|
||||
*/
|
||||
export function useUnsavedChangesBlocker(when) {
|
||||
const shouldBlock = useCallback(
|
||||
({ currentLocation, nextLocation }) =>
|
||||
!!when &&
|
||||
(currentLocation.pathname !== nextLocation.pathname ||
|
||||
currentLocation.search !== nextLocation.search ||
|
||||
currentLocation.hash !== nextLocation.hash),
|
||||
[when],
|
||||
)
|
||||
return useBlocker(when ? shouldBlock : false)
|
||||
}
|
||||
|
||||
/** Tab/Fenster schließen oder harten Reload — natives Browser-Verhalten mit generischem Warnhinweis. */
|
||||
export function useBeforeUnloadWhen(when) {
|
||||
useEffect(() => {
|
||||
if (!when) return undefined
|
||||
const fn = (ev) => {
|
||||
ev.preventDefault()
|
||||
ev.returnValue = ''
|
||||
}
|
||||
window.addEventListener('beforeunload', fn)
|
||||
return () => window.removeEventListener('beforeunload', fn)
|
||||
}, [when])
|
||||
}
|
||||
Reference in new issue
Block a user