修复主窗口与小窗口数据同步的bug;增加隐藏的debug暗号

master
宇天 2020-12-18 14:52:26 +08:00
parent e5a44fc917
commit 17261cd567
4 changed files with 19 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "io.yutent.gaystat",
"version": "2.1.1",
"version": "2.1.2",
"description": "搞基数据",
"main": "src/main.js",
"scripts": {

View File

@ -153,6 +153,11 @@ Anot({
return
}
if (code === 'debug') {
this.input = ''
return app.dispatch('devtools')
}
if (code.length < 6) {
return
}

View File

@ -29,13 +29,14 @@ Anot({
var time = +Anot.ss('last_update') || 0
var now = Date.now()
// 如果离上次更新超过15分钟, 则自动更新
if (now - time > 15 * 60 * 1000) {
this.updateGays()
Anot.ss('last_update', now)
} else {
this.reloadGays()
}
this.reloadGays()
setTimeout(() => {
// 如果离上次更新超过15分钟, 则自动更新
if (now - time > 15 * 60 * 1000) {
this.updateGays()
Anot.ss('last_update', now)
}
}, 500)
})
},
methods: {

View File

@ -144,5 +144,10 @@ ipcMain.on('app', (ev, conn) => {
app.__main__.webContents.send('app', { type: 'data-reload', data: null })
ev.returnValue = true
break
case 'devtools':
app.__main__.openDevTools()
ev.returnValue = true
break
}
})