From 68eb1438e21ee621422409f6975c3d8d8ad24c97 Mon Sep 17 00:00:00 2001
From: Tw93
Date: Sat, 19 Nov 2022 23:26:06 +0800
Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=9B=B4=E6=96=B0=E6=96=87?=
=?UTF-8?q?=E6=A1=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 50 ++++++++++++++++++++++++++------------------------
README_EN.md | 46 +++++++++++++++++++++++-----------------------
2 files changed, 49 insertions(+), 47 deletions(-)
diff --git a/README.md b/README.md
index 6e33837..c8e28d6 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@
- 很简单用 Rust 打包网页生成很小的 Mac App,支持 微信读书、Twitter、Youtube、Flomo、Reference、RunCode、Google Translate、语雀、Witeboard、Vercel、V2EX、开发工具箱等,欢迎去
讨论区 交流分享。
+ 很简单用 Rust 打包网页生成很小的桌面 App,支持 Mac/Windows/Linux 应用,当前已打包微信读书、Twitter、Youtube、Flomo、Reference、RunCode、Google Translate、语雀、Witeboard、Vercel、V2EX、开发工具箱等,欢迎去
讨论区 交流分享。
## 特征
@@ -63,19 +63,8 @@
更多常用 App 下载可以去 [Releases](https://github.com/tw93/Pake/releases) 中看看。
-## 快捷键(Windows/Linux)
-
-1. Ctrl + ⬅:返回上一个页面
-2. Ctrl + ➡:去下一个页面
-3. Ctrl + ⬆:自动滚动到页面顶部
-4. Ctrl + ⬇:自动滚动到页面底部
-5. Ctrl + r:刷新页面
-6. Ctrl + -:缩小页面
-7. Ctrl + +:放大页面
-8. Ctrl + =:放大页面
-9. Ctrl + 0:重置页面缩放
-
## 快捷键(Mac)
+
1. ⌘ + [:返回上一个页面
2. ⌘ + ]:去下一个页面
3. ⌘ + ↑:自动滚动到页面顶部
@@ -86,15 +75,28 @@
8. ⌘ + =:放大页面
9. ⌘ + 0:重置页面缩放
+## 快捷键(Windows/Linux)
+
+1. Ctrl + ←:返回上一个页面
+2. Ctrl + →:去下一个页面
+3. Ctrl + ↑:自动滚动到页面顶部
+4. Ctrl + ↓:自动滚动到页面底部
+5. Ctrl + r:刷新页面
+6. Ctrl + -:缩小页面
+7. Ctrl + +:放大页面
+8. Ctrl + =:放大页面
+9. Ctrl + 0:重置页面缩放
+
此外还支持双击头部进行全屏切换,拖拽头部进行移动窗口,还有其他需求,欢迎提过来。
-## 已知Bug
-- Windows下不能安装到C:\Program File,会直接闪退。建议安装到其他目录,比如D:\Program Files。
-- Linux下暂时不能存cookie,即应用关闭后数据清空,账号自动推出。
+## 待解决问题
+
+- Windows 下不能安装到 C:\Program File,会直接闪退。建议安装到其他目录,比如 D:\Program Files。
+- Linux 下暂时不能存 cookie,即应用关闭后数据清空,账号自动推出。
## 开发
-开始前参考 [Tauri](https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-macos) 快速配置好环境,如果你想打包 Windows、Linux 系统的包,可以参考 [Building](https://tauri.app/v1/guides/building/) 文档
+开始前参考 [Tauri](https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-macos) 快速配置好环境。
```sh
// 安装依赖
@@ -103,26 +105,26 @@ npm i
// 调试
npm run dev
-// 打包(Mac)
+// 打包 Mac 应用
npm run build
-// 打包(Windows)
+// 打包 Windows 应用
npm run build:windows
-// 打包(Linux)
+// 打包 Linux 应用
npm run build:linux
-// 一键打包所有项目(Linux/Mac)
+// 一键打包所有 Mac/Linux 应用
chmod +x build.sh && ./build.sh
-// 一键打包所有项目(Windows)
+// 一键打包所有 Windows 项目
.\build.bat
```
## 打新包
1. 修改 `src-tauri` 目录下的 `tauri.conf.json` 中的 `url、productName、icon、identifier` 这 4 个字段,其中 icon 可以从 icons 目录选择一个,也可以去 [macOSicons](https://macosicons.com/#/) 下载符合产品名称的
-2. 关于窗口属性设置,可以在 `tauri.conf.json` 修改 `windows` 属性对应的 `width/height`,是否全屏 `fullscreen`,是否可以调整大小 `resizable`,假如想适配沉浸式头部,可以将 `transparent` 设置成 `true`,找到 Header 元素加一个 `padding-top` 样式即可,不想适配改成 `false` 也行
+2. 关于窗口属性设置,可以在 `tauri.conf.json` 修改 `windows` 属性对应的 `width/height`,是否全屏 `fullscreen`,是否可以调整大小 `resizable`,假如想适配 Mac 沉浸式头部,可以将 `transparent` 设置成 `true`,找到 Header 元素加一个 `padding-top` 样式即可,不想适配改成 `false` 也行
3. `npm run dev` 本地调试看看效果,此外可以使用 `npm run dev:debug` 进行容器调试
4. `npm run build` 运行即可打生产包
@@ -235,4 +237,4 @@ chmod +x build.sh && ./build.sh
## 最后
1. 希望大伙玩的过程中有一种学习新技术的喜悦感,如果有新点子欢迎告诉我
-2. 假如你发现有很适合做成 Mac App 的网页也很欢迎告诉我,我给加到里面来
+2. 假如你发现有很适合做成桌面 App 的网页也很欢迎告诉我,我给加到里面来
diff --git a/README_EN.md b/README_EN.md
index 5ab88fa..8845225 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -14,7 +14,7 @@
- A simple way to package a web page to Mac App, supporting WeRead、Twitter、Youtube、Reference、Flomo、YuQue、Google Translate、Witeboard、RunCode、Vercel、V2EX、DevTools, welcome to
Discussions to see if there have anything you interesting.
+ A simple way to package a web page to desktop application, supporting Mac/Windows/Linux, now has packaging WeRead、Twitter、Youtube、Reference、Flomo、YuQue、Google Translate、Witeboard、RunCode、Vercel、V2EX、DevTools, welcome to
Discussions to see if there have anything you interesting.
## Features
@@ -63,20 +63,7 @@
More common apps can be downloaded from [Releases](https://github.com/tw93/Pake/releases).
-
-## Shortcuts(Windows/Linux)
-
-1. Ctrl + ⬅:Return to the previous page
-2. Ctrl + ➡:Go to the next page
-3. Ctrl + ⬆:Auto scroll to top of page
-4. Ctrl + ⬇:Auto scroll to bottom of page
-5. Ctrl + r:Refresh Page
-6. Ctrl + -:Zoom out the page
-7. Ctrl + +:Zoom in the Page
-8. Ctrl + =:Zoom in the Page
-9. Ctrl + 0:Reset the page zoom
-
-## Shortcuts(Mac)
+## Mac Shortcuts
1. ⌘ + [:Return to the previous page
2. ⌘ + ]:Go to the next page
@@ -88,15 +75,28 @@ More common apps can be downloaded from [Releases](https://github.com/tw93/Pake/
8. ⌘ + =:Zoom in the Page
9. ⌘ + 0:Reset the page zoom
+## Windows/Linux Shortcuts
+
+1. Ctrl + ←:Return to the previous page
+2. Ctrl + →:Go to the next page
+3. Ctrl + ↑:Auto scroll to top of page
+4. Ctrl + ↓:Auto scroll to bottom of page
+5. Ctrl + r:Refresh Page
+6. Ctrl + -:Zoom out the page
+7. Ctrl + +:Zoom in the Page
+8. Ctrl + =:Zoom in the Page
+9. Ctrl + 0:Reset the page zoom
+
In addition, it supports double clicking the head to switch to full screen, and dragging the head to move the window
-## Bugs
+## Current issues
+
- It cannot be installed to C:\Program File under Windows, and it will crash directly. It is recommended to install to another directory, such as D:\Program Files.
- Under Linux, cookies cannot be stored temporarily, that is, the data will be cleared after the application is closed, and the account will be automatically released.
## Development
-Refer to the [Tauri documentation](https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-macos) to quickly configure your environment before you start, if you want to package Windows or Linux systems, you can refer to [Building](https://tauri.app/v1/guides/building/) Documentation.
+Refer to the [Tauri documentation](https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-macos) to quickly configure your environment before you start.
```sh
// Install Dependencies
@@ -105,19 +105,19 @@ npm i
// Local development
npm run dev
-// Pack (Mac)
+// Pack Mac application
npm run build
-// Pack (Windows)
+// Pack Windows application
npm run build:windows
-// Pack(Linux)
+// Pack Linux application
npm run build:linux
-// One-click packaging of all projects (Linux/Mac)
+// One-click packaging of all Linux/Mac projects
chmod +x build.sh && ./build.sh
-// One-click packaging of all projects (Windows)
+// One-click packaging of all Windows projects
.\build.bat
```
@@ -127,7 +127,7 @@ chmod +x build.sh && ./build.sh
## New pack
1. Modify the `tauri.conf.json` in the `src-tauri` directory to include 4 fields `url, productName, icon, 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 want to adapt the immersive header, you can set `transparent` to `true` and then find header element and add the `padding-top` style.
+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 under Mac, 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.