Spaces:
Sleeping
Sleeping
Update UI with hacker theme styling
Browse files- src/webui/interface.py +45 -23
src/webui/interface.py
CHANGED
|
@@ -15,6 +15,7 @@ from src.webui.webui_manager import WebuiManager
|
|
| 15 |
from src.webui.components.agent_settings_tab import create_agent_settings_tab
|
| 16 |
from src.webui.components.browser_settings_tab import create_browser_settings_tab
|
| 17 |
from src.webui.components.browser_use_agent_tab import create_browser_use_agent_tab
|
|
|
|
| 18 |
|
| 19 |
theme_map = {
|
| 20 |
"Default": gr.themes.Default(),
|
|
@@ -24,18 +25,22 @@ theme_map = {
|
|
| 24 |
"Origin": gr.themes.Origin(),
|
| 25 |
"Citrus": gr.themes.Citrus(),
|
| 26 |
"Ocean": gr.themes.Ocean(),
|
| 27 |
-
"Base": gr.themes.Base()
|
|
|
|
| 28 |
}
|
| 29 |
|
| 30 |
|
| 31 |
-
def create_ui(theme_name="
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
| 33 |
.gradio-container {
|
| 34 |
-
width:
|
| 35 |
-
max-width:
|
| 36 |
margin-left: auto !important;
|
| 37 |
margin-right: auto !important;
|
| 38 |
-
padding-top:
|
| 39 |
}
|
| 40 |
.header-text {
|
| 41 |
text-align: center;
|
|
@@ -45,9 +50,10 @@ def create_ui(theme_name="Ocean"):
|
|
| 45 |
left: 0 !important;
|
| 46 |
right: 0 !important;
|
| 47 |
z-index: 1000 !important;
|
| 48 |
-
background
|
| 49 |
-
padding:
|
| 50 |
-
border-bottom:
|
|
|
|
| 51 |
box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
|
| 52 |
line-height: 1.2 !important;
|
| 53 |
}
|
|
@@ -132,38 +138,54 @@ def create_ui(theme_name="Ocean"):
|
|
| 132 |
""",
|
| 133 |
) as demo:
|
| 134 |
with gr.Row():
|
| 135 |
-
gr.
|
| 136 |
"""
|
| 137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
""",
|
| 139 |
elem_classes=["header-text"],
|
| 140 |
)
|
| 141 |
|
| 142 |
with gr.Tabs() as tabs:
|
| 143 |
-
with gr.TabItem("⚙️
|
| 144 |
create_agent_settings_tab(ui_manager)
|
| 145 |
|
| 146 |
-
with gr.TabItem("🌐
|
| 147 |
create_browser_settings_tab(ui_manager)
|
| 148 |
|
| 149 |
-
with gr.TabItem("
|
| 150 |
create_browser_use_agent_tab(ui_manager)
|
| 151 |
|
| 152 |
# Custom Footer
|
| 153 |
with gr.Row():
|
| 154 |
gr.HTML(
|
| 155 |
"""
|
| 156 |
-
<div style="text-align: center; margin-top:
|
| 157 |
-
<p style="margin:
|
| 158 |
-
|
| 159 |
-
Connect with Builder
|
| 160 |
-
</a>
|
| 161 |
</p>
|
| 162 |
-
<p style="margin:
|
| 163 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
</p>
|
| 165 |
-
<p style="margin:
|
| 166 |
-
|
| 167 |
</p>
|
| 168 |
</div>
|
| 169 |
<style>
|
|
|
|
| 15 |
from src.webui.components.agent_settings_tab import create_agent_settings_tab
|
| 16 |
from src.webui.components.browser_settings_tab import create_browser_settings_tab
|
| 17 |
from src.webui.components.browser_use_agent_tab import create_browser_use_agent_tab
|
| 18 |
+
from src.webui.hacker_theme import get_hacker_theme
|
| 19 |
|
| 20 |
theme_map = {
|
| 21 |
"Default": gr.themes.Default(),
|
|
|
|
| 25 |
"Origin": gr.themes.Origin(),
|
| 26 |
"Citrus": gr.themes.Citrus(),
|
| 27 |
"Ocean": gr.themes.Ocean(),
|
| 28 |
+
"Base": gr.themes.Base(),
|
| 29 |
+
"Hacker": get_hacker_theme()[0]
|
| 30 |
}
|
| 31 |
|
| 32 |
|
| 33 |
+
def create_ui(theme_name="Hacker"):
|
| 34 |
+
# Get hacker theme CSS
|
| 35 |
+
hacker_theme, hacker_css = get_hacker_theme()
|
| 36 |
+
|
| 37 |
+
css = hacker_css + """
|
| 38 |
.gradio-container {
|
| 39 |
+
width: 85vw !important;
|
| 40 |
+
max-width: 85% !important;
|
| 41 |
margin-left: auto !important;
|
| 42 |
margin-right: auto !important;
|
| 43 |
+
padding-top: 120px !important;
|
| 44 |
}
|
| 45 |
.header-text {
|
| 46 |
text-align: center;
|
|
|
|
| 50 |
left: 0 !important;
|
| 51 |
right: 0 !important;
|
| 52 |
z-index: 1000 !important;
|
| 53 |
+
background: linear-gradient(135deg, #0a0e27 0%, #1a0e3a 100%) !important;
|
| 54 |
+
padding: 25px 0 !important;
|
| 55 |
+
border-bottom: 3px solid #00ff88 !important;
|
| 56 |
+
box-shadow: 0 4px 20px rgba(0, 255, 255, 0.3) !important;
|
| 57 |
box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
|
| 58 |
line-height: 1.2 !important;
|
| 59 |
}
|
|
|
|
| 138 |
""",
|
| 139 |
) as demo:
|
| 140 |
with gr.Row():
|
| 141 |
+
gr.HTML(
|
| 142 |
"""
|
| 143 |
+
<div class="header-text matrix-text">
|
| 144 |
+
<h1 style="font-size: 3em; margin: 0; background: linear-gradient(90deg, #00ff88, #00ffff, #ff00ff, #00ff88); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: matrix-rain 3s linear infinite;">
|
| 145 |
+
⚡ FAGUN CYBER TESTING LAB ⚡
|
| 146 |
+
</h1>
|
| 147 |
+
<h3 style="margin: 10px 0 0 0; color: #00ffff; text-shadow: 0 0 10px #00ffff; letter-spacing: 3px;">
|
| 148 |
+
[ BROWSER AUTOMATION • SECURITY TESTING • AI POWERED ]
|
| 149 |
+
</h3>
|
| 150 |
+
<p style="margin: 5px 0 0 0; color: #00ff88; font-size: 0.9em; letter-spacing: 2px;">
|
| 151 |
+
>> SYSTEM STATUS: <span style="color: #00ffff; text-shadow: 0 0 5px #00ffff;">ONLINE</span> <<
|
| 152 |
+
</p>
|
| 153 |
+
</div>
|
| 154 |
""",
|
| 155 |
elem_classes=["header-text"],
|
| 156 |
)
|
| 157 |
|
| 158 |
with gr.Tabs() as tabs:
|
| 159 |
+
with gr.TabItem("⚙️ AGENT CONFIG"):
|
| 160 |
create_agent_settings_tab(ui_manager)
|
| 161 |
|
| 162 |
+
with gr.TabItem("🌐 BROWSER SETUP"):
|
| 163 |
create_browser_settings_tab(ui_manager)
|
| 164 |
|
| 165 |
+
with gr.TabItem("⚡ EXECUTE MISSION"):
|
| 166 |
create_browser_use_agent_tab(ui_manager)
|
| 167 |
|
| 168 |
# Custom Footer
|
| 169 |
with gr.Row():
|
| 170 |
gr.HTML(
|
| 171 |
"""
|
| 172 |
+
<div style="text-align: center; margin-top: 30px; padding: 20px; border-top: 2px solid #00ff88; background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(0, 255, 255, 0.05));">
|
| 173 |
+
<p style="margin: 10px 0; color: #00ffff; font-size: 0.9em; letter-spacing: 1px;">
|
| 174 |
+
>> CONNECT WITH THE ARCHITECT <<
|
|
|
|
|
|
|
| 175 |
</p>
|
| 176 |
+
<p style="margin: 10px 0; font-weight: bold; font-size: 1.3em; background: linear-gradient(90deg, #00ff88, #00ffff, #ff00ff, #00ff88); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: matrix-rain 3s linear infinite; letter-spacing: 2px;">
|
| 177 |
+
MEJBAUR BAHAR FAGUN
|
| 178 |
+
</p>
|
| 179 |
+
<p style="margin: 10px 0; color: #ff00ff; font-size: 1em; text-shadow: 0 0 5px #ff00ff; letter-spacing: 1px;">
|
| 180 |
+
[ SOFTWARE ENGINEER IN TEST ]
|
| 181 |
+
</p>
|
| 182 |
+
<p style="margin: 15px 0;">
|
| 183 |
+
<a href="https://www.linkedin.com/in/mejbaur/" target="_blank" style="text-decoration: none; color: #00ff88; font-weight: 600; padding: 10px 20px; border: 2px solid #00ff88; border-radius: 6px; display: inline-block; transition: all 0.3s ease; letter-spacing: 1px;">
|
| 184 |
+
🔗 LINKEDIN PROFILE
|
| 185 |
+
</a>
|
| 186 |
</p>
|
| 187 |
+
<p style="margin: 10px 0; color: #00ffff; font-size: 0.8em; font-family: 'Fira Code', monospace;">
|
| 188 |
+
>> SYSTEM BUILD: v2.0.0 | STATUS: OPERATIONAL | UPTIME: 99.9% <<
|
| 189 |
</p>
|
| 190 |
</div>
|
| 191 |
<style>
|