Repository navigation
Expand file tree
/
Copy pathfix_screen_render.py
More file actions
91 lines (71 loc) · 3.19 KB
/
Copy pathfix_screen_render.py
File metadata and controls
91 lines (71 loc) · 3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import re
with open("src/app/page.tsx", "r") as f:
text = f.read()
old_block = """ {activeScreen === 'pipeline' && (
<PipelineScreen />
)}
{activeScreen === 'assistant' && (
<AssistantScreen />
)}
{activeScreen === 'clients' && (
<ClientsScreen />
)}
{activeScreen === 'invoices' && (
<InvoicesScreen />
)}
{activeScreen === 'agents' && (
<AgentsScreen />
)}
{activeScreen === 'mcp' && (
<MCPScreen />
)}
{activeScreen === 'security' && (
<SecurityScreen />
)}
{activeScreen !== 'dashboard' && activeScreen !== 'pipeline' && activeScreen !== 'invoices' && activeScreen !== 'clients' && activeScreen !== 'agents' && activeScreen !== 'mcp' && activeScreen !== 'security' && activeScreen !== 'assistant' && (
<div className="w-full h-full min-h-[400px] flex items-center justify-center flex-col text-[#94a3b8]">
<div className="text-[48px] font-heading tracking-tight text-[#cbd5e1] capitalize mb-3">
{activeScreen} View
</div>
<p className="font-sans text-[#64748b] text-center max-w-sm">
This layout is perfectly restored to the HTML prototype structure while keeping the skeuomorphic Light Mode aesthetics.
</p>
</div>
)}"""
new_block = """ {activeScreen === 'pipeline' && (
<PipelineScreen />
)}
{activeScreen === 'jobs' && (
<JobsScreen />
)}
{activeScreen === 'candidates' && (
<CandidatesScreen />
)}
{activeScreen === 'approvals' && (
<ApprovalsScreen />
)}
{activeScreen === 'audit' && (
<AuditScreen />
)}
{activeScreen === 'team' && (
<TeamScreen />
)}
{activeScreen === 'settings' && (
<SettingsScreen />
)}
{activeScreen === 'agents' && (
<AgentsScreen />
)}
{activeScreen !== 'dashboard' && activeScreen !== 'pipeline' && activeScreen !== 'jobs' && activeScreen !== 'candidates' && activeScreen !== 'approvals' && activeScreen !== 'audit' && activeScreen !== 'team' && activeScreen !== 'settings' && activeScreen !== 'agents' && (
<div className="w-full h-full min-h-[400px] flex items-center justify-center flex-col text-[#94a3b8]">
<div className="text-[48px] font-heading tracking-tight text-[#cbd5e1] capitalize mb-3">
{activeScreen} View
</div>
<p className="font-sans text-[#64748b] text-center max-w-sm">
This layout is perfectly restored to the HTML prototype structure while keeping the skeuomorphic Light Mode aesthetics.
</p>
</div>
)}"""
text = text.replace(old_block, new_block)
with open("src/app/page.tsx", "w") as f:
f.write(text)