@setoelkahfi / svara / commits / 97f4d21

added info on startup and links to repo

mellobacon committed Dec 1, 2022 at 01:56 UTC 97f4d21563cb079f101a83f633938cc66a03f761
2 files changed +9 -1
src/App.svelte
+7
@@ -8,6 +8,9 @@
8 import { showsidebarview, tool } from "./components/Sidebar/Sidebar";
9 import settings from "./config/nucleus-settings.json";
10 import { executeWindowShortcut } from "./config/config";
11 + import { Action, addNotification, NotifType } from "./components/Notifications/Notifications";
12 + import { onMount } from "svelte";
13 + import { shell } from "@tauri-apps/api";
14
15 const shortcuts = Object.entries(settings.shortcuts);
16 let keys = {};
@@ -22,6 +25,10 @@
25 }
26 return "";
27 }
28 +
29 + onMount(() => {
30 + addNotification(NotifType.Message, "Nucleus editor is in a work in progress state. Expect missing features and bugs", [new Action("GitHub link", () => {shell.open("https://github.com/mellobacon/Nucleus")}), new Action("Report issue/feature", () => {shell.open("https://github.com/mellobacon/Nucleus/issues/new/choose")})]);
31 + })
32 </script>
33
34 <svelte:window on:contextmenu|preventDefault on:keyup={(e) => {
src/components/Header/menu.ts
+2 -1
@@ -2,6 +2,7 @@ import { appWindow } from "@tauri-apps/api/window";
2 import { addNewFile, openFile, openFolder, openSettings, saveOpenFile } from "./header_menus/FileMenu";
3 import settings from "../../config/nucleus-settings.json";
4 import { getShortcut } from "../../config/config";
5 +import { shell } from "@tauri-apps/api";
6 const shortcuts = settings.shortcuts;
7
8 export const filemenu = [
@@ -45,5 +46,5 @@ export const helpmenu = [
46 { option: "Toggle developer tools", onclick: () => { console.log("click"); } },
47 { option: "Release Notes", onclick: () => { console.log("click"); }, divider: true },
48 { option: "Check for Updates", onclick: async() => { console.log("click"); } },
48 - { option: "About Editor", onclick: async() => { console.log("click"); } },
49 + { option: "About Editor", onclick: async() => { shell.open("https://github.com/mellobacon/Nucleus") } },
50 ];
\ No newline at end of file