(page)
| 7 | |
| 8 | // Router |
| 9 | function navigate(page) { |
| 10 | if (!contentArea) return; |
| 11 | contentArea.innerHTML = ''; |
| 12 | |
| 13 | if (page === 'image') { |
| 14 | contentArea.appendChild(ImageStudio()); |
| 15 | } else if (page === 'video') { |
| 16 | import('./components/VideoStudio.js').then(({ VideoStudio }) => { |
| 17 | contentArea.appendChild(VideoStudio()); |
| 18 | }); |
| 19 | } else if (page === 'cinema') { |
| 20 | import('./components/CinemaStudio.js').then(({ CinemaStudio }) => { |
| 21 | contentArea.appendChild(CinemaStudio()); |
| 22 | }); |
| 23 | } else if (page === 'lipsync') { |
| 24 | import('./components/LipSyncStudio.js').then(({ LipSyncStudio }) => { |
| 25 | contentArea.appendChild(LipSyncStudio()); |
| 26 | }); |
| 27 | } else if (page === 'workflows') { |
| 28 | import('./components/WorkflowStudio.js').then(({ WorkflowStudio }) => { |
| 29 | contentArea.appendChild(WorkflowStudio()); |
| 30 | }); |
| 31 | } else if (page === 'agents') { |
| 32 | import('./components/AgentStudio.js').then(({ AgentStudio }) => { |
| 33 | contentArea.appendChild(AgentStudio()); |
| 34 | }); |
| 35 | } else if (page === 'mcp-cli') { |
| 36 | import('./components/McpCliStudio.js').then(({ McpCliStudio }) => { |
| 37 | contentArea.appendChild(McpCliStudio()); |
| 38 | }); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | app.innerHTML = ''; |
| 43 | // Pass navigate to Header so links work |
no test coverage detected