Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.
TypeScript agent-skillscodex-clideskop-appdubbingimage-generationlocalizationskillsttsvideo-editingvideo-generationvideo-transcriptionvideo-translation
feat(web): separate recommended and all workbench tabs
Leggett180f480361b1
diff --git a/apps/web/src/features/dashboard/DashboardPage.test.tsx b/apps/web/src/features/dashboard/DashboardPage.test.tsxindex fbd8b1d4..0e4d7d7b 100644--- a/apps/web/src/features/dashboard/DashboardPage.test.tsx+++ b/apps/web/src/features/dashboard/DashboardPage.test.tsx@@ -769,6 +769,8 @@ describe('DashboardPage', () => {expect(screen.getByRole('heading', { name: 'Dashboard', level: 1 })).toBeInTheDocument();expect(screen.getByRole('heading', { name: 'Featured apps' })).toBeInTheDocument();+ expect(screen.getAllByRole('tab').slice(0, 2).map(tab => tab.textContent)).toEqual(['Recommended', 'All']);+ expect(screen.getByRole('tab', { name: 'Recommended' })).toHaveAttribute('aria-selected', 'true');expect(screen.getByRole('tab', { name: 'Video Editing' })).toBeInTheDocument();expect(screen.getByRole('searchbox', { name: 'Search apps' })).toBeInTheDocument();expect(screen.getByText('Translate & Dub Video')).toBeInTheDocument();@@ -852,6 +854,8 @@ describe('DashboardPage', () => {.toHaveAttribute('src', '/dashboard/templates/image-generation-cover.png');expect(screen.getByRole('region', { name: '创作应用' })).toBeInTheDocument();expect(screen.getByRole('searchbox', { name: '搜索应用' })).toBeInTheDocument();+ expect(screen.getAllByRole('tab').slice(0, 2).map(tab => tab.textContent)).toEqual(['推荐', '全部']);+ expect(screen.getByRole('tab', { name: '推荐' })).toHaveAttribute('aria-selected', 'true');const videoTranslationCard = screen.getByRole('button', { name: /^视频翻译/ });expect(within(videoTranslationCard).getByText('HOT')).toBeInTheDocument();const appCards = Array.from(container.querySelectorAll('.dashboard-app-card'));@@ -871,6 +875,28 @@ describe('DashboardPage', () => {expect(screen.queryByRole('button', { name: /^数字人口播/ })).not.toBeInTheDocument();});+ it('lists every available module in All and keeps Recommended curated', () => {+ const { container } = render(<DashboardPage onSelectPrompt={vi.fn()} />);++ fireEvent.click(screen.getByRole('tab', { name: '全部' }));+ expect(screen.getByRole('tab', { name: '全部' })).toHaveAttribute('aria-selected', 'true');+ expect(Array.from(container.querySelectorAll('.dashboard-app-card strong')).map(card => card.textContent))+ .toEqual([+ '视频下载', '视频翻译', '视频生成', '图像生成', '文章写作', '火柴人动画',+ '视频切片', '封面生成', '小红书帖子', '短视频脚本', '智能配音'+ ]);+ expect(screen.queryByRole('button', { name: /^数字人口播/ })).not.toBeInTheDocument();++ fireEvent.change(screen.getByRole('searchbox', { name: '搜索应用' }), { target: { value: '小红书' } });+ expect(container.querySelectorAll('.dashboard-app-card')).toHaveLength(1);+ expect(screen.getByRole('button', { name: /^小红书帖子/ })).toBeInTheDocument();++ fireEvent.change(screen.getByRole('searchbox', { name: '搜索应用' }), { target: { value: '' } });+ fireEvent.click(screen.getByRole('tab', { name: '推荐' }));+ expect(container.querySelectorAll('.dashboard-app-card')).toHaveLength(4);+ expect(screen.queryByRole('button', { name: /^小红书帖子/ })).not.toBeInTheDocument();+ });+it('opens the WeChat article writer from the app directory', () => {const { container } = render(<DashboardPage onSelectPrompt={vi.fn()} />);fireEvent.click(screen.getByRole('tab', { name: '文案创作' }));@@ -1890,8 +1916,8 @@ describe('DashboardPage', () => {expect(screen.getByText('没有找到相关应用')).toBeInTheDocument();fireEvent.click(screen.getByRole('button', { name: '查看全部应用' }));expect(screen.getByRole('tab', { name: '全部' })).toHaveAttribute('aria-selected', 'true');- expect(directory.querySelectorAll('.dashboard-app-card')).toHaveLength(4);- expect(within(directory).queryByRole('button', { name: /^封面生成/ })).not.toBeInTheDocument();+ expect(directory.querySelectorAll('.dashboard-app-card')).toHaveLength(11);+ expect(within(directory).getByRole('button', { name: /^封面生成/ })).toBeInTheDocument();fireEvent.click(screen.getByRole('tab', { name: '音频处理' }));expect(within(directory).getByRole('button', { name: /^智能配音/ })).toBeInTheDocument();diff --git a/apps/web/src/features/dashboard/DashboardPage.tsx b/apps/web/src/features/dashboard/DashboardPage.tsxindex 4085c329..4ed02c2e 100644--- a/apps/web/src/features/dashboard/DashboardPage.tsx+++ b/apps/web/src/features/dashboard/DashboardPage.tsx@@ -202,9 +202,9 @@ const creatorTools: DashboardEntry[] = [}];-const categories = ['全部', '视频创作', '视频编辑', '图像创作', '文案创作', '音频处理'] as const;+const categories = ['推荐', '全部', '视频创作', '视频编辑', '图像创作', '文案创作', '音频处理'] as const;type CategoryFilter = typeof categories[number];-const allTabWorkspaces = new Set<CreatorWorkspace>([+const recommendedTabWorkspaces = new Set<CreatorWorkspace>(['video-download','video-translation','video-generation',@@ -253,7 +253,7 @@ export default function DashboardPage(props: {const [workspaceOrigin, setWorkspaceOrigin] = useState<'home' | 'dashboard'>(() => props.skillLaunch === undefined ? 'dashboard' : 'home');- const [category, setCategory] = useState<CategoryFilter>('全部');+ const [category, setCategory] = useState<CategoryFilter>('推荐');const [query, setQuery] = useState('');const normalizedQuery = query.trim().toLocaleLowerCase();const localize = (value: string) => language === 'en-US'@@ -262,8 +262,7 @@ export default function DashboardPage(props: {const visibleTools = useMemo(() => creatorTools.filter(tool => {if (tool.workspace === undefined || !isVisibleCreatorWorkspace(tool.workspace)) return false;const matchesCategory = category === '全部'- ? allTabWorkspaces.has(tool.workspace)- : tool.category === category;+ || (category === '推荐' ? recommendedTabWorkspaces.has(tool.workspace) : tool.category === category);const matchesQuery = normalizedQuery.length === 0|| `${localize(tool.title)} ${localize(tool.description)} ${localize(tool.category)}`.toLocaleLowerCase()@@ -1017,6 +1016,7 @@ function createCreationKeySuffix(): string {}const englishDashboardLabels: Record<string, string> = {+ 推荐: 'Recommended',全部: 'All',内容创作: 'Content Creation',视频创作: 'Video Creation',