photonia-io/photonia

Show warning when trying to navigate away while editing something

Opened this issue · 1 comments

This should work both when clicking and with keyboard shortcuts.

Should set an editing state in pinia and then check with the router. Probably.

For now keyboard shortcuts are disabled. Swipe shortcuts will also be disabled.

But we should deal with clicking away.

Probably:
if applicationStore.editing == true -> show warning 'You have unsaved changes, are you sure you want to navigate away?'