Skip to content

Commit 5e24d13

Browse files
exiting properly
1 parent c489840 commit 5e24d13

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/routes/finished/+page.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414

1515
<GDLcc orientation="vertical">
1616
<div class="w-96"></div>
17-
<GDLButton secondary on:click={() => window.close()}>
17+
<GDLButton secondary on:click={() => {
18+
fetch('/quit')
19+
window.close();
20+
}}>
1821
{m.done()}
1922
</GDLButton>
2023
<GDLButton on:click={() => fetch("/finished/reboot")}>

src/routes/quit/+server.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import type { RequestHandler } from './$types';
2+
3+
export const GET: RequestHandler = async () => {
4+
process.exit(0);
5+
return new Response();
6+
};

0 commit comments

Comments
 (0)