A focused Docker Compose management web application.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: navigation confirmation when saving

Brooke fa40c502 8509d704

+4 -2
+3 -1
packages/panel/src/routes/(authenticated)/create/+page.svelte
··· 9 9 import Fa from "svelte-fa"; 10 10 11 11 let format = $state(async () => {}); 12 + let saving = false; 12 13 13 14 // svelte-ignore state_referenced_locally 14 15 let project = $state({ ··· 24 25 params: { path: { project: project.name } }, 25 26 }); 26 27 28 + saving = true; 27 29 api.putProject(response.data!); 28 30 await goto(`/projects/${project.name}${location.hash}`); 29 31 } ··· 44 46 }); 45 47 46 48 beforeNavigate(({ cancel }) => { 47 - if (!confirm("You may have unsaved changes. Are you sure you want to leave?")) cancel(); 49 + if (!saving && !confirm("You may have unsaved changes. Are you sure you want to leave?")) cancel(); 48 50 }); 49 51 </script> 50 52
+1 -1
packages/panel/src/routes/(authenticated)/projects/[project]/+page.svelte
··· 51 51 }); 52 52 53 53 api.putProject(response.data!); 54 + unsaved = false; 54 55 55 56 if (rename) { 56 57 await goto(`/projects/${copy.name}${location.hash}`); 57 58 return; 58 59 } 59 60 60 - unsaved = false; 61 61 data.compose = copy.compose; 62 62 } 63 63