+ Some extensions require Deno to enable advanced features. Deno provides a secure, sandboxed
+ runtime environment for executing extension code safely. It is optional but recommended.
+
+
Choose any installation method below.
+
+ If you are unsure, you can use Auto Install.
+
+
+ After installation, ensure the `deno` command is accessible from your system's PATH.
+
+ Installation with curl command likely requires manual
+ configuration. So auto install is disabled. Please copy the command and run it in a terminal.
+
+ Seeing this message means `cargo` is detected and you are a programmer. `cargo install` allows
+ you to install `deno` from rust source code. But rust compiles super slow (a few minutes), so
+ auto install is disabled. If you really want to use this method, please copy the command and run
+ it in a terminal.
+
+ Some extensions require ffmpeg to enable advanced features. ffmpeg is optional but recommended.
+
+
+ For example, the YouTube video downloader extension requires `ffmpeg` to merge audio and video;
+ `ffmpeg` is also used in video processing extensions.
+
+{#if alreadyInstalled}
+
+ ✅
+ ffmpeg is already installed at
+
{ffmpegPath}
+
+{:else}
+
+ ❌
+ ffmpeg is not installed
+
+{/if}
+
+ ffmpeg Website
+
+
+
+ You can install ffmpeg from the official website, but it's much easier if you use a package
+ manager of your platform.
+
+
+
+
+ Windows
+ MacOS
+ Linux
+
+
+
+ {#if !brewPath}
+
+ Homebrew is not installed. Please install Homebrew first.
+
+ {/if}
+
+
+
+ {#if !chocoPath}
+
+ Chocolatey is not installed. Please install Chocolatey first.
+
+ {/if}
+
+
+
+ {#if !aptPath}
+
+ `apt` is not installed. Please install `apt` first.
+
+
+ If you are on a different distro, I believe you can figure it out as a Linux user.
+
+ {/if}
+
+
+
diff --git a/apps/desktop/src/lib/stores/appConfig.ts b/apps/desktop/src/lib/stores/appConfig.ts
index 40bbb72..9d58536 100644
--- a/apps/desktop/src/lib/stores/appConfig.ts
+++ b/apps/desktop/src/lib/stores/appConfig.ts
@@ -5,7 +5,7 @@ import { PersistedAppConfig, type AppConfig } from "@kksh/types"
import { debug, error } from "@tauri-apps/plugin-log"
import * as os from "@tauri-apps/plugin-os"
import { load } from "@tauri-apps/plugin-store"
-import { get } from "svelte/store"
+import { get, writable } from "svelte/store"
import * as v from "valibot"
export const defaultAppConfig: AppConfig = {
@@ -29,12 +29,15 @@ export const defaultAppConfig: AppConfig = {
developerMode: false
}
+export const appConfigLoaded = writable(false)
+
interface AppConfigAPI {
init: () => Promise
get: () => AppConfig
setTheme: (theme: ThemeConfig) => void
setDevExtensionPath: (devExtensionPath: string | null) => void
setTriggerHotkey: (triggerHotkey: string[]) => void
+ setOnBoarded: (onBoarded: boolean) => void
}
function createAppConfig(): WithSyncStore & AppConfigAPI {
@@ -61,7 +64,7 @@ function createAppConfig(): WithSyncStore & AppConfigAPI {
await persistStore.clear()
await persistStore.set("config", v.parse(PersistedAppConfig, defaultAppConfig))
}
-
+ appConfigLoaded.set(true)
store.subscribe(async (config) => {
console.log("Saving app config", config)
await persistStore.set("config", config)
@@ -80,6 +83,9 @@ function createAppConfig(): WithSyncStore & AppConfigAPI {
setTriggerHotkey: (triggerHotkey: string[]) => {
store.update((config) => ({ ...config, triggerHotkey }))
},
+ setOnBoarded: (onBoarded: boolean) => {
+ store.update((config) => ({ ...config, onBoarded }))
+ },
init
}
}
diff --git a/apps/desktop/src/routes/app/+layout.svelte b/apps/desktop/src/routes/app/+layout.svelte
index 050b713..5bd891e 100644
--- a/apps/desktop/src/routes/app/+layout.svelte
+++ b/apps/desktop/src/routes/app/+layout.svelte
@@ -101,7 +101,7 @@
-
+
{@render children()}
diff --git a/apps/desktop/src/routes/app/+page.svelte b/apps/desktop/src/routes/app/+page.svelte
index 85e9bb2..97d20f3 100644
--- a/apps/desktop/src/routes/app/+page.svelte
+++ b/apps/desktop/src/routes/app/+page.svelte
@@ -3,7 +3,14 @@
import { commandLaunchers } from "@/cmds"
import { builtinCmds } from "@/cmds/builtin"
import { systemCommands } from "@/cmds/system"
- import { appConfig, appState, devStoreExts, installedStoreExts, quickLinks } from "@/stores"
+ import {
+ appConfig,
+ appConfigLoaded,
+ appState,
+ devStoreExts,
+ installedStoreExts,
+ quickLinks
+ } from "@/stores"
import { cmdQueries } from "@/stores/cmdQuery"
import { isKeyboardEventFromInputElement } from "@/utils/dom"
import Icon from "@iconify/svelte"
@@ -22,6 +29,7 @@
import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow"
import { getCurrentWindow, Window } from "@tauri-apps/api/window"
import { exit } from "@tauri-apps/plugin-process"
+ import { goto } from "$app/navigation"
import { ArrowBigUpIcon, CircleXIcon, EllipsisVerticalIcon, RefreshCcwIcon } from "lucide-svelte"
import { onMount } from "svelte"
@@ -36,12 +44,23 @@
onMount(() => {
Promise.all([Window.getByLabel("splashscreen"), getCurrentWindow()]).then(
([splashscreenWin, mainWin]) => {
- mainWin.show()
if (splashscreenWin) {
splashscreenWin.close()
}
+
+ mainWin.show()
}
)
+
+ appConfigLoaded.subscribe((loaded) => {
+ // wait for appConfig store to be loaded, it's async and saved to disk when changed, so we use another store appConfigLoaded
+ // to keep track of the loading status
+ if (loaded) {
+ if (!appConfig.get().onBoarded) {
+ goto("/app/help/onboarding")
+ }
+ }
+ })
})
diff --git a/apps/desktop/src/routes/app/help/brew-install/+page.svelte b/apps/desktop/src/routes/app/help/brew-install/+page.svelte
new file mode 100644
index 0000000..26b3289
--- /dev/null
+++ b/apps/desktop/src/routes/app/help/brew-install/+page.svelte
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
diff --git a/apps/desktop/src/routes/app/help/deno-install/+page.svelte b/apps/desktop/src/routes/app/help/deno-install/+page.svelte
new file mode 100644
index 0000000..f9d703f
--- /dev/null
+++ b/apps/desktop/src/routes/app/help/deno-install/+page.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/apps/desktop/src/routes/app/help/ffmpeg-install/+page.svelte b/apps/desktop/src/routes/app/help/ffmpeg-install/+page.svelte
new file mode 100644
index 0000000..9945a00
--- /dev/null
+++ b/apps/desktop/src/routes/app/help/ffmpeg-install/+page.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/apps/desktop/src/routes/app/help/onboarding/+page.svelte b/apps/desktop/src/routes/app/help/onboarding/+page.svelte
new file mode 100644
index 0000000..c4fab08
--- /dev/null
+++ b/apps/desktop/src/routes/app/help/onboarding/+page.svelte
@@ -0,0 +1,64 @@
+
+
+
+
+ {#if step === Step.Welcome}
+
Welcome to Kunkun
+
+ This is a on boarding page to help you set up Kunkun with some basic settings and optional
+ dependencies.
+
+
Click Next to continue
+ {:else if step === Step.GeneralSettings}
+
General Settings
+ You can change these settings later in the settings page.
+
+ {:else if step === Step.DenoInstall}
+
+ {:else if step === Step.FFmpegInstall}
+
+ {/if}
+
+
diff --git a/apps/desktop/src/routes/app/help/onboarding/steps.ts b/apps/desktop/src/routes/app/help/onboarding/steps.ts
new file mode 100644
index 0000000..ad25490
--- /dev/null
+++ b/apps/desktop/src/routes/app/help/onboarding/steps.ts
@@ -0,0 +1,6 @@
+export enum Step {
+ Welcome = 0,
+ GeneralSettings = 1,
+ DenoInstall = 2,
+ FFmpegInstall = 3
+}
diff --git a/apps/desktop/src/routes/app/settings/+page.svelte b/apps/desktop/src/routes/app/settings/+page.svelte
index 7e39f73..cd429b4 100644
--- a/apps/desktop/src/routes/app/settings/+page.svelte
+++ b/apps/desktop/src/routes/app/settings/+page.svelte
@@ -1,70 +1,7 @@
-
-