mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-05-31 04:05:33 -04:00
Add helpers to activate and deactivate warning
This commit is contained in:
parent
ccaf7b0279
commit
dd5d1b9cba
7
frontend/composables/use-navigation-warning.ts
Normal file
7
frontend/composables/use-navigation-warning.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export const activateNavigationWarning = () => {
|
||||||
|
window.onbeforeunload = () => true;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const deactivateNavigationWarning = () => {
|
||||||
|
window.onbeforeunload = null;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user