fix: harden widget error feedback

This commit is contained in:
Thomas Camlong committed 2026-08-02 17:34:52 +02:00
1 parent f0d8e97f8d
commit 5010ecf188
5 files changed
+29 -8

No files matched your search

+11 -5
View File
@@ -1,6 +1,6 @@
"use client";
import { Badge, Group, ScrollArea, SimpleGrid, Stack, Text } from "@mantine/core";
import { Badge, Group, ScrollArea, SimpleGrid, Stack, Text, Tooltip } from "@mantine/core";
import { getQueryKey } from "@trpc/react-query";
import { clientApi } from "@homarr/api/client";
@@ -67,7 +67,7 @@ export default function AudioStatsWidget({
if (!currentlyPlaying) return null;
return (
<Group key={`${integrationId}:${session.sessionId}`} justify="space-between" wrap="nowrap" p="sm">
<Stack gap={0} style={{ minWidth: 0 }}>
<Stack gap={0} style={{ minWidth: 0, flex: 1 }}>
<Text size="sm" fw={600} truncate>
{currentlyPlaying.name}
</Text>
@@ -75,9 +75,15 @@ export default function AudioStatsWidget({
{currentlyPlaying.seasonName ?? currentlyPlaying.albumName ?? session.user.username}
</Text>
</Stack>
<Badge variant="light" style={{ flexShrink: 0 }}>
{session.sessionName}
</Badge>
<Tooltip
label={session.sessionName}
events={{ hover: true, focus: true, touch: true }}
position="left"
>
<Badge variant="light" maw="40%" style={{ flexShrink: 0 }} tabIndex={0}>
{session.sessionName}
</Badge>
</Tooltip>
</Group>
);
})}