Merge pull request #94 from shumaiOne/feat/ui-refinements

feat(ui): refine file viewer toolbar and notification badge styling
This commit is contained in:
Yiling-J
2026-06-11 23:15:18 +08:00
committed by GitHub
2 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -1,15 +1,15 @@
import type { AssetInfo } from '@shumai/dtos'
import { useScreenSize } from '@/ui/hooks/useScreenSize'
import { getBestTranscode } from '@/ui/lib/media'
import { Minus, Plus, Copy, Download, Check } from 'lucide-react'
import type { AssetInfo } from '@shumai/dtos'
import { Check, Copy, Download, Minus, Plus } from 'lucide-react'
import type { RefObject } from 'react'
import { useEffect, useRef, useState } from 'react'
import type Player from 'video.js/dist/types/player'
import DrawingCanvas from './drawing-canvas'
import VideoPlayer from './viewers/video-player'
import type { Annotation } from '@/ui/types'
import { useAnnotationStore } from '@/ui/stores/annotation-store'
import type { Annotation } from '@/ui/types'
type FileViewerProps = {
file: AssetInfo
@@ -223,7 +223,7 @@ export function FileViewer({
/>
</div>
{/* Zoom Toolbar */}
<div className="relative px-4 py-3 bg-gray-50 dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 z-10 flex items-center justify-end gap-2 transition-colors duration-200">
<div className="relative px-4 py-3 bg-card border-t border-gray-200 dark:border-gray-700 z-10 flex items-center justify-end gap-2 transition-colors duration-200">
<div className="flex items-center gap-1 bg-gray-200/50 dark:bg-white/10 rounded-md p-0.5 mr-auto">
<button
onClick={() => handleZoom(0.8)}
+6 -6
View File
@@ -10,10 +10,10 @@ import { useTeamContextStore } from '@/ui/stores/team-context'
import { useUploadStore } from '@/ui/stores/upload'
import { useQuery } from '@tanstack/react-query'
import {
createRootRouteWithContext,
Outlet,
useNavigate,
useRouterState,
createRootRouteWithContext,
Outlet,
useNavigate,
useRouterState,
} from '@tanstack/react-router'
import { useEffect } from 'react'
@@ -64,9 +64,9 @@ function RootComponent() {
const displayCount = unreadCount > 99 ? '99+' : unreadCount
const badge =
unreadCount > 0 ? (
<div className="absolute -top-1 -right-1 min-w-[18px] h-[18px] px-1 bg-red-500 text-white rounded-full flex items-center justify-center text-[10px] font-bold border-2 border-slate-100 dark:border-slate-900 animate-pulse">
<span className="absolute top-0 -right-1 mt-1 inline-flex items-center px-1.5 py-0.5 rounded-full text-xs leading-4 bg-red-400 dark:bg-red-500 text-white pointer-events-none h-5 min-w-5">
{displayCount}
</div>
</span>
) : null
return (