Skip to content

armgit / peach

Public Imported from GitHub
0

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

fix: keep the narrow top bar actions on the right edge

Peach local maintenanceb2497807fd12
diff --git a/tests/test_web_ui.py b/tests/test_web_ui.py
index 1e7bb4886..053cbcc19 100644
--- a/tests/test_web_ui.py
+++ b/tests/test_web_ui.py
@@ -78,6 +78,10 @@ class WebUiSourceTests(unittest.TestCase):
self.assertPageContains("const performerLabel=it=>it&&it.is_jav?'女优':'艺人';")
self.assertPageContains("const ENTITY_LABELS={performer:'艺人'")
+ def test_narrow_top_bar_keeps_the_actions_on_the_right(self):
+ """窄屏下搜索框绝对定位后脱离了流,动作按钮会挤在品牌名右侧、右半条留空。"""
+ self.assertPageContains("#immerseBtn{margin-left:auto}")
+
def test_avatar_tiles_do_not_inherit_the_text_link_underline(self):
"""取消规则必须真的压过 `.entitylink:hover`,不能只是写在文件里。
diff --git a/web/app.css b/web/app.css
index 20f5668ef..6b92cada2 100644
--- a/web/app.css
+++ b/web/app.css
@@ -845,6 +845,10 @@ body.drawer-open .edge{opacity:0;pointer-events:none} /* 展开时窄栏让位
#searchBtn{display:inline-flex!important}
/* 移动端不需要密度切换和筛选抽屉按钮挤在一起 */
#density{display:none}
+ /* 宽屏靠 `.search{flex:1}` 把动作按钮顶到右边;窄屏搜索框收成绝对定位后脱离
+ 了流,没有东西再撑开中间,按钮会全部挤在品牌名右侧、右半条留空。
+ 动作组的第一个按钮吃掉剩余空间,整组回到右边。 */
+ #immerseBtn{margin-left:auto}
.entityhero{grid-template-columns:92px minmax(0,1fr);gap:14px;padding:8px 0 18px}
.entityportrait{width:92px}.entityhero h2{font-size:20px}
.statshead{align-items:center}.stats h2{font-size:23px}.scards{grid-template-columns:minmax(0,1fr)}