Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test:e2e": "esbuild src/server/index.ts --bundle --format=esm --platform=node --outfile=test/e2e/.server.mjs --log-level=warning && node --no-warnings test/e2e/run.mjs ./.server.mjs schema.sql && node --no-warnings test/e2e/drive-imports.mjs"
},
"dependencies": {
"@clawnify/app": "^0.4.5",
"@clawnify/app": "^0.4.8",
"@clawnify/connections": "^0.7.0",
"@clawnify/db": "^0.4.3",
"@clawnify/queue": "^0.1.1",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ allowBuilds:
minimumReleaseAgeExclude:
- '@clawnify/connections@0.7.0'
- '@clawnify/services@0.6.0'
- '@clawnify/app@0.4.8'
14 changes: 7 additions & 7 deletions src/client/app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useState } from "react";
import { useCallback, useEffect, useState, type ReactNode } from "react";
import { ArrowLeft, Film } from "lucide-react";
import { AppNav, embedded, reportLocation, useHostNavigate } from "@clawnify/app/client";
import { AppNav, reportLocation, useHostNavigate } from "@clawnify/app/client";
import { EditRoute, ProjectsHome, type EditProject } from "./edit";
import { SharedHighlightsRoute } from "./library-highlights";
import { HighlightsRoute } from "./highlights";
Expand All @@ -26,9 +26,9 @@ function useRouter() {
/**
* Inside the Clawnify dashboard the projects are listed in the dashboard
* sidebar, and the open screen is kept in the host URL so a reload returns to
* it.
* it. Anywhere else the app's own header (`standalone`) is drawn instead.
*/
function HostNav({ active, path, navigate }: { active: string; path: string; navigate: (to: string) => void }) {
function HostNav({ active, path, navigate, standalone }: { active: string; path: string; navigate: (to: string) => void; standalone: () => ReactNode }) {
const [projects, setProjects] = useState<(Omit<EditProject, "edl"> & { video_ids?: string[] })[]>([]);
useEffect(() => {
fetch("/api/projects")
Expand All @@ -53,6 +53,7 @@ function HostNav({ active, path, navigate }: { active: string; path: string; nav
},
]}
onNavigate={(item) => item.href && navigate(item.href)}
standalone={standalone}
/>
);
}
Expand All @@ -68,11 +69,10 @@ export function App() {

return (
<div className="h-dvh flex flex-col text-foreground">
{embedded && <HostNav active={editId ? `edits/${editId}` : id} path={path} navigate={navigate} />}
{/* Brand row: the app icon is the identity object, and the accent hue
lives here (plus count badges and the focus ring) and nowhere else.
The dashboard draws its own, so it is standalone-only. */}
{!embedded && (
<HostNav active={editId ? `edits/${editId}` : id} path={path} navigate={navigate} standalone={() => (
<header className="flex items-center gap-2 px-5 h-14 border-b border-border bg-surface shrink-0">
{editId && (
<button onClick={() => navigate("/")} className={`${btnGhost} -ml-2`}>
Expand All @@ -85,7 +85,7 @@ export function App() {
<span className="text-heading-3">OpenVideo</span>
<button className={`${btnGhost} ml-auto`} onClick={() => navigate("/highlights")}>Highlights</button>
</header>
)}
)} />

{id === "highlights" ? <SharedHighlightsRoute navigate={navigate} /> : editId && highlights ? (
<HighlightsRoute id={editId} navigate={navigate} />
Expand Down
Loading