🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
✨ feat: add skeleton loading screen for video topic switching
YuTengjing67875bd60a5e
diff --git a/src/app/[variants]/(main)/video/features/VideoWorkspace/Content.tsx b/src/app/[variants]/(main)/video/features/VideoWorkspace/Content.tsxindex 5e5fe4cb234..cc9bd655866 100644--- a/src/app/[variants]/(main)/video/features/VideoWorkspace/Content.tsx+++ b/src/app/[variants]/(main)/video/features/VideoWorkspace/Content.tsx@@ -6,6 +6,7 @@ import { generationBatchSelectors, videoGenerationTopicSelectors } from '@/storeimport GenerationFeed from '../GenerationFeed';import PromptInput from '../PromptInput';import EmptyState from './EmptyState';+import SkeletonList from './SkeletonList';const VideoWorkspaceContent = () => {const activeTopicId = useVideoStore(videoGenerationTopicSelectors.activeGenerationTopicId);@@ -18,7 +19,7 @@ const VideoWorkspaceContent = () => {const hasGenerations = currentBatches && currentBatches.length > 0;if (!isCurrentGenerationTopicLoaded) {- return <PromptInput disableAnimation={true} showTitle={false} />;+ return <SkeletonList />;}if (!hasGenerations) return <EmptyState />;diff --git a/src/app/[variants]/(main)/video/features/VideoWorkspace/SkeletonList.tsx b/src/app/[variants]/(main)/video/features/VideoWorkspace/SkeletonList.tsxnew file mode 100644index 00000000000..cbd4b676248--- /dev/null+++ b/src/app/[variants]/(main)/video/features/VideoWorkspace/SkeletonList.tsx@@ -0,0 +1,46 @@+'use client';++import { Block, Center, Flexbox, Skeleton } from '@lobehub/ui';+import { memo } from 'react';++import PromptInput from '@/app/[variants]/(main)/video/features/PromptInput';++const SkeletonList = memo(() => {+ return (+ <Flexbox style={{ minHeight: 'calc(100vh - 44px)' }}>+ <Block variant={'borderless'}>+ <Flexbox gap={12}>+ {/* Prompt text skeleton */}+ <Skeleton.Button active style={{ height: 20, width: '95%' }} />++ {/* Metadata skeleton (model tag, resolution, aspect ratio) */}+ <Flexbox horizontal gap={4} style={{ marginBottom: 10 }}>+ <Skeleton.Button active style={{ height: 22, width: 120 }} />+ <Skeleton.Button active style={{ height: 22, width: 80 }} />+ <Skeleton.Button active style={{ height: 22, width: 60 }} />+ </Flexbox>++ {/* Video player skeleton */}+ <Skeleton.Button active style={{ aspectRatio: '16/9', height: 'auto', width: '100%' }} />++ {/* Timestamp skeleton */}+ <Skeleton.Button active style={{ height: 14, width: 140 }} />+ </Flexbox>+ </Block>+ <div style={{ flex: 1 }} />+ <Center+ style={{+ bottom: 24,+ position: 'sticky',+ width: '100%',+ }}+ >+ <PromptInput disableAnimation={true} showTitle={false} />+ </Center>+ </Flexbox>+ );+});++SkeletonList.displayName = 'SkeletonList';++export default SkeletonList;