Merge remote-tracking branch 'origin/master'

pull/192/head
xiaojunnuo 2021-08-21 01:19:14 +08:00
commit 8ac9e658c9
3 changed files with 8 additions and 3 deletions

View File

@ -210,6 +210,7 @@ module.exports = {
}, },
mapping: { mapping: {
// 'assets.fastgit.org': 'usa', // 'assets.fastgit.org': 'usa',
'*.electronjs.org': 'quad9',
'*amazonaws.com': 'quad9', '*amazonaws.com': 'quad9',
'*githubusercontent.com': 'quad9', '*githubusercontent.com': 'quad9',
'*yarnpkg.com': 'quad9', '*yarnpkg.com': 'quad9',

View File

@ -100,9 +100,13 @@ function createWindow () {
if (args.hideWindow) { if (args.hideWindow) {
startHideWindow = true startHideWindow = true
} }
log.info('start args', args) log.info('start args', args)
} }
log.info('start hide window', startHideWindow) if (app.getLoginItemSettings().wasOpenedAsHidden) {
startHideWindow = true
}
log.info('start hide window', startHideWindow, app.getLoginItemSettings())
win = new BrowserWindow({ win = new BrowserWindow({
width: 900, width: 900,

View File

@ -42,7 +42,7 @@ export default {
} else { } else {
app.setLoginItemSettings({ app.setLoginItemSettings({
openAtLogin: true, openAtLogin: true,
path: ex, openAsHidden: true,
args: [ args: [
'--hideWindow', '"true"' '--hideWindow', '"true"'
] ]
@ -56,7 +56,7 @@ export default {
} else { } else {
app.setLoginItemSettings({ app.setLoginItemSettings({
openAtLogin: false, openAtLogin: false,
path: ex, openAsHidden: false,
args: [] args: []
}) })
} }