feat: improve mobile board experience

This commit is contained in:
ajnart committed 2026-07-28 19:39:12 +02:00
1 parent bc57f9579d
commit 7c0e98c55b
46 files changed
+1455 -130

No files matched your search

@@ -83,6 +83,7 @@ export default function DownloadClientsWidget({
integrationIds,
options,
setOptions,
displayMode,
}: WidgetComponentProps<"downloads">) {
const integrationsWithInteractions = useIntegrationsWithInteractAccess().flatMap(({ id }) =>
integrationIds.includes(id) ? [id] : [],
@@ -605,6 +606,23 @@ export default function DownloadClientsWidget({
{ up: 0, down: 0 },
);
if (displayMode === "mobileSummary") {
const totalDownloadSpeed = clients.reduce((total, { status }) => total + (status?.rates.down ?? 0), 0);
return (
<Center h="100%" p="md">
<Stack align="center" gap={4} maw="100%">
<Text fw={700} size="xl">
{data.length}
</Text>
<Text c="dimmed" size="sm" lineClamp={1}>
{`${t("items.downSpeed.columnTitle")}: ${formatByteRate(totalDownloadSpeed)}`}
</Text>
</Stack>
</Center>
);
}
if (options.columns.length === 0)
return (
<Center h="100%">
+6
View File
@@ -33,6 +33,12 @@ const columnsSort = columnsList.filter((column) =>
export const { definition, componentLoader } = createWidgetDefinition("downloads", {
icon: IconDownload,
mobile: {
width: 2,
height: 1,
supportsCompactSummary: true,
supportsDetailView: true,
},
refetchInterval: 5,
createOptions() {
return optionsBuilder.from(