From 5f6b2b388367d74b977648ea0014627b4237c492 Mon Sep 17 00:00:00 2001 From: SirBlobby Date: Tue, 21 Jul 2026 15:56:40 -0400 Subject: [PATCH] Compact editor UI, move LSP info to settings, redesign status badges Claude-Session: https://claude.ai/code/session_01PoLmSR1pFVyHf8i5b1rNWk --- src/lib/components/EditorToolbar.svelte | 26 +-- src/lib/components/SettingsModal.svelte | 52 +++++- src/routes/+page.svelte | 205 ++++++++++++++++++------ 3 files changed, 210 insertions(+), 73 deletions(-) diff --git a/src/lib/components/EditorToolbar.svelte b/src/lib/components/EditorToolbar.svelte index 7bc6565..ba57e72 100644 --- a/src/lib/components/EditorToolbar.svelte +++ b/src/lib/components/EditorToolbar.svelte @@ -5,9 +5,7 @@ import { insertText, prefixLines, - redoEdit, setTypstConfig, - undoEdit, wrapSelection, } from "$lib/ts/editor-actions"; import { app } from "$lib/ts/state.svelte"; @@ -37,10 +35,10 @@ icon: string, label: string, run: () => void, - size = "text-base", + size = "text-sm", )} + + {#if editorView} + + + {/if} + {app.target?.path.split("/").pop()} {#if app.target?.standalone} - - single file - + {@render statusBadge("ph:file", "Single file", "muted")} {/if} {#if app.dirty} @@ -579,45 +642,53 @@ {/if} {#if app.view === "editor"} - - - {lspLabel[app.lspStatus]} - - - {#if app.account} - - - {wsLabel[app.wsStatus] ?? "Offline (polling)"} + {#if app.account && (app.target?.cloud_project_id || app.documentLink) && !app.collabIntent} + + {@render statusBadge( + app.wsStatus === "connected" + ? "ph:cloud-check" + : app.wsStatus === "connecting" + ? "ph:circle-notch" + : "ph:cloud-slash", + wsLabel[app.wsStatus] ?? "Offline (polling)", + app.wsStatus === "connected" + ? "success" + : app.wsStatus === "connecting" + ? "accent" + : "muted", + app.wsStatus === "connecting", + )} {/if} - + {#if app.collabIntent} + + {@render statusBadge( + app.collabStatus === "connected" + ? "ph:broadcast" + : app.collabStatus === "connecting" + ? "ph:circle-notch" + : "ph:wifi-slash", + collabLabel[app.collabStatus ?? "offline"], + app.collabStatus === "connected" + ? "success" + : app.collabStatus === "connecting" + ? "accent" + : "muted", + app.collabStatus === "connecting", + )} + + {/if} + + {#if !app.collabIntent} + + {/if}
- {#if app.target?.cloud_project_id || app.documentLink} + {#if (app.target?.cloud_project_id || app.documentLink) && !app.collabIntent} + + {:else if !app.target?.standalone}
@@ -801,6 +885,14 @@ > {selectedFolder ? selectedFolder : "Files"} +
{ app.editorContent = value; app.dirty = true; @@ -1148,3 +1243,11 @@ onclose={close} /> {/if} + +{#if app.collabConflict} + resolveCollabConflict(resolutions[0]?.content ?? "")} + onclose={cancelCollabConflict} + /> +{/if}