From 0b8c18a43f23c8123399e75dda41e797f2b67b0f Mon Sep 17 00:00:00 2001 From: dtoro Date: Wed, 11 Mar 2026 17:43:37 +0100 Subject: [PATCH] fix: Style --- frontend/src/app/canvas/CanvasMenubar.tsx | 40 ++++++++++------------- frontend/src/app/keroma/KeromaPage.tsx | 2 +- frontend/src/app/pleroma/PleromaPage.tsx | 33 ++++++++++++------- 3 files changed, 40 insertions(+), 35 deletions(-) diff --git a/frontend/src/app/canvas/CanvasMenubar.tsx b/frontend/src/app/canvas/CanvasMenubar.tsx index f275712..3e7e4dc 100644 --- a/frontend/src/app/canvas/CanvasMenubar.tsx +++ b/frontend/src/app/canvas/CanvasMenubar.tsx @@ -10,11 +10,7 @@ import { MenubarItem, MenubarMenu, MenubarSeparator, - MenubarTrigger, - MenubarSub, - MenubarSubTrigger, - MenubarSubContent, - MenubarCheckboxItem, + MenubarTrigger } from '@/components/ui/menubar' import { Kbd, KbdGroup } from '@/components/ui/kbd' import { usePlatform } from '@/app/kosmos/KosmosContext' @@ -135,8 +131,20 @@ export function CanvasMenubar({ - Project + Project + {projectId && ( + <> + setIsRenamingProject(true)} + className="gap-2" + > + + Rename + + + + )} Import… @@ -145,22 +153,10 @@ export function CanvasMenubar({ Export… - {projectId && ( - <> - - setIsRenamingProject(true)} - className="gap-2" - > - - Rename - - - )} - Edit + Edit @@ -217,7 +213,7 @@ export function CanvasMenubar({ - View + View {onFitView && ( @@ -250,11 +246,11 @@ export function CanvasMenubar({ } }} onBlur={handleRenameBlur} - className="h-7 text-sm font-medium text-center" + className="h-7 text-sm font-medium text-center font-serif" aria-label="Project name" /> ) : ( - + {projectName ?? 'Untitled'} )} diff --git a/frontend/src/app/keroma/KeromaPage.tsx b/frontend/src/app/keroma/KeromaPage.tsx index 329288e..699812e 100644 --- a/frontend/src/app/keroma/KeromaPage.tsx +++ b/frontend/src/app/keroma/KeromaPage.tsx @@ -8,7 +8,7 @@ export function KeromaPage() { return (
-

+

Keroma

diff --git a/frontend/src/app/pleroma/PleromaPage.tsx b/frontend/src/app/pleroma/PleromaPage.tsx index eb8bfe2..7f2017f 100644 --- a/frontend/src/app/pleroma/PleromaPage.tsx +++ b/frontend/src/app/pleroma/PleromaPage.tsx @@ -110,6 +110,19 @@ function getGraphCounts(projectId: string): { nodes: number; edges: number } { type NodeLike = { id: string; position?: { x: number; y: number } } type EdgeLike = { id?: string; source: string; target: string } +/** Shared grid style for empty thumbnail, non-empty thumbnail SVG, and New project placeholder. */ +const THUMBNAIL_GRID = { + baseFill: 'hsl(var(--muted) / 0.4)', + dotFill: 'hsl(var(--muted-foreground) / 0.06)', + size: 8, +} as const + +const thumbnailGridStyle: React.CSSProperties = { + backgroundColor: THUMBNAIL_GRID.baseFill, + backgroundImage: `radial-gradient(circle, ${THUMBNAIL_GRID.dotFill} 1px, transparent 1px)`, + backgroundSize: `${THUMBNAIL_GRID.size}px ${THUMBNAIL_GRID.size}px`, +} + /** Renders a minimal SVG preview of the graph from storage, or a placeholder. */ function GraphThumbnail({ projectId, className }: { projectId: string; className?: string }) { const stored = loadGraphFromStorage(projectId) @@ -123,11 +136,7 @@ function GraphThumbnail({ projectId, className }: { projectId: string; className return (
@@ -164,11 +173,11 @@ function GraphThumbnail({ projectId, className }: { projectId: string; className aria-hidden > - - + + - + {validEdges.slice(0, 50).map((e, i) => { const a = nodeById.get(e.source)!.position! @@ -493,7 +502,7 @@ export function ProjectsPage() {
-

+

Hi, Demiurge

@@ -569,7 +578,7 @@ export function ProjectsPage() { }} aria-label="Create new project" > -
+
@@ -794,7 +803,7 @@ export function ProjectsPage() { }} aria-label="Create new project" > -
+
@@ -852,7 +861,7 @@ export function ProjectsPage() {
- {project.name} + {project.name}