Skip to content

Commit

Permalink
v1.9.2 - 修复在macOS下托盘图标过大的问题 - #13 #15
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmader committed Apr 9, 2019
1 parent 7ac698c commit d881ebc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const { displayTray, destroyTray } = require("./tray.js")
let mainWindow = null

const icon = path.join(__dirname, "assets", "AriaNg.png")
const trayIcon = path.join(__dirname, "assets", "tray-icon.png")

app.commandLine.appendSwitch("ignore-certificate-errors") // 忽略证书相关错误, 适用于使用自签名证书将Aria2的RPC配置成HTTPS协议的情况

Expand Down Expand Up @@ -107,7 +108,7 @@ app.on("ready", function () {
mainWindow.on("close", function (e) {
e.preventDefault()
mainWindow.hide()
displayTray(icon)
displayTray(trayIcon)
})

mainWindow.on("closed", function () {
Expand Down
Binary file added app/assets/tray-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/edit_conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const edit_conf = (conf_path) => {
let old_conf = fs.readFileSync(conf_path).toString()

let download_dir = default_download_dir
let saved_dir = (old_conf.match(/^dir=(.*)$/m) || ["", ""])[1]
let saved_dir = (old_conf.match(/^dir=(.*)$/m) || [])[1]
if (saved_dir) {
let stat = null
try {
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ariang-gui",
"version": "1.9.1",
"version": "1.9.2",
"private": true,
"description": "AriaNg GUI",
"main": "app.js",
Expand Down

1 comment on commit d881ebc

@Xmader
Copy link
Owner Author

@Xmader Xmader commented on d881ebc Apr 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

暴力解决

Please sign in to comment.