From d0cc48ad63121f2560569fa77c8514b792992f84 Mon Sep 17 00:00:00 2001 From: snaily Date: Sat, 5 Apr 2025 23:14:37 +0800 Subject: [PATCH] =?UTF-8?q?Refactor:=20=E4=BC=98=E5=8C=96=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=BC=96=E8=BE=91=E5=99=A8=E6=A8=A1=E6=80=81=E6=A1=86?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=B8=8E=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整模态框 CSS (`app/static/css/config_editor.css`): - 将 `position` 改回 `fixed` 以确保其相对于视口定位。 - 移除 `overflow: auto`,因为模态框内容通常不需要滚动条。 - 移除 `backdrop-filter: blur(5px)` 以简化背景效果。 - 添加 `align-items: center` 和 `justify-content: center` 以在 flex 容器中更好地居中模态框。 - 调整模态框 HTML (`app/templates/config_editor.html`): - 将 `apiKeyModal` 和 `resetConfirmModal` 两个模态框的 HTML 结构从主配置表单容器中移出,放置到 `` 标签之前。这有助于改善 DOM 结构,并可能解决潜在的层叠或定位问题。 这些更改旨在改进配置编辑器页面上模态框的显示效果、定位方式和 DOM 结构。 --- app/static/css/config_editor.css | 8 +++-- app/templates/config_editor.html | 54 ++++++++++++++++---------------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/app/static/css/config_editor.css b/app/static/css/config_editor.css index ed0f002..87f97f8 100644 --- a/app/static/css/config_editor.css +++ b/app/static/css/config_editor.css @@ -616,15 +616,17 @@ input:checked + .toggle-slider:before { /* Modal Styles */ .modal { display: none; /* Hidden by default */ - position: fixed; /* Stay in place */ + position: fixed; /* Change back to fixed */ z-index: 1001; /* Sit on top */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ - overflow: auto; /* Enable scroll if needed */ + /* overflow: auto; Removed */ background-color: rgba(0,0,0,0.6); /* Black w/ opacity */ - backdrop-filter: blur(5px); + /* backdrop-filter: blur(5px); Removed */ + align-items: center; + justify-content: center; } .modal.show { diff --git a/app/templates/config_editor.html b/app/templates/config_editor.html index 7bbdfc6..fd29aca 100644 --- a/app/templates/config_editor.html +++ b/app/templates/config_editor.html @@ -62,33 +62,6 @@ Gemini API密钥列表,每行一个 - - - - - -
@@ -321,6 +294,33 @@ © by snailysnaily | GitHub
+ + + + + +