From f16af680bcb6eb732cb2ce4841031c43ae10bd89 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Wed, 9 Nov 2022 18:17:34 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=9B=B4=E6=96=B0=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- README_EN.md | 2 +- src-tauri/src/pake.js | 8 ++++---- src-tauri/tauri.conf.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1d7c5d6..2343f25 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ npm run build ## 打新包 1. 修改 `src-tauri` 目录下的 `tauri.conf.json` 中的 `url、productName、icon、title、identifier` 这 5 个字段,其中 icon 可以从 icons 目录选择一个,也可以去 [macOSicons](https://macosicons.com/#/) 下载符合产品名称的 -2. 关于窗口属性设置,可以在 `tauri.conf.json` 修改 `windows` 属性对应的 `width/height`,是否全屏 `fullscreen`,是否可以调整大小 `resizable`,假如你不好适配沉浸式头部,可以将 `transparent` 设置成 `true` 即可。 +2. 关于窗口属性设置,可以在 `tauri.conf.json` 修改 `windows` 属性对应的 `width/height`,是否全屏 `fullscreen`,是否可以调整大小 `resizable`,假如你想适配沉浸式头部,可以将 `transparent` 设置成 `true` 然后找到 Header 样式加一个 `padding-top` 即可。 3. `npm run dev` 本地调试看看效果,此外可以使用 `npm run dev:debug` 进行容器调试 4. `npm run build` 运行即可打生产包 diff --git a/README_EN.md b/README_EN.md index a48d7dd..4fccbc7 100644 --- a/README_EN.md +++ b/README_EN.md @@ -83,7 +83,7 @@ npm run build ## New pack 1. Modify the `tauri.conf.json` in the `src-tauri` directory to include 5 fields `url, productName, icon, title, identifier`, icon can be selected from the `icons` directory or downloaded from [macOSicons](https://macosicons.com/#/) to match the product. -2. For window property settings, you can modify the `width/height` of the `windows` property in `tauri.conf.json`, whether it is `fullscreen`, whether it is `resizable`, if you are not good at adapting immersive headers, you can set `transparent` to `true` and you're done. +2. For window property settings, you can modify the `width/height` of the `windows` property in `tauri.conf.json`, whether it is `fullscreen`, whether it is `resizable`, If you want to adapt the immersive header, you can set `transparent` to `true` and then find header element and add the 'padding-top' style. 3. `npm run dev` for local debugging; `npm run dev:debug` to open the devtools for container debugging. 4. `npm run build` can be run to package for production. diff --git a/src-tauri/src/pake.js b/src-tauri/src/pake.js index 95978aa..2200c97 100644 --- a/src-tauri/src/pake.js +++ b/src-tauri/src/pake.js @@ -22,10 +22,6 @@ const metaKeyShortcuts = { window.addEventListener('DOMContentLoaded', (_event) => { const style = document.createElement('style'); style.innerHTML = ` - #page .main_header, #ReactApp .lark .main-wrapper > div, #ReactApp .lark .sidebar-user-info, .explore-wrapper .yuque-header-wrapper { - padding-top: 20px; - } - #page #footer-wrapper, .drawing-board .toolbar .toolbar-action, .c-swiper-container, @@ -43,6 +39,10 @@ window.addEventListener('DOMContentLoaded', (_event) => { display: none !important; } + #page .main_header { + padding-top: 20px; + } + .panel.give_me .nav_view { top: 154px !important; } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index a7483d1..918fc3b 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -7,7 +7,7 @@ "windows": [ { "url": "https://weread.qq.com/", - "transparent": true, + "transparent": false, "fullscreen": false, "width": 1200, "height": 728,