From 474fe7ced19e27d36b202dd93f4213fee0e5d952 Mon Sep 17 00:00:00 2001 From: yiling Date: Mon, 6 Jul 2026 11:06:09 +0800 Subject: [PATCH] fix(webui): center unread badge count --- packages/webui/routes/__root.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/webui/routes/__root.tsx b/packages/webui/routes/__root.tsx index 7c5eccee..fcc80f99 100644 --- a/packages/webui/routes/__root.tsx +++ b/packages/webui/routes/__root.tsx @@ -5,9 +5,12 @@ import { TopNav } from '@/ui/components/top-nav' import { HomeIcon, NotificationFillIcon, UploadCloudIcon } from '@/ui/components/ui/icons' import { Toaster } from '@/ui/components/ui/sonner' import { UploadTasks } from '@/ui/components/upload-tasks' +import { m } from '@/ui/paraglide/messages.js' +import { getLocale, setLocale } from '@/ui/paraglide/runtime.js' import { useAuthStore } from '@/ui/stores/auth' import { useTeamContextStore } from '@/ui/stores/team-context' import { useUploadStore } from '@/ui/stores/upload' +import { useUserMetadataStore } from '@/ui/stores/user-metadata' import { useQuery } from '@tanstack/react-query' import { createRootRouteWithContext, @@ -16,9 +19,6 @@ import { useRouterState, } from '@tanstack/react-router' import { useEffect } from 'react' -import { getLocale, setLocale } from '@/ui/paraglide/runtime.js' -import { m } from '@/ui/paraglide/messages.js' -import { useUserMetadataStore } from '@/ui/stores/user-metadata' async function resolveTeamIdFromPath(pathname: string): Promise { const teamIdMatch = pathname.match(/^\/teams\/([^/]+)/) @@ -73,7 +73,7 @@ function RootComponent() { const displayCount = unreadCount > 99 ? '99+' : unreadCount const badge = unreadCount > 0 ? ( - + {displayCount} ) : null