feat(manacore/web): add unified context menu system for workbench and app pages

Adds right-click context menus to workbench cards, minimized tabs, PillNavigation,
and item-level context menus for todo, calendar, contacts, habits, notes, places,
and moodlit modules. Uses a shared builder pattern with app-specific actions
registered via AppDescriptor.contextMenuActions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-03 21:18:05 +02:00
parent 2dd0812757
commit 2f87cf9d9a
20 changed files with 919 additions and 177 deletions

View file

@ -474,7 +474,12 @@
<!-- Navigation Items -->
{#each items as item}
{#if item.onClick}
<button onclick={item.onClick} class="pill glass-pill" class:active={item.active}>
<button
onclick={item.onClick}
oncontextmenu={item.onContextMenu}
class="pill glass-pill"
class:active={item.active}
>
{#if item.icon}
{#if item.icon === 'mana'}
<svg class="pill-icon" viewBox="0 0 24 24" fill="currentColor">
@ -492,7 +497,12 @@
<span class="pill-label">{item.label}</span>
</button>
{:else}
<a href={item.href} class="pill glass-pill" class:active={isActive(item.href)}>
<a
href={item.href}
oncontextmenu={item.onContextMenu}
class="pill glass-pill"
class:active={isActive(item.href)}
>
{#if item.icon}
{#if item.icon === 'mana'}
<svg class="pill-icon" viewBox="0 0 24 24" fill="currentColor">

View file

@ -24,6 +24,8 @@ export interface PillNavItem {
onClick?: () => void;
/** Whether this item is currently active/selected (for toggle buttons) */
active?: boolean;
/** Right-click handler for context menu */
onContextMenu?: (e: MouseEvent) => void;
}
export interface PillDropdownItem {