mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-15 01:23:57 -07:00
Add helpers to activate and deactivate warning
This commit is contained in:
parent
ccaf7b0279
commit
dd5d1b9cba
1 changed files with 7 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue