resolve issues with new features

This commit is contained in:
Matthias Hochmeister
2026-03-12 11:37:25 +01:00
parent d5be68ca63
commit 71a04aee89
38 changed files with 699 additions and 108 deletions

View File

@@ -77,7 +77,7 @@ const BookStackRecentWidget: React.FC = () => {
});
const configured = data?.configured ?? true;
const pages = data?.data ?? [];
const pages = (data?.data ?? []).slice(0, 5);
if (!configured) {
return (

View File

@@ -19,6 +19,7 @@ import { de } from 'date-fns/locale';
import { nextcloudApi } from '../../services/nextcloud';
import type { NextcloudConversation } from '../../types/nextcloud.types';
import { safeOpenUrl } from '../../utils/safeOpenUrl';
import { useCountUp } from '../../hooks/useCountUp';
const POLL_INTERVAL = 2000;
const POLL_TIMEOUT = 5 * 60 * 1000;
@@ -112,6 +113,7 @@ const NextcloudTalkWidget: React.FC = () => {
const connected = data?.connected ?? false;
const conversations = data?.conversations?.slice(0, 5) ?? [];
const totalUnread = data?.totalUnread ?? 0;
const animatedUnread = useCountUp(totalUnread);
const stopPolling = useCallback(() => {
if (pollIntervalRef.current) {
@@ -199,7 +201,7 @@ const NextcloudTalkWidget: React.FC = () => {
</Typography>
{connected && totalUnread > 0 && (
<Chip
label={`${totalUnread} ungelesen`}
label={`${animatedUnread} ungelesen`}
size="small"
color="primary"
variant="outlined"

View File

@@ -15,6 +15,7 @@ import { de } from 'date-fns/locale';
import { vikunjaApi } from '../../services/vikunja';
import type { VikunjaTask } from '../../types/vikunja.types';
import { safeOpenUrl } from '../../utils/safeOpenUrl';
import { useCountUp } from '../../hooks/useCountUp';
const PRIORITY_LABELS: Record<number, { label: string; color: 'default' | 'warning' | 'error' }> = {
0: { label: 'Keine', color: 'default' },
@@ -95,6 +96,7 @@ const VikunjaMyTasksWidget: React.FC = () => {
const configured = data?.configured ?? true;
const tasks = data?.data ?? [];
const animatedTaskCount = useCountUp(tasks.length);
if (!configured) {
return (
@@ -129,7 +131,7 @@ const VikunjaMyTasksWidget: React.FC = () => {
Meine Aufgaben
</Typography>
{!isLoading && !isError && tasks.length > 0 && (
<Chip label={tasks.length} size="small" color="primary" />
<Chip label={animatedTaskCount} size="small" color="primary" />
)}
</Box>