diff --git a/apps/manacore/apps/web/src/lib/components/dashboard/WidgetContainer.svelte b/apps/manacore/apps/web/src/lib/components/dashboard/WidgetContainer.svelte index ed08aa2c1..097c3fb23 100644 --- a/apps/manacore/apps/web/src/lib/components/dashboard/WidgetContainer.svelte +++ b/apps/manacore/apps/web/src/lib/components/dashboard/WidgetContainer.svelte @@ -26,6 +26,9 @@ import ManadeckProgressWidget from './widgets/ManadeckProgressWidget.svelte'; import ClockTimersWidget from './widgets/ClockTimersWidget.svelte'; import StorageUsageWidget from './widgets/StorageUsageWidget.svelte'; + import MukkeLibraryWidget from './widgets/MukkeLibraryWidget.svelte'; + import PresiDecksWidget from './widgets/PresiDecksWidget.svelte'; + import ContextDocsWidget from './widgets/ContextDocsWidget.svelte'; interface Props { widget: WidgetConfig; @@ -67,6 +70,9 @@ 'manadeck-progress': ManadeckProgressWidget, 'clock-timers': ClockTimersWidget, 'storage-usage': StorageUsageWidget, + 'mukke-library': MukkeLibraryWidget, + 'presi-decks': PresiDecksWidget, + 'context-docs': ContextDocsWidget, } as const; const WidgetComponent = $derived(widgetComponents[widget.type]); diff --git a/apps/manacore/apps/web/src/lib/components/dashboard/widgets/ContextDocsWidget.svelte b/apps/manacore/apps/web/src/lib/components/dashboard/widgets/ContextDocsWidget.svelte new file mode 100644 index 000000000..2b3bd96c3 --- /dev/null +++ b/apps/manacore/apps/web/src/lib/components/dashboard/widgets/ContextDocsWidget.svelte @@ -0,0 +1,163 @@ + + +
+
+

+ 🧠 + {$_('dashboard.widgets.context.title')} +

+ {#if spaces.length > 0} + + {spaces.length} Spaces + + {/if} +
+ + {#if state === 'loading'} + + {:else if state === 'error'} + + {:else if documents.length === 0 && spaces.length === 0} +
+
📚
+

+ {$_('dashboard.widgets.context.empty')} +

+ + Space erstellen + +
+ {:else} + + {#if documents.length > 0} + + {:else} + + + {/if} + + + {/if} +
diff --git a/apps/manacore/apps/web/src/lib/components/dashboard/widgets/MukkeLibraryWidget.svelte b/apps/manacore/apps/web/src/lib/components/dashboard/widgets/MukkeLibraryWidget.svelte new file mode 100644 index 000000000..bfc327b4f --- /dev/null +++ b/apps/manacore/apps/web/src/lib/components/dashboard/widgets/MukkeLibraryWidget.svelte @@ -0,0 +1,132 @@ + + +
+
+

+ 🎵 + {$_('dashboard.widgets.mukke.title')} +

+
+ + {#if state === 'loading'} + + {:else if state === 'error'} + + {:else if !stats || stats.totalSongs === 0} +
+
🎶
+

+ {$_('dashboard.widgets.mukke.empty')} +

+ + Musik entdecken + +
+ {:else} + +
+
+
{stats.totalSongs}
+
Songs
+
+
+
{stats.totalPlaylists}
+
Playlists
+
+
+
{stats.favoriteCount}
+
Favoriten
+
+
+ + + {#if recentSongs.length > 0} +
+ {#each recentSongs as song} +
+ {song.favorite ? '❤️' : '🎵'} +
+

{song.title}

+ {#if song.artist} +

{song.artist}

+ {/if} +
+ {#if song.duration} + + {mukkeService.formatDuration(song.duration)} + + {/if} +
+ {/each} +
+ {/if} + + + {/if} +
diff --git a/apps/manacore/apps/web/src/lib/components/dashboard/widgets/PresiDecksWidget.svelte b/apps/manacore/apps/web/src/lib/components/dashboard/widgets/PresiDecksWidget.svelte new file mode 100644 index 000000000..7ca3842b0 --- /dev/null +++ b/apps/manacore/apps/web/src/lib/components/dashboard/widgets/PresiDecksWidget.svelte @@ -0,0 +1,124 @@ + + +
+
+

+ 📊 + {$_('dashboard.widgets.presi.title')} +

+ {#if decks.length > 0} + + {decks.length} + + {/if} +
+ + {#if state === 'loading'} + + {:else if state === 'error'} + + {:else if decks.length === 0} +
+
🎨
+

+ {$_('dashboard.widgets.presi.empty')} +

+ + Präsentation erstellen + +
+ {:else} + + + + {/if} +