We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c489840 commit 5e24d13Copy full SHA for 5e24d13
src/routes/finished/+page.svelte
@@ -14,7 +14,10 @@
14
15
<GDLcc orientation="vertical">
16
<div class="w-96"></div>
17
- <GDLButton secondary on:click={() => window.close()}>
+ <GDLButton secondary on:click={() => {
18
+ fetch('/quit')
19
+ window.close();
20
+ }}>
21
{m.done()}
22
</GDLButton>
23
<GDLButton on:click={() => fetch("/finished/reboot")}>
src/routes/quit/+server.ts
@@ -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