mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 18:06:42 +02:00
feat(contacts): add context menu to alphabet/grid views with icons, add icons to todo context menu
- Add right-click context menu to ContactAlphabetView (was missing entirely) - Add icons to ContactGridView context menu items - Wire up onDeleteContact through ContactList to both views - Add icons to TaskList (todo) context menu: edit, complete, priority, delete Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ab387b9b3d
commit
e5ca208cd8
4 changed files with 121 additions and 4 deletions
|
|
@ -5,6 +5,16 @@
|
|||
import { getContext, untrack } from 'svelte';
|
||||
import { tasksStore } from '$lib/stores/tasks.svelte';
|
||||
import { ContextMenu, type ContextMenuItem } from '@manacore/shared-ui';
|
||||
import {
|
||||
PencilSimple,
|
||||
CheckSquare,
|
||||
ArrowCircleUp,
|
||||
ArrowDown,
|
||||
ArrowRight,
|
||||
ArrowUp,
|
||||
Lightning,
|
||||
Trash,
|
||||
} from '@manacore/shared-icons';
|
||||
|
||||
// Context menu state
|
||||
let contextMenuVisible = $state(false);
|
||||
|
|
@ -29,35 +39,41 @@
|
|||
{
|
||||
id: 'edit',
|
||||
label: 'Bearbeiten',
|
||||
icon: PencilSimple,
|
||||
action: () => handleExpandTask(task.id),
|
||||
},
|
||||
{
|
||||
id: 'toggle-complete',
|
||||
label: task.isCompleted ? 'Als offen markieren' : 'Als erledigt markieren',
|
||||
icon: task.isCompleted ? ArrowCircleUp : CheckSquare,
|
||||
action: () => handleToggleComplete(task),
|
||||
},
|
||||
{ id: 'divider-1', label: '', type: 'divider' },
|
||||
{
|
||||
id: 'priority-low',
|
||||
label: 'Niedrig',
|
||||
icon: ArrowDown,
|
||||
action: () => handleSetPriority(task.id, 'low'),
|
||||
disabled: task.priority === 'low',
|
||||
},
|
||||
{
|
||||
id: 'priority-medium',
|
||||
label: 'Mittel',
|
||||
icon: ArrowRight,
|
||||
action: () => handleSetPriority(task.id, 'medium'),
|
||||
disabled: task.priority === 'medium',
|
||||
},
|
||||
{
|
||||
id: 'priority-high',
|
||||
label: 'Hoch',
|
||||
icon: ArrowUp,
|
||||
action: () => handleSetPriority(task.id, 'high'),
|
||||
disabled: task.priority === 'high',
|
||||
},
|
||||
{
|
||||
id: 'priority-urgent',
|
||||
label: 'Dringend',
|
||||
icon: Lightning,
|
||||
action: () => handleSetPriority(task.id, 'urgent'),
|
||||
disabled: task.priority === 'urgent',
|
||||
},
|
||||
|
|
@ -67,6 +83,7 @@
|
|||
items.push({
|
||||
id: 'delete',
|
||||
label: 'Löschen',
|
||||
icon: Trash,
|
||||
variant: 'danger',
|
||||
action: () => handleDelete(task.id),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue