The VS Code of video editing, built for agents.
TypeScript
Enhance Windows title bar functionality and dashboard search integration
konstantin-pauluse556af4bfd3d
diff --git a/apps/web/src/components/sidebar-left/sidebar-left.tsx b/apps/web/src/components/sidebar-left/sidebar-left.tsxindex b9da38a6..f10141dc 100644--- a/apps/web/src/components/sidebar-left/sidebar-left.tsx+++ b/apps/web/src/components/sidebar-left/sidebar-left.tsx@@ -73,6 +73,7 @@ export function EditorTitleBar(props: EditorTitleBarProps) {<WindowsTitleBarleftWidth={props.leftWidth}controlsWidth={props.controlsWidth}+ class="bg-background"left={<><div class="flex shrink-0 items-center" style="-webkit-app-region: no-drag;">diff --git a/apps/web/src/components/ui/windows-title-bar.tsx b/apps/web/src/components/ui/windows-title-bar.tsxindex f0f2a277..8f6037da 100644--- a/apps/web/src/components/ui/windows-title-bar.tsx+++ b/apps/web/src/components/ui/windows-title-bar.tsx@@ -4,6 +4,7 @@import { Show, type JSX } from "solid-js";+import { cx } from "@/lib/cva";import { isWindowsDesktop } from "@/projects";type WindowsTitleBarProps = {@@ -12,6 +13,8 @@ type WindowsTitleBarProps = {/** Width of the cell the native window controls sit in. */controlsWidth: number;left: JSX.Element;+ /** Classes for the middle cell, which sits over the page's main column. */+ class?: string;children?: JSX.Element;};@@ -35,7 +38,7 @@ export function WindowsTitleBar(props: WindowsTitleBarProps) {{props.left}</div>{/* Not positioned on purpose: absolute children center on the whole bar. */}- <div class="h-full min-w-0 flex-1">{props.children}</div>+ <div class={cx("h-full min-w-0 flex-1", props.class)}>{props.children}</div><divclass="h-full min-w-(--titlebar-controls-width) shrink-0 border-l border-border-strong"style={{ width: `${props.controlsWidth}px` }}diff --git a/apps/web/src/pages/dashboard.tsx b/apps/web/src/pages/dashboard.tsxindex 3fc30de0..7ee8be58 100644--- a/apps/web/src/pages/dashboard.tsx+++ b/apps/web/src/pages/dashboard.tsx@@ -134,18 +134,10 @@ export function DashboardPage() {};// The project search lives here rather than in the projects view because- // the Windows title bar offers it on every view: typing there lands on the- // projects it filters. Leaving the projects view drops the query.+ // on Windows its field sits in the title bar. Leaving the projects view+ // drops the query.const [projectSearch, setProjectSearch] = createSignal("");- const searchFromTitleBar = (value: string) => {- setProjectSearch(value);- if (value && view() !== "projects") {- setSettingsNavOpen(false);- setView("projects");- }- };-createEffect(() => {if (view() !== "projects") setProjectSearch("");});@@ -163,12 +155,14 @@ export function DashboardPage() {</>}>- <DashboardSearchBar- class="h-full"- value={projectSearch}- onChange={searchFromTitleBar}- placeholder="Search in projects"- />+ <Show when={view() === "projects"}>+ <DashboardSearchBar+ class="h-full"+ value={projectSearch}+ onChange={setProjectSearch}+ placeholder="Search in projects"+ />+ </Show></WindowsTitleBar><aside class="relative flex min-h-0 w-69 shrink-0 flex-col"><Show when={isDesktop() && !isWindowsDesktop() && !isFullscreen()}>