Skip to content

Commit 9435bb9

Browse files
committed
chore: bump version to 3.8.3 in package.json, Cargo.toml, and Cargo.lock; enhance zoom functionality for Windows
1 parent bba2d5c commit 9435bb9

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pake-cli",
3-
"version": "3.8.2",
3+
"version": "3.8.3",
44
"description": "🤱🏻 Turn any webpage into a desktop app with one command. 🤱🏻 一键打包网页生成轻量桌面应用。",
55
"engines": {
66
"node": ">=18.0.0"

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pake"
3-
version = "3.8.2"
3+
version = "3.8.3"
44
description = "🤱🏻 Turn any webpage into a desktop app with Rust."
55
authors = ["Tw93"]
66
license = "MIT"

src-tauri/src/inject/event.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,19 @@ const shortcuts = {
1212

1313
function setZoom(zoom) {
1414
const html = document.getElementsByTagName("html")[0];
15-
html.style.zoom = zoom;
15+
const body = document.body;
16+
const zoomValue = parseFloat(zoom) / 100;
17+
const isWindows = /windows/i.test(navigator.userAgent);
18+
19+
if (isWindows) {
20+
body.style.transform = `scale(${zoomValue})`;
21+
body.style.transformOrigin = "top left";
22+
body.style.width = `${100 / zoomValue}%`;
23+
body.style.height = `${100 / zoomValue}%`;
24+
} else {
25+
html.style.zoom = zoom;
26+
}
27+
1628
window.localStorage.setItem("htmlZoom", zoom);
1729
}
1830

0 commit comments

Comments
 (0)