Peach: Local-first video metadata scraper and media manager.
fix: 居中错误页内容组并增加组件间距
longmeidaoa3b89ddbd2bf
diff --git a/docs/STATUS.md b/docs/STATUS.mdindex cce620f20..9a05ae9b1 100644--- a/docs/STATUS.md+++ b/docs/STATUS.md@@ -6,7 +6,7 @@## 运行态-- 代码 `0.7.29` 已生效,HTTPS 就绪检查通过;采集页路由已加载,四〇四页使用返回首页按钮;未打标签发布。+- HTTPS 就绪检查通过;未打标签发布。- Windows 是当前 ledger writer,入口 `dist\Peach\Peach.exe`;代码、`peach-data`、worktree 和共享传输点同在一个顶层目录,外置盘只提供 `R:\media`。- 托盘必须以普通权限启动:提升权限后的令牌看不到 CloudDrive 的 `A:` / `B:`,会把 PikPak 和 115 误报为脱盘。diff --git a/src/peach/routes_pages.py b/src/peach/routes_pages.pyindex c035dcc5d..57e7cf9e2 100644--- a/src/peach/routes_pages.py+++ b/src/peach/routes_pages.py@@ -51,6 +51,10 @@ _SETUP_STYLE = """<style>body{margin:0;padding:48px 24px;background:var(--ground);color:var(--ink);font:var(--fs-md)/1.6 system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif}main{max-width:560px;margin:0 auto}+body:has(.error-page){min-height:100svh;display:grid;align-items:center}+body:has(.error-page)>main{width:min(560px,100%)}+.error-page{display:grid;justify-items:start;gap:32px}+.error-page>h1,.error-page>p{margin:0}.mark{display:block;width:40px;height:40px;border-radius:50%}h1{font-size:var(--fs-3xl);font-weight:600;line-height:1.25;margin:16px 0 0}.lede{margin:6px 0 0;color:var(--muted)}@@ -279,8 +283,8 @@ def error_page(status: int, message: str) -> str:"""浏览器导航撞上 403/404/409 时给人看的那一页,不是一行 JSON。"""title = {403: "这里不能打开", 404: "四〇四", 409: "现在不能这样做"}.get(status, "出了点问题")description = '' if status == 404 else f'<p class="lede">{escape(message)}</p>'- body = (f'<img class="mark" src="/peach-logo.png" alt=""><h1>{title}</h1>'- f'{description}<p><a class="geist-button primary" href="/">返回首页</a></p>')+ body = (f'<section class="error-page"><img class="mark" src="/peach-logo.png" alt=""><h1>{title}</h1>'+ f'{description}<p><a class="geist-button primary" href="/">返回首页</a></p></section>')return _document(f"Peach · {title}", body)