Skip to content

armgit / peach

Public Imported from GitHub
0

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

fix(web): 项目横幅的警告字形补齐圆点

longmeidaoefbe4cdd3f77
diff --git a/tests/test_web_ui.py b/tests/test_web_ui.py
index 380591907..e67050e8c 100644
--- a/tests/test_web_ui.py
+++ b/tests/test_web_ui.py
@@ -4341,6 +4341,16 @@ class WebUiSourceTests(unittest.TestCase):
self.assertPageContains('.runtimegate>svg{width:16px;height:16px;flex:none;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}')
self.assertPageContains('.geist-note>svg{width:16px;height:24px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}')
self.assertPageContains('.runtimegate a{grid-column:2/-1}')
+ # 横幅是第四个装这两枚字形的容器。圆点是长度 .01 的路径,缺了圆头就渲染成
+ # 看不见的薄片,警告只剩上半截竖杠。选择器认直接子元素:带进度时横幅里那一枚
+ # 圆环归 `.geist-gauge`,它的端点是弧的两头而不是字形笔画。
+ css = stylesheet_source()
+ start = css.index(".project-banner>div>svg{")
+ banner_glyph = css[start:css.index("}", start)]
+ self.assertIn("stroke-linecap:round", banner_glyph)
+ self.assertIn("stroke-linejoin:round", banner_glyph)
+ self.assertPageContains(
+ "icon(kind==='error'||kind==='warning'?'alert':'info')")
def test_taste_drilldown_and_legacy_duration_tags_never_leak_filter_state(self):
self.assertPageContains("const cleanTagFilter=value=>")
diff --git a/web/css/22-followmanage.css b/web/css/22-followmanage.css
index a9ab173df..66a243787 100644
--- a/web/css/22-followmanage.css
+++ b/web/css/22-followmanage.css
@@ -88,7 +88,12 @@
.geist-note-small>svg{height:22px}
.project-banner{--feedback-color:var(--muted);display:flex;align-items:center;justify-content:center;gap:8px 16px;flex-wrap:wrap;padding:8px 24px;min-height:40px;border-block:1px solid color-mix(in srgb,var(--feedback-color) 30%,var(--ground));background:color-mix(in srgb,var(--feedback-color) 5%,var(--ground));color:var(--feedback-color);font-size:var(--fs-md);line-height:20px}
.project-banner>div{display:flex;align-items:center;gap:8px;min-width:0}.project-banner p{margin:0;overflow-wrap:anywhere}
-.project-banner svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2}
+/* 圆头端点是这枚字形的一部分:alert 与 info 圆圈里那个点是长度 .01 的路径,
+ butt 端点会把它渲染成看不见的薄片,横幅上只剩上半截竖杠,警告读成了半个符号。
+ 只认直接子元素:带进度时横幅里那一枚是 `.geist-gauge` 的圆环,它的端点是弧的
+ 两头而不是字形笔画,跟着一起圆掉就成了另一种控件的长相。 */
+.project-banner>div>svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;
+ stroke-linecap:round;stroke-linejoin:round}
.project-banner>a{color:inherit;text-decoration:underline;text-underline-offset:5px;font-weight:500;flex:none}
.project-banner-error{--feedback-color:var(--drop)}.project-banner-warning{--feedback-color:var(--meter)}.project-banner-success{--feedback-color:var(--feedback-success)}
.context-card{position:fixed;inset:auto;margin:0;width:320px;max-width:calc(100vw - 16px);box-sizing:border-box;overflow:auto;overscroll-behavior:contain;padding:16px;border:1px solid var(--line);border-radius:var(--floating-radius);background:var(--ground);color:var(--ink);box-shadow:0 8px 24px rgba(0,0,0,.16);font-size:var(--fs-md);line-height:1.5;overflow-wrap:anywhere;z-index:var(--layer-popover);pointer-events:auto}