mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
feat(lasts,firsts): register apps in web-internal registry mit DE-Namen
Lasts war im Workbench-Add-Page-Picker nicht findbar — mein M1-Commit setzte nur den MANA_APPS-Eintrag in shared-branding (für AppSlider/ Launcher), aber NICHT den parallelen registerApp-Eintrag im web- internen \$lib/app-registry/apps.ts (für Workbench-Scenes, DnD, Detail-Routes). - firsts: name "Firsts" → "Erste Male" - lasts: NEUER registerApp-Block mit name "Letzte Male", Hourglass icon, color #6366f1, contextMenuActions "Neues letztes Mal", collection 'lasts', paramKey 'lastId', dragType 'last', createItem ruft lastsStore.createSuspected. Workbench-Picker filtert nach name — die DE-Namen tauchen jetzt direkt in der Suche auf. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1398d76b41
commit
723a64808c
1 changed files with 37 additions and 1 deletions
|
|
@ -82,6 +82,7 @@ import {
|
|||
CoatHanger,
|
||||
NotePencil,
|
||||
FilmStrip,
|
||||
Hourglass,
|
||||
} from '@mana/shared-icons';
|
||||
|
||||
// ── Apps with entity capabilities ───────────────────────────
|
||||
|
|
@ -903,7 +904,7 @@ registerApp({
|
|||
|
||||
registerApp({
|
||||
id: 'firsts',
|
||||
name: 'Firsts',
|
||||
name: 'Erste Male',
|
||||
color: '#F59E0B',
|
||||
icon: NumberCircleOne,
|
||||
views: {
|
||||
|
|
@ -936,6 +937,41 @@ registerApp({
|
|||
},
|
||||
});
|
||||
|
||||
registerApp({
|
||||
id: 'lasts',
|
||||
name: 'Letzte Male',
|
||||
color: '#6366f1',
|
||||
icon: Hourglass,
|
||||
views: {
|
||||
list: { load: () => import('$lib/modules/lasts/ListView.svelte') },
|
||||
},
|
||||
contextMenuActions: [
|
||||
{
|
||||
id: 'new-last',
|
||||
label: 'Neues letztes Mal',
|
||||
icon: Plus,
|
||||
action: () =>
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('mana:quick-action', { detail: { app: 'lasts', action: 'new' } })
|
||||
),
|
||||
},
|
||||
],
|
||||
collection: 'lasts',
|
||||
paramKey: 'lastId',
|
||||
dragType: 'last',
|
||||
getDisplayData: (item) => ({
|
||||
title: (item.title as string) || 'Letztes Mal',
|
||||
subtitle: (item.date as string) ?? (item.status === 'suspected' ? 'Vermutet' : undefined),
|
||||
}),
|
||||
createItem: async (data) => {
|
||||
const { lastsStore } = await import('$lib/modules/lasts/stores/items.svelte');
|
||||
const last = await lastsStore.createSuspected({
|
||||
title: (data.title as string) ?? 'Neues letztes Mal',
|
||||
});
|
||||
return last.id;
|
||||
},
|
||||
});
|
||||
|
||||
registerApp({
|
||||
id: 'drink',
|
||||
name: 'Drink',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue