Skip to content

Commit

Permalink
update to 1.28.0 etc
Browse files Browse the repository at this point in the history
also fix windows maximize bug
  • Loading branch information
RoderickQiu committed Jan 11, 2023
1 parent 3a744e2 commit 69445b8
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 77 deletions.
21 changes: 9 additions & 12 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,14 @@ function createWindow() {
}
});

win.on('maximize', () => {
isMaximized = true;
});

win.on('enter-full-screen', () => {
isMaximized = true;
if (process.platform == "darwin") isMaximized = true;
})

win.on('leave-full-screen', () => {
isMaximized = false;
if (process.platform == "darwin") isMaximized = false;
})

win.on('unmaximize', () => {
isMaximized = false;
});

//prevent app-killers for lock mode / focus mode
win.webContents.on('crashed', () => {
if (store.get('islocked') || (fullScreenProtection && isTimerWin && (process.env.NODE_ENV !== "development") && (!isLoose))) relaunchSolution();
Expand Down Expand Up @@ -1857,8 +1849,13 @@ ipcMain.on('window-minimize', function () {

ipcMain.on('window-maximize', function () {
if (win != null) {
if (isMaximized) win.unmaximize();
else win.maximize();
if (isMaximized) {
win.unmaximize();
if (process.platform != "darwin") isMaximized = false;
} else {
win.maximize();
if (process.platform != "darwin") isMaximized = true;
}
}
})

Expand Down
94 changes: 47 additions & 47 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
{
"name": "wnr",
"version": "1.27.0",
"description": "Work and rest, with wnr now!",
"main": "main.js",
"scripts": {
"dep-update": "yarn",
"start": "cross-env NODE_ENV=development electron .",
"nsis": "cross-env NODE_ENV=production node ./res/builder/nsis.js",
"7zip": "cross-env NODE_ENV=portable node ./res/builder/win-zip.js",
"mac": "cross-env NODE_ENV=production node ./res/builder/mac.js",
"linux": "cross-env NODE_ENV=production node ./res/builder/linux.js",
"appimage": "cross-env NODE_ENV=production node ./res/builder/appimage.js",
"dir": "cross-env NODE_ENV=production node ./res/builder/dir_test.js",
"ms-store": "cross-env NODE_ENV=msstore node ./res/builder/dir_test.js"
"name" : "wnr",
"version" : "1.28.0",
"description" : "Work and rest, with wnr now!",
"main" : "main.js",
"scripts" : {
"dep-update" : "yarn",
"start" : "cross-env NODE_ENV=development electron .",
"nsis" : "cross-env NODE_ENV=production node ./res/builder/nsis.js",
"7zip" : "cross-env NODE_ENV=portable node ./res/builder/win-zip.js",
"mac" : "cross-env NODE_ENV=production node ./res/builder/mac.js",
"linux" : "cross-env NODE_ENV=production node ./res/builder/linux.js",
"appimage" : "cross-env NODE_ENV=production node ./res/builder/appimage.js",
"dir" : "cross-env NODE_ENV=production node ./res/builder/dir_test.js",
"ms-store" : "cross-env NODE_ENV=msstore node ./res/builder/dir_test.js"
},
"repository": {
"type": "git",
"url": "https://github.com/RoderickQiu/wnr.git"
"repository" : {
"type" : "git",
"url" : "https://github.com/RoderickQiu/wnr.git"
},
"author": "RoderickQiu",
"license": "MPL-2.0",
"homepage": "https://getwnr.com",
"appId": "com.scrisstudio.wnr",
"build": {
"appId": "com.scrisstudio.wnr"
"author" : "RoderickQiu",
"license" : "MPL-2.0",
"homepage" : "https://getwnr.com",
"appId" : "com.scrisstudio.wnr",
"build" : {
"appId" : "com.scrisstudio.wnr"
},
"copyright": "(c) Roderick Qiu",
"productName": "wnr",
"dependencies": {
"@eastdesire/jscolor": "^2.5.1",
"@electron/remote": "2.0.8",
"bootstrap": "4.6.1",
"cmd-or-ctrl": "0.3.1",
"compare-version": "0.1.2",
"copy-to-clipboard": "3.3.1",
"crypto-js": "4.1.1",
"electron-debug": "3.2.0",
"electron-store": "8.0.2",
"i18n": "0.15.0",
"jquery": "3.6.0",
"node-fetch": "2.6.7",
"node-notifier": "10.0.1",
"node-shi": "0.4.2",
"popper.js": "1.16.1",
"schart.js": "3.0.0",
"win-release-id": "1.0.6"
"copyright" : "(c) Roderick Qiu",
"productName" : "wnr",
"dependencies" : {
"@eastdesire/jscolor" : "2.5.1",
"@electron/remote" : "2.0.8",
"bootstrap" : "4.6.1",
"cmd-or-ctrl" : "0.3.1",
"compare-version" : "0.1.2",
"copy-to-clipboard" : "3.3.1",
"crypto-js" : "4.1.1",
"electron-debug" : "3.2.0",
"electron-store" : "8.0.2",
"i18n" : "0.15.0",
"jquery" : "3.6.0",
"node-fetch" : "2.6.7",
"node-notifier" : "10.0.1",
"node-shi" : "0.4.2",
"popper.js" : "1.16.1",
"schart.js" : "3.0.0",
"win-release-id" : "1.0.6"
},
"devDependencies": {
"cross-env": "7.0.3",
"electron": "18.3.5",
"electron-builder": "23.0.3"
"devDependencies" : {
"cross-env" : "7.0.3",
"electron" : "18.3.5",
"electron-builder" : "23.0.3"
}
}
27 changes: 11 additions & 16 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
{
"version" : "1.27.0",
"feature-introduction" : true,
"version" : "1.28.0",
"feature-introduction" : false,
"content" : {
"zh-CN" : [
"新增了每几轮计时进行一次长休息、在计时结束前几秒弹出通知提示的功能,可以在设置面板中打开。",
"新增了第一轮工作计时缩短一定时间的功能,使计时更加灵活,可以在计时主界面“更多设置”菜单中打开。",
"使用自制提示框替换系统提示框,减少看不到提示窗口的情况。",
"修复了外置标题窗口中笔记无法同步、正计时时托盘菜单中计时信息显示错误的问题。",
"我们收到了关于 wnr 的 MINI 模式窗口在 Windows 10/11 系统上部分播放器全屏后无法显示的问题,但暂未解决,欢迎 Pull Request。"
"新增了对窗口最大化的支持,这种介于全屏专心与普通计时之间的模式将带来更大的方便。",
"新增了在设置中自定义工作、休息等的主题颜色的功能。",
"修复了几个小问题。"
],
"zh-TW" : [
"新增了每幾輪計時進行一次長休息、在計時結束前幾秒彈出通知提示的功能,可以在設置面板中打開。",
"新增了第一輪工作計時縮短一定時間的功能,使計時更加靈活,可以在計時主界面“更多設置”菜單中打開。",
"使用自制提示框替換系統提示框,減少看不到提示窗口的情況。",
"修復了外置標題窗口中筆記無法同步、正計時時托盤菜單中計時信息顯示錯誤的問題。",
"我們收到了關於 wnr 的 MINI 模式窗口在 Windows 10/11 系統上部分播放器全屏後無法顯示的問題,但暫未解決,歡迎 Pull Request。"
"新增了對窗口最大化的支持,這種介於全屏專心與普通計時之間的模式將帶來更大的方便。",
"新增了在設置中自定義工作、休息等的主題顏色的功能。",
"修復了幾個小問題。"
],
"en" : [
"New features: 1. Optimized long break, 2. Notification before a time period will end in seconds, 3.First work period discount, 4. A new dialog box style that can prevent being hidden.",
"Bugs fixed about: 1. Note sync in eternal title window, 2. Tray message malfunction in stopwatch mode.",
"Help wanted: Some users said that MINI mode fails to show when some video players are fullscreened, but I couldn't solve it. Pull Requests are welcomed."

"New feature: maximizable window.",
"New feature: new setting about customizing theme colors. ",
"Several bugs fixed."
]
},
"introduce" : {
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
ajv "^6.12.0"
ajv-keywords "^3.4.1"

"@eastdesire/jscolor@^2.5.1":
"@eastdesire/[email protected]":
version "2.5.1"
resolved "https://registry.npmmirror.com/@eastdesire/jscolor/-/jscolor-2.5.1.tgz#3c3d3a9c0d8e5803abc49d02defd1ac8dfa57896"
integrity sha512-+D7Xz2f1Zxpc438q0s7wwKHwWal596dcAGcWp+pxfHlYtt0LVdynMFrf0PYdmwHt8idKfeglyU2h2LdkATFcbQ==
Expand Down Expand Up @@ -937,7 +937,7 @@ [email protected]:

[email protected]:
version "18.3.5"
resolved "https://mirrors.huaweicloud.com/repository/npm/electron/-/electron-18.3.5.tgz#a589c2bfa3fe807914a055f54f665999329b739b"
resolved "https://registry.npmmirror.com/electron/-/electron-18.3.5.tgz#a589c2bfa3fe807914a055f54f665999329b739b"
integrity sha512-/GJ39X3ijpyZiOtYQ1ha5Ly0hWiIzF19CGEapM9euaM2AZrmt79x+MckQDXqJxOaVA9YHXju5Ho6b9pB9a/2pQ==
dependencies:
"@electron/get" "^1.13.0"
Expand Down

0 comments on commit 69445b8

Please sign in to comment.