@setoelkahfi / svara / commits / 8985c13

feat: added startup notification

mellbacon committed Aug 20, 2024 at 18:27 UTC 8985c134dac2c54da86cdf8f2dc742f1cccf5dce
1 file changed +5 -1
src/App.svelte
+5 -1
@@ -18,6 +18,7 @@
18 import { loadDir } from "./lib/File";
19 import NotificationToasts from "./lib/Notifications/NotificationToasts.svelte";
20 import { NotifType, addNotification, toasts } from "./lib/Notifications/notifications";
21 + import { shell } from "@tauri-apps/api";
22 let resolution = writable(0);
23
24 let minPanelSize = 10;
@@ -36,7 +37,10 @@
37 resolution.set(size.width);
38 updateMinPanelSize();
39
39 - addNotification(NotifType.Message, "Startup", [{label: "Test action", action: () => {}}], "test message");
40 + addNotification(NotifType.Message, "Welcome to Nucleus", [
41 + {label: "Learn More", action: () => {shell.open("https://github.com/mellobacon/Nucleus")}},
42 + {label: "Create Issue", action: () => {shell.open("https://github.com/mellobacon/Nucleus/issues/new/choose")}}
43 + ], "Nucleus is in alpha. If there are any bugs present or features you want to add, create an issue below.");
44
45 appWindow.onResized((e) => {
46 resolution.set(e.payload.width);