diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index a260514..6e03849 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -1,6 +1,6 @@ # BoxBox Project Context -> **Last updated:** 2026-05-06 +> **Last updated:** 2026-06-12 > **Purpose:** Single source of truth for the non-`docs/` Markdown files and current codebase state. > **Scope:** Consolidates project truth from the previous non-`docs/` Markdown set. The old audit, roadmap, refactor-plan, and nested starter README files were removed on 2026-05-06 after this file became the local source of truth. > **Excluded by request:** Contents of `docs/` Markdown files are not merged here, though this file notes known drift between `docs/` and the implementation where it affects project truth. @@ -321,7 +321,7 @@ Backend testing gaps remain: - SvelteKit app is built as a static SPA with fallback. - Root layout initializes Svelte Query and handles auth redirects. -- Main app flow includes login, browse, settings, and a manual `/test` component/demo route. +- Main app flow includes login, browse, and settings. The old unauthenticated `/test` component/demo route was removed during the 2026-06-12 cleanup. - `browse/+page.svelte` is the main file manager screen and composes the active UI. ### Important frontend directories @@ -347,7 +347,7 @@ Older frontend refactor files are stale in several areas. These are now implemen - `src/lib/utils/fileTypes.ts` exists and is the central file-type source. - `src/lib/utils/format.ts` exists for formatting. - Design tokens are defined in `src/routes/layout.css`. -- `src/lib/components/ui/` exists with base components including `Button`, `Input`, `Select`, `Toggle`, `Card`, `Modal`, `Spinner`, `Badge`, `ProgressBar`, `ContextMenu`, `Toast`, and `InlineRename`. +- `src/lib/components/ui/` exists with base components including `Button`, `Input`, `Select`, `Toggle`, `Modal`, `Spinner`, `Badge`, `ProgressBar`, `ContextMenu`, `Toast`, and `InlineRename`. - No ` diff --git a/frontend/src/lib/components/settings/wallpaper/WallpaperSettings.svelte b/frontend/src/lib/components/settings/wallpaper/WallpaperSettings.svelte index 409854c..0ec4dea 100644 --- a/frontend/src/lib/components/settings/wallpaper/WallpaperSettings.svelte +++ b/frontend/src/lib/components/settings/wallpaper/WallpaperSettings.svelte @@ -1,7 +1,7 @@ - -{#if isButton} - -{:else} -
- {@render children()} -
-{/if} diff --git a/frontend/src/lib/components/ui/ContextMenu.svelte b/frontend/src/lib/components/ui/ContextMenu.svelte index 8a4ba1d..a2207ea 100644 --- a/frontend/src/lib/components/ui/ContextMenu.svelte +++ b/frontend/src/lib/components/ui/ContextMenu.svelte @@ -3,8 +3,6 @@ * Context Menu component - reusable right-click menu * Follows UI component patterns from contributing guidelines */ - import type { Snippet } from 'svelte'; - export interface ContextMenuItem { id: string; label: string; @@ -29,22 +27,22 @@ // Adjust position to keep menu within viewport let adjustedPosition = $derived.by(() => { if (!menuRef) return { x, y }; - + const menuWidth = 200; // approximate width const menuHeight = items.length * 36; // approximate height const viewportWidth = typeof window !== 'undefined' ? window.innerWidth : 1920; const viewportHeight = typeof window !== 'undefined' ? window.innerHeight : 1080; - + let adjustedX = x; let adjustedY = y; - + if (x + menuWidth > viewportWidth) { adjustedX = viewportWidth - menuWidth - 8; } if (y + menuHeight > viewportHeight) { adjustedY = viewportHeight - menuHeight - 8; } - + return { x: adjustedX, y: adjustedY }; }); @@ -74,39 +72,42 @@
{ e.preventDefault(); onClose(); }} + oncontextmenu={(e) => { + e.preventDefault(); + onClose(); + }} >