Bug fixes + Save status
Some checks failed
linter / quality (push) Successful in 4m14s
tests / ci (push) Failing after 12m30s

This commit is contained in:
2025-09-27 14:09:05 +02:00
parent cb242e59ba
commit b89fd67d57
10 changed files with 194 additions and 33 deletions

View File

@@ -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>