Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,7 +76,7 @@ def logout(ip, cookie, account):
|
|
| 76 |
custom_css = """
|
| 77 |
.mock-panel { background-color: #f0f4f8; padding: 15px; border-radius: 8px; border: 1px dashed #7b9bb3; }
|
| 78 |
.login-container { max-width: 500px; margin: 0 auto; padding: 20px; }
|
| 79 |
-
.placeholder-box { background-color: #e9ecef; border: 2px dashed #ced4da; text-align: center; color:
|
| 80 |
.ntut-title { color: #d9534f; font-size: 22px; font-weight: bold; text-align: center; margin-bottom: 20px;}
|
| 81 |
"""
|
| 82 |
|
|
@@ -87,7 +87,7 @@ with gr.Blocks(title="模擬校園入口與Log收集系統", css=custom_css) as
|
|
| 87 |
# 左側:後端 Log 與環境模擬區
|
| 88 |
# ==========================================
|
| 89 |
with gr.Column(scale=1, elem_classes="mock-panel"):
|
| 90 |
-
gr.Markdown("
|
| 91 |
|
| 92 |
mock_ip = gr.Dropdown(
|
| 93 |
label="模擬來源 IP",
|
|
@@ -102,7 +102,7 @@ with gr.Blocks(title="模擬校園入口與Log收集系統", css=custom_css) as
|
|
| 102 |
)
|
| 103 |
|
| 104 |
gr.Markdown("---")
|
| 105 |
-
gr.Markdown("
|
| 106 |
log_display = gr.Dataframe(
|
| 107 |
headers=["timestamp", "ip_address", "cookie_id", "account", "role", "action", "status"],
|
| 108 |
datatype=["str", "str", "str", "str", "str", "str", "str"],
|
|
@@ -128,7 +128,7 @@ with gr.Blocks(title="模擬校園入口與Log收集系統", css=custom_css) as
|
|
| 128 |
pwd_input = gr.Textbox(label="使用者密碼 (Password)", type="password", placeholder="密碼皆為 1234")
|
| 129 |
|
| 130 |
with gr.Row():
|
| 131 |
-
gr.HTML("<div style='background:#fdfd96; padding:10px; font-weight:bold; letter-spacing: 3px; border:1px solid #ccc; text-align:center;'>F E I K</div>")
|
| 132 |
with gr.Row():
|
| 133 |
captcha_input = gr.Textbox(label="請輸入驗證碼 (Keyin Code)")
|
| 134 |
|
|
|
|
| 76 |
custom_css = """
|
| 77 |
.mock-panel { background-color: #f0f4f8; padding: 15px; border-radius: 8px; border: 1px dashed #7b9bb3; }
|
| 78 |
.login-container { max-width: 500px; margin: 0 auto; padding: 20px; }
|
| 79 |
+
.placeholder-box { background-color: #e9ecef; border: 2px dashed #ced4da; text-align: center; color: black; padding: 40px 0; margin-bottom: 15px; border-radius: 5px; }
|
| 80 |
.ntut-title { color: #d9534f; font-size: 22px; font-weight: bold; text-align: center; margin-bottom: 20px;}
|
| 81 |
"""
|
| 82 |
|
|
|
|
| 87 |
# 左側:後端 Log 與環境模擬區
|
| 88 |
# ==========================================
|
| 89 |
with gr.Column(scale=1, elem_classes="mock-panel"):
|
| 90 |
+
gr.Markdown("<h3 style='color: black;'>⚙️ 環境變數模擬器 (負責控制右側使用者的連線狀態)</h3>")
|
| 91 |
|
| 92 |
mock_ip = gr.Dropdown(
|
| 93 |
label="模擬來源 IP",
|
|
|
|
| 102 |
)
|
| 103 |
|
| 104 |
gr.Markdown("---")
|
| 105 |
+
gr.Markdown("<h3 style='color: black;'>📊 即時 Log 收集區</h3>")
|
| 106 |
log_display = gr.Dataframe(
|
| 107 |
headers=["timestamp", "ip_address", "cookie_id", "account", "role", "action", "status"],
|
| 108 |
datatype=["str", "str", "str", "str", "str", "str", "str"],
|
|
|
|
| 128 |
pwd_input = gr.Textbox(label="使用者密碼 (Password)", type="password", placeholder="密碼皆為 1234")
|
| 129 |
|
| 130 |
with gr.Row():
|
| 131 |
+
gr.HTML("<div style='background:#fdfd96; padding:10px; font-weight:bold; letter-spacing: 3px; border:1px solid #ccc; text-align:center; color: black;'>F E I K</div>")
|
| 132 |
with gr.Row():
|
| 133 |
captcha_input = gr.Textbox(label="請輸入驗證碼 (Keyin Code)")
|
| 134 |
|