feat(calendar): add event context menu and fix event persistence

- Add reusable ContextMenu component to shared-ui with icon support
- Create EventContextMenu for calendar with actions:
  - Edit, Duplicate, Change Calendar, Change Color
  - Export to .ics, Delete with confirmation
- Integrate context menu in DayView, WeekView, and AgendaView
- Fix event creation not showing success/error feedback
- Fix events store to properly handle API response format
- Add API logging for debugging event operations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Till-JS 2025-12-13 14:24:08 +01:00
parent cc37db8072
commit 10d4170ee8
10 changed files with 287 additions and 14 deletions

View file

@ -111,7 +111,7 @@
>
{#if item.icon}
<span class="item-icon">
{@render item.icon()}
<item.icon size={16} />
</span>
{/if}
<span class="item-label">{item.label}</span>

View file

@ -1,12 +1,13 @@
import type { Snippet } from 'svelte';
import type { Component } from 'svelte';
export interface ContextMenuItem {
/** Unique identifier for the item */
id: string;
/** Display label */
label: string;
/** Icon snippet to render */
icon?: Snippet;
/** Icon component to render (Phosphor icon or any Svelte component) */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
icon?: Component<any>;
/** Keyboard shortcut hint */
shortcut?: string;
/** Whether the item is disabled */