From 8a35a2535864133f9c39ecd714854da6f3c1d776 Mon Sep 17 00:00:00 2001 From: x1ao4 Date: Thu, 9 Oct 2025 23:47:27 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=20Toast=20=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E4=B8=BA=E5=86=85=E5=AE=B9=E8=87=AA=E9=80=82=E5=BA=94?= =?UTF-8?q?=E5=B9=B6=E7=BB=9F=E4=B8=80=E5=B1=85=E4=B8=AD=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除固定宽度上限,按内容自适应宽度 - 超长时最大宽度改为 calc(100vw - 20px),页面左右边距各 10px - 始终居中显示:容器居中 + 显示阶段强制 inline-block - 固定顶部距离为 64px,内容换行不影响上边距 - 文本自动换行且保持居中,对超长英文/URL 友好 - 微调垂直内边距,总高度净减少 1px - 桌面端与移动端样式一致,不影响其他组件/交互 --- app/static/css/main.css | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/app/static/css/main.css b/app/static/css/main.css index 08b81a2..e73997c 100644 --- a/app/static/css/main.css +++ b/app/static/css/main.css @@ -101,23 +101,35 @@ body.login-page { /* --------------- Toast 通知组件 --------------- */ .toast-container-center { position: fixed; - top: 90.5px; - left: 50%; - transform: translate(-50%, -50%); + top: 64px; + left: 0; + right: 0; + margin: 0 auto; + transform: none; /* 固定顶部距离,不随内容高度变化 */ z-index: 9999; - width: auto; - max-width: 80%; + width: 100%; + max-width: 100%; pointer-events: none; + text-align: center; /* 容器内居中,使移动端与桌面端一致 */ + padding: 0 10px; /* 页面左右各 10px 的安全边距 */ } .toast-custom { - min-width: 120px; background-color: var(--focus-border-color); box-shadow: 0 3px 7px rgba(0, 0, 0, 0.1); border: none; border-radius: 6px; - margin: 0 auto; - width: fit-content; + margin: 0; /* 由容器 padding 提供页面边距限制,避免强制扩张 */ + display: inline-block; /* 保持根据内容自适应,同时允许换行后包裹 */ + width: -moz-fit-content; + width: fit-content; /* 内容自适应宽度 */ + max-width: calc(100vw - 20px); /* 视口宽度减去左右 10px */ +} + +/* Bootstrap 在显示阶段可能将 .toast 设为 block,强制保持 inline-block 以持续居中 */ +.toast-custom.show, +.toast-custom.showing { + display: inline-block !important; } .toast-body-custom { @@ -125,7 +137,11 @@ body.login-page { padding: 0.93rem 1.2rem; color: #fff; font-size: 0.95rem; - white-space: nowrap; + white-space: normal; + word-break: break-word; + margin: 0 auto; /* 保持正文在容器中水平居中 */ + padding-top: calc(0.93rem - 0.25px); + padding-bottom: calc(0.93rem - 0.25px); } /* --------------- 底部按钮 --------------- */ From 226db683b750e181d7974a5496a0b4b34bdd643e Mon Sep 17 00:00:00 2001 From: x1ao4 Date: Fri, 10 Oct 2025 00:14:06 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A8=A1=E6=80=81=E6=A1=86=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E6=A0=8F=E7=BB=9F=E4=B8=80=E9=AB=98=E5=BA=A6=E5=BE=AE?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/css/main.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/static/css/main.css b/app/static/css/main.css index e73997c..3314007 100644 --- a/app/static/css/main.css +++ b/app/static/css/main.css @@ -8273,4 +8273,13 @@ div:has(> .collapse:not(.show)):has(+ .row.title[title^="资源搜索"]) { .tasklist-poster-mode .discovery-poster:hover .discovery-rating { pointer-events: none !important; /* 不响应鼠标事件 */ cursor: default !important; /* 指针恢复为默认 */ +} + +/* --------------- 模态框标题栏统一高度微调(总高度 -1px) --------------- */ +#logModal .modal-header, +#fileSelectModal .modal-header, +#createTaskModal .modal-header, +#editMetadataModal .modal-header { + padding-top: 10.5px; + padding-bottom: 10.5px; } \ No newline at end of file From 7e12a2da9b58f64ccb93a50c55eaae40be327556 Mon Sep 17 00:00:00 2001 From: x1ao4 Date: Fri, 10 Oct 2025 00:45:19 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=88=9B=E5=BB=BA/?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=BB=BB=E5=8A=A1=E6=A8=A1=E6=80=81=E6=A1=86?= =?UTF-8?q?=E7=9A=84=E8=AD=A6=E5=91=8A=E6=8F=90=E7=A4=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/css/main.css | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/static/css/main.css b/app/static/css/main.css index 3314007..2398e2c 100644 --- a/app/static/css/main.css +++ b/app/static/css/main.css @@ -8282,4 +8282,20 @@ div:has(> .collapse:not(.show)):has(+ .row.title[title^="资源搜索"]) { #editMetadataModal .modal-header { padding-top: 10.5px; padding-bottom: 10.5px; +} + +/* --------------- 创建/编辑任务模态框:警告提示专属样式 --------------- */ +/* 仅作用于 #createTaskModal 内的警告提示,不影响其他位置 */ +#createTaskModal .alert-warning { + height: 32px; /* 固定提示栏高度 */ + min-height: 32px; /* 覆盖全局 36px */ + max-height: 32px; /* 防止内容撑高 */ + display: flex; /* 垂直/水平居中文本 */ + align-items: center; + justify-content: center; + text-align: center; /* 文本居中 */ + margin-bottom: 8px; /* 与周边间距保持一致 */ + padding-top: 0; /* 严格控制视觉高度为 32px */ + padding-bottom: 0; + box-sizing: border-box; /* 高度包含内边距与边框,避免被额外撑高 */ } \ No newline at end of file