Bug fixes + Save status
This commit is contained in:
@@ -29,6 +29,23 @@ const breadcrumbs: BreadcrumbItem[] = [
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
function isSaving() {
|
||||
return resumeStore.isSaving;
|
||||
}
|
||||
// Confirmation when closing the tab if saving
|
||||
window.addEventListener("beforeunload", function (e) {
|
||||
if (!isSaving()) return;
|
||||
|
||||
console.log('Saving in progress, showing confirmation dialog.');
|
||||
|
||||
const confirmationMessage = 'Des changements sont toujours en cours de sauvegarde. '
|
||||
+ 'Si vous quittez avant de sauvegarder, vos modifications seront perdues.';
|
||||
|
||||
(e || window.event).returnValue = confirmationMessage; //Gecko + IE
|
||||
return confirmationMessage; //Gecko + Webkit, Safari, Chrome etc.
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user