diff --git a/README.md b/README.md index bd046a942..16fbe0969 100644 --- a/README.md +++ b/README.md @@ -21,37 +21,36 @@ 5. `command + r`:刷新页面 6. `command + w`:隐藏窗口,非退出 -## 效果 - -### 微信读书 - -下载地址: - -![1](https://cdn.fliggy.com/upic/ffUmdj.png) - -### Flomo - -下载地址: - -![2](https://cdn.fliggy.com/upic/B49SAc.png) - -### Witeboard +此外还支持双击头部进行全屏切换,拖拽头部进行移动窗口,还有其他需求,欢迎提过来。 -下载地址: - -![3](https://cdn.fliggy.com/upic/o5QY4c.png) - -### WhatsApp - -下载地址: - -![4](https://cdn.fliggy.com/upic/upAJMb.png) - -### Vercel - -下载地址: +## 效果 -![5](https://cdn.fliggy.com/upic/CPVRnY.png) + + + + + + + + + + + + + + + + + + + + + + + + + +
WeRead DownloadFlomo Download
RunCode DownloadWiteboard Download
WhatsApp DownloadVercel Download
## 开发 @@ -70,7 +69,7 @@ npm run build ## 打新包 -1. 修改 `src-tauri` 目录下的 `tauri.conf.json` 中的 `productName、icon、title、identifier` 这 4 个字段,其中 icon 可以去 [macosicons](https://macosicons.com/#/) 下载并放到 `icons` 目录下即可 +1. 修改 `src-tauri` 目录下的 `tauri.conf.json` 中的 `productName、icon、title、identifier` 这 4 个字段,其中 icon 可以去 [macosicons](https://macosicons.com/#/) Download并放到 `icons` 目录下即可 2. 修改 `src-tauri/src` 目录下的 `main.rs` 中的 with_url 字段为你需要打包网页的地址 3. `npm run dev` 本地调试看看效果,此外可以打开 `main.rs` 中 devtools 两处注释(搜索 `_devtools`)进行容器调试 4. `npm run build` 运行即可打包,假如有打开 devtools 模式,记得注释掉 diff --git a/README_EN.md b/README_EN.md index b68d439bc..ae7ed4b70 100644 --- a/README_EN.md +++ b/README_EN.md @@ -21,37 +21,37 @@ 5. `command + r`:Refresh Page 6. `command + w`:Hide window, not quite -## Effect - -### WeRead - -Download: - -![1](https://cdn.fliggy.com/upic/ffUmdj.png) - -### Flomo - -Download: - -![2](https://cdn.fliggy.com/upic/B49SAc.png) +In addition, it supports double clicking the head to switch to full screen, and dragging the head to move the window -### Witeboard - -Download: - -![3](https://cdn.fliggy.com/upic/o5QY4c.png) - -### WhatsApp - -Download: - -![4](https://cdn.fliggy.com/upic/upAJMb.png) - -### Vercel +## Effect -Download: -![5](https://cdn.fliggy.com/upic/CPVRnY.png) + + + + + + + + + + + + + + + + + + + + + + + + + +
WeRead DownloadFlomo Download
RunCode DownloadWiteboard Download
WhatsApp DownloadVercel Download
## Development diff --git a/download/RunCode.dmg b/download/RunCode.dmg new file mode 100644 index 000000000..1020f3564 Binary files /dev/null and b/download/RunCode.dmg differ diff --git a/package.json b/package.json index 70c731c8b..5983e8c0b 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "email": "tw93@qq.com" }, "scripts": { + "start": "npm run dev", "dev": "TAURI_SKIP_DEVSERVER_CHECK=true npm run tauri dev", "build": "TAURI_SKIP_DEVSERVER_CHECK=true npm run tauri build -- --target universal-apple-darwin", "tauri": "tauri" diff --git a/src-tauri/icons/code.icns b/src-tauri/icons/code.icns new file mode 100644 index 000000000..643716389 Binary files /dev/null and b/src-tauri/icons/code.icns differ diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 5d7069db7..d1d147122 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,5 +1,3 @@ -use wry::application::window::Fullscreen; - fn main() -> wry::Result<()> { use wry::{ application::{ @@ -9,7 +7,7 @@ fn main() -> wry::Result<()> { keyboard::KeyCode, menu::{MenuBar as Menu, MenuItem, MenuItemAttributes, MenuType}, platform::macos::WindowBuilderExtMacOS, - window::{Window, WindowBuilder}, + window::{Window, WindowBuilder, Fullscreen}, }, webview::WebViewBuilder, }; @@ -45,6 +43,10 @@ fn main() -> wry::Result<()> { top: 154px !important; } + .columns .column #header{ + padding-top: 30px; + } + .drawing-board .toolbar .toolbar-action, .c-swiper-container, .download_entry, @@ -138,11 +140,13 @@ fn main() -> wry::Result<()> { let handler = move |window: &Window, req: String| { if req == "drag_window" { - println!("drag_window on"); - let _ = window.drag_window(); + let _ = window.drag_window(); } else if req == "fullscreen" { - println!("fullscreen on"); - let _ = window.set_fullscreen(Some(Fullscreen::Borderless(None))); + if window.fullscreen().is_some() { + window.set_fullscreen(None); + }else{ + window.set_fullscreen(Some(Fullscreen::Borderless(None))); + } } };