From 779ccf4e6ceebabb6c34f1020edede17781b9bf8 Mon Sep 17 00:00:00 2001 From: Zyy Date: Sat, 14 Nov 2026 19:31:05 +0800 Subject: [PATCH] feat(frontend): support a draggable title bar in the desktop PWA --- deploy/README.md | 2 ++ frontend/index.html | 5 ++++ frontend/public/manifest.webmanifest | 1 + frontend/src/App.vue | 37 ++++++++++++++++++++++++++++ frontend/src/layout/index.vue | 4 +-- frontend/src/stores/modules/theme.ts | 1 + frontend/src/styles/index.css | 37 ++++++++++++++++++++++++++++ 7 files changed, 85 insertions(+), 2 deletions(-) diff --git a/deploy/README.md b/deploy/README.md index d64bc34ed..280b0d600 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -389,6 +389,8 @@ PostgreSQL/Redis 启动密码。日常校验使用 `config --quiet` 使用 Chrome、Edge 等支持 PWA 的浏览器访问管理端,可通过地址栏或浏览器菜单安装应用,安装后以独立窗口打开站点首页,沿用现有登录流程 +在支持自定义标题栏的桌面浏览器中,可用窗口右上角的按钮显示或隐藏系统标题栏。隐藏后仍可拖动顶部空白区域移动窗口 + 安装入口要求 HTTPS,或本机的 `http://localhost`、`http://127.0.0.1`;普通 HTTP 局域网地址不满足条件。入口是否显示还取决于浏览器、访问交互及是否已安装。应用需要联网访问网关,不提供离线使用 ### 启动后的运行设置 diff --git a/frontend/index.html b/frontend/index.html index b3453323c..0d7ac9d01 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -8,6 +8,11 @@ /> + Codex Proxy RS diff --git a/frontend/public/manifest.webmanifest b/frontend/public/manifest.webmanifest index 50ed25a24..fe5deba12 100644 --- a/frontend/public/manifest.webmanifest +++ b/frontend/public/manifest.webmanifest @@ -5,6 +5,7 @@ "start_url": "/", "scope": "/", "display": "standalone", + "display_override": ["window-controls-overlay"], "icons": [ { "src": "/favicon.svg", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index c145fca49..0d6aa2532 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,5 +1,6 @@ + + diff --git a/frontend/src/layout/index.vue b/frontend/src/layout/index.vue index de6cb0d0d..391907bab 100644 --- a/frontend/src/layout/index.vue +++ b/frontend/src/layout/index.vue @@ -78,7 +78,7 @@ watch(
-
+
@@ -88,7 +88,7 @@ watch( -