feat(inline-edit): add WYSIWYG inline dashboard editing mode

Replace the disconnected board edit page with inline editing directly
on the board view. Toggle with Ctrl+E or the Edit button. Features:

- Edit mode store with changeset accumulation and batch save
- Floating toolbar (save, discard, add section, board settings, exit)
- Widget hover overlays with edit/delete/drag controls
- Type-specific widget config panels for all 14 widget types
- Section inline editing (title, icon picker, delete)
- "+" buttons for adding widgets and sections inline
- Section-level drag-and-drop reordering via svelte-dnd-action
- Batch save API endpoint (single Prisma transaction)
- Board properties side panel with live theme/wallpaper preview
- Modal widget type picker with search filtering
- Icon picker component with visual grid and search
- Confirmation dialog modal for all destructive actions
- HTML format support for Note widget (in addition to markdown/text)
- Full i18n support (en + ru) for all new UI strings
- Legacy edit page banner linking to new inline mode
This commit is contained in:
2026-04-03 00:01:29 +03:00
parent d8f89c65dc
commit a6b09aae9c
35 changed files with 3148 additions and 51 deletions
+11 -4
View File
@@ -2,6 +2,8 @@
import SectionHeader from './SectionHeader.svelte';
import SectionCollapsible from './SectionCollapsible.svelte';
import WidgetGrid from '$lib/components/widget/WidgetGrid.svelte';
import { editMode } from '$lib/stores/editMode.svelte.js';
import type { CardSize } from '$lib/utils/constants.js';
interface WidgetData {
id: string;
@@ -20,8 +22,6 @@
} | null;
}
import type { CardSize } from '$lib/utils/constants.js';
interface SectionData {
id: string;
title: string;
@@ -58,17 +58,24 @@
let expanded = $state(section.isExpandedByDefault);
</script>
<div class="rounded-xl border border-border bg-card/30 shadow-sm">
<div class="rounded-xl border border-border bg-card/30 shadow-sm {editMode.active ? 'ring-1 ring-primary/10' : ''}">
<SectionHeader
sectionId={section.id}
title={section.title}
icon={section.icon}
{expanded}
onToggle={() => (expanded = !expanded)}
widgetCount={section.widgets.length}
/>
<SectionCollapsible {expanded}>
<div class="px-4 pb-4">
<WidgetGrid widgets={section.widgets} {allApps} cardSize={effectiveCardSize} />
<WidgetGrid
widgets={section.widgets}
sectionId={section.id}
{allApps}
cardSize={effectiveCardSize}
/>
</div>
</SectionCollapsible>
</div>