Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

fix(web): 检查更新的进度面板与相邻分区同一档容器

longmeidao14e3263aefbc
diff --git a/tests/test_web_ui.py b/tests/test_web_ui.py
index c52ed6906..55e597a7b 100644
--- a/tests/test_web_ui.py
+++ b/tests/test_web_ui.py
@@ -425,6 +425,23 @@ class WebUiSourceTests(unittest.TestCase):
self.assertIn("background:var(--overlay-5)", rule, f"{name} 是操作条")
self.assertIn("var(--line-soft)", rule, f"{name} 与正文之间是一条发丝线")
+ def test_the_follow_job_panel_is_the_same_container_tier_as_its_neighbours(self):
+ """检查更新的进度面板与 `.fsec` 同档:`--field-ring` 的发丝边配 `--ground` 的面。
+
+ 它在 `/follow-manage` 上就夹在两张 `.fsec` 中间,容器档位一不一样一眼就看得出来:
+ 亮一档的面加淡一档的边会让同一列里出现两种卡片,而它承载的只是同一页的一段进度。
+ """
+ css = stylesheet_source()
+ panel = css[css.index(".followtask{"):]
+ panel = panel[:panel.index("}")]
+ section = css[css.index(".fsec{"):]
+ section = section[:section.index("}")]
+ for token in ("border:1px solid var(--field-ring)", "background:var(--ground)"):
+ self.assertIn(token, panel, "进度面板与分区容器同档")
+ self.assertIn(token, section, "分区容器是这一档的基准")
+ self.assertPageContains('<section class="followtask" data-geist-fieldset '
+ 'aria-label="检查更新进度">')
+
def test_buttons_keep_two_tiers_a_solid_primary_and_a_bright_secondary(self):
"""按钮只有两档:主动作实底墨色,次级是比容器亮一档的面加一圈发丝边。
diff --git a/web/css/22-followmanage.css b/web/css/22-followmanage.css
index 318cd8472..a22bee09d 100644
--- a/web/css/22-followmanage.css
+++ b/web/css/22-followmanage.css
@@ -175,7 +175,10 @@
放前面的话选择器里的同名片段会被先匹配到,取回来的是这里的规则。 */
.fauthor{box-sizing:border-box;height:280px;padding:8px 12px;border:1px solid var(--border-10);
border-radius:var(--control-radius);background:var(--surface);display:grid;grid-template-rows:auto minmax(0,1fr)}
-.followtask{border:1px solid var(--border-10);border-radius:var(--surface-radius);background:var(--surface);margin-bottom:16px}
+/* 进度面板与它上下的分区是同一档容器:发丝边 --field-ring 加 --ground 的面。
+ `--border-10` 配 `--surface` 会让它在同一列里比 `.fsec` 亮一档、边又淡一档,
+ 读起来像另一种东西浮在页面上。 */
+.followtask{border:1px solid var(--field-ring);border-radius:var(--surface-radius);background:var(--ground);margin-bottom:16px}
.followtask>.geist-fieldset-content{padding:20px;min-width:0;overflow-wrap:anywhere}
.followmanage .followtask{margin-bottom:0}
.fcheckfail strong{font-weight:600}