diff --git a/src/lib/components/InfoModal.svelte b/src/lib/components/InfoModal.svelte deleted file mode 100644 index 4806ffa..0000000 --- a/src/lib/components/InfoModal.svelte +++ /dev/null @@ -1,107 +0,0 @@ - - - -
-
- -
-

Typst Desktop

-

- A local editor for Typst documents -

-
-
- - {#if info} -
-
-
Version
-
{info.version}
-
-
-
Typst
-
{info.typst_version}
-
-
-
Tauri
-
{info.tauri_version}
-
-
-
Author
-
{info.authors}
-
-
-
License
-
{info.license}
-
-
- {/if} - -
- {#each links as link} - - {/each} -
- -

- Typst Desktop is a community application and is not affiliated with, - endorsed by, or supported by the official Typst project. The links above - open the official Typst website in your browser. -

-
- - {#snippet footer()} - - {/snippet} -
diff --git a/src/lib/components/SettingsModal.svelte b/src/lib/components/SettingsModal.svelte index c4c96fb..adb52e6 100644 --- a/src/lib/components/SettingsModal.svelte +++ b/src/lib/components/SettingsModal.svelte @@ -1,9 +1,11 @@ - -
-
- Workspace folder -
- + +
+
- - Projects are stored as plain folders here. - -
+ {/each} + -
- TypstDrive server - -
+
+ {#if section === "files"} +
+
+ + Workspace folder + +
+ + +
+ + Projects and documents are stored as plain files here. + +
-
- Autosave - - - Saves the file being edited after you stop typing. - -
- -
- Automatic sync - - - Pulls and pushes cloud-linked projects on a timer. Conflicts pause - syncing until they are resolved. - -
- -
- -
- {#if app.account} -

{app.account.username}

-

{app.account.email}

- {:else} -

Not connected

-

- Sign in to sync projects to the cloud. -

- {/if} -
- {#if app.account} - - {:else} - - {/if} -
- -
- Appearance -
- {#each [["light", "ph:sun"], ["dark", "ph:moon"]] as [value, icon]} -
+ {:else if section === "appearance"} +
+
+ Theme +
+ {#each [["light", "Light", "ph:sun"], ["dark", "Dark", "ph:moon"]] as [value, label, icon]} + + {/each} +
+ + Applies immediately to the editor and preview. + +
+
+ {:else if section === "account"} +
+
- - {value === "light" ? "Light" : "Dark"} - - {/each} -
+ +
+ {#if app.account} +

{app.account.username}

+

{app.account.email}

+ {:else} +

Not connected

+

+ Sign in to sync projects to the cloud. +

+ {/if} +
+ {#if app.account} + + {:else} + + {/if} +
+ +
+ + TypstDrive server + + +
+ +
+ + Automatic sync + + + + Pulls and pushes cloud-linked projects on a timer. Conflicts pause + syncing until they are resolved. + +
+
+ {:else} +
+
+ +
+

Typst Desktop

+

+ A local editor for Typst documents +

+
+
+ + {#if info} +
+ {#each [["Version", info.version], ["Typst", info.typst_version], ["Tauri", info.tauri_version], ["Author", info.authors], ["License", info.license]] as [label, value]} +
+
{label}
+
{value}
+
+ {/each} +
+ {/if} + +
+ {#each links as link} + + {/each} +
+ +

+ Typst Desktop is a community application and is not affiliated with, + endorsed by, or supported by the official Typst project. The links + above open the official Typst website in your browser. +

+
+ {/if}
@@ -197,14 +309,16 @@ class="rounded-md px-3 py-1.5 text-xs text-[var(--color-ink-muted)] hover:bg-[var(--color-surface-sunken)]" onclick={onclose} > - Cancel - - + {#if section !== "about" && section !== "appearance"} + + {/if} {/snippet} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index b4d94c5..56c5f43 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -17,7 +17,6 @@ import AssetsModal from "$lib/components/AssetsModal.svelte"; import WindowControls from "$lib/components/WindowControls.svelte"; import ImageViewer from "$lib/components/ImageViewer.svelte"; - import InfoModal from "$lib/components/InfoModal.svelte"; import EditorToolbar from "$lib/components/EditorToolbar.svelte"; import PageSettingsModal from "$lib/components/PageSettingsModal.svelte"; @@ -67,7 +66,6 @@ | { kind: "delete-file"; path: string } | { kind: "login" } | { kind: "settings" } - | { kind: "info" } | { kind: "assets" } | { kind: "page-settings" } | { kind: "conflicts" }; @@ -514,14 +512,6 @@ - -
@@ -838,8 +828,6 @@ /> {:else if dialog.kind === "settings"} (dialog = { kind: "login" })} /> -{:else if dialog.kind === "info"} - {:else if dialog.kind === "assets"}