Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e832e9d

Browse files
Anil-matchaclaude
andcommitted
feat: add Workflows and Agents tabs to Electron vanilla JS build
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
1 parent a45b7a5 commit e832e9d

4 files changed

Lines changed: 59 additions & 1 deletion

File tree

src/components/AgentStudio.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
export function AgentStudio() {
2+
const container = document.createElement('div');
3+
container.className = 'w-full h-full flex flex-col items-center justify-center bg-app-bg text-white gap-4';
4+
5+
const icon = document.createElement('div');
6+
icon.innerHTML = `<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.4">
7+
<path d="M12 2a4 4 0 0 1 4 4 4 4 0 0 1-4 4 4 4 0 0 1-4-4 4 4 0 0 1 4-4"/>
8+
<path d="M8 14a6 6 0 0 0-6 6h20a6 6 0 0 0-6-6H8z"/>
9+
<path d="M9 9h.01M15 9h.01"/>
10+
</svg>`;
11+
12+
const title = document.createElement('p');
13+
title.textContent = 'Agent Studio';
14+
title.className = 'text-lg font-bold opacity-60';
15+
16+
const sub = document.createElement('p');
17+
sub.textContent = 'Available in the web app at open-generative-ai.com';
18+
sub.className = 'text-sm opacity-40';
19+
20+
container.appendChild(icon);
21+
container.appendChild(title);
22+
container.appendChild(sub);
23+
return container;
24+
}

src/components/Header.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function Header(navigate) {
2727

2828
const menu = document.createElement('nav');
2929
menu.className = 'hidden lg:flex items-center gap-6 text-[13px] font-bold text-secondary';
30-
const items = ['Image', 'Video', 'Lip Sync', 'Cinema Studio'];
30+
const items = ['Image', 'Video', 'Lip Sync', 'Cinema Studio', 'Workflows', 'Agents'];
3131

3232
items.forEach(item => {
3333
const link = document.createElement('a');
@@ -51,6 +51,8 @@ export function Header(navigate) {
5151
else if (item === 'Video') navigate('video');
5252
else if (item === 'Lip Sync') navigate('lipsync');
5353
else if (item === 'Cinema Studio') navigate('cinema');
54+
else if (item === 'Workflows') navigate('workflows');
55+
else if (item === 'Agents') navigate('agents');
5456
};
5557

5658
menu.appendChild(link);

src/components/WorkflowStudio.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
export function WorkflowStudio() {
2+
const container = document.createElement('div');
3+
container.className = 'w-full h-full flex flex-col items-center justify-center bg-app-bg text-white gap-4';
4+
5+
const icon = document.createElement('div');
6+
icon.innerHTML = `<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.4">
7+
<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/>
8+
<rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/>
9+
<path d="M6.5 10v4M17.5 10v4M10 6.5h4M10 17.5h4"/>
10+
</svg>`;
11+
12+
const title = document.createElement('p');
13+
title.textContent = 'Workflow Studio';
14+
title.className = 'text-lg font-bold opacity-60';
15+
16+
const sub = document.createElement('p');
17+
sub.textContent = 'Available in the web app at open-generative-ai.com';
18+
sub.className = 'text-sm opacity-40';
19+
20+
container.appendChild(icon);
21+
container.appendChild(title);
22+
container.appendChild(sub);
23+
return container;
24+
}

src/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ function navigate(page) {
2424
import('./components/LipSyncStudio.js').then(({ LipSyncStudio }) => {
2525
contentArea.appendChild(LipSyncStudio());
2626
});
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+
});
2735
}
2836
}
2937

0 commit comments

Comments
 (0)