normativeai / frontend

GNU General Public License v3.0
5 stars 3 forks source link

Warning on exit without save #9

Closed lex-lex closed 5 years ago

lex-lex commented 5 years ago

When changing the contents of a query or legislation, and I close the windows (or navigate somewhere else in the app), the browser should give a warning saying "you have unsaved changes, do you really want to proceed?" or so. What do you think?

shaolintl commented 5 years ago

Yes, this would be useful.

lex-lex commented 5 years ago

On it.

lex-lex commented 5 years ago

I implemented a simple version that works in Chrome and Firefox for me (Fedora Linux). But as web development goes, this of course does not mean that it works in general or is free of bugs. Can you test it a bit?

shaolintl commented 5 years ago

I just tried it on Chrome and Firefox (Debian Linux) and could not see any change. I tried both editing queries and theories and when clicking the buttons (consistency and run) it was executed on the original formula before the editing. Was it pushed to the server?

lex-lex commented 5 years ago

Ah, sorry, I forget to pull on the nai server. Just did it. Please check now.

shaolintl commented 5 years ago

Seems to work fine.