mirror of https://github.com/Kylart/KawAnime.git
Fix auto update (appId problem)
This commit is contained in:
commit
5c5ccb2ba5
|
@ -1,23 +1,16 @@
|
|||
import { autoUpdater } from 'electron-updater'
|
||||
import { BrowserWindow } from 'electron'
|
||||
|
||||
import { eventsList } from '../../../../vendor'
|
||||
import { Logger } from '../../utils'
|
||||
import { sendToWindows } from '../../externals'
|
||||
|
||||
const events = eventsList.update
|
||||
const logger = new Logger('Update')
|
||||
|
||||
function sendToWIndows (eventName, data) {
|
||||
BrowserWindow.getAllWindows()
|
||||
.forEach((win) => {
|
||||
win.webContents.send(eventName, data)
|
||||
})
|
||||
}
|
||||
|
||||
autoUpdater.on('update-available', () => {
|
||||
logger.info('Update available.')
|
||||
|
||||
sendToWIndows(events.available.success)
|
||||
sendToWindows(events.available.success)
|
||||
})
|
||||
|
||||
autoUpdater.on('error', (err) => {
|
||||
|
@ -25,13 +18,13 @@ autoUpdater.on('error', (err) => {
|
|||
})
|
||||
|
||||
autoUpdater.on('download-progress', (progressObj) => {
|
||||
sendToWIndows(events.progress.success, progressObj)
|
||||
sendToWindows(events.progress.success, progressObj)
|
||||
})
|
||||
|
||||
autoUpdater.on('update-downloaded', () => {
|
||||
logger.info('Update fully downloaded and installable.')
|
||||
|
||||
sendToWIndows(events.installable.success)
|
||||
sendToWindows(events.installable.success)
|
||||
})
|
||||
|
||||
function install () {
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
v-toolbar-side-icon(@click.stop='toggleLeftDrawer')
|
||||
v-toolbar-title.title.jap かわニメ
|
||||
v-spacer
|
||||
v-tooltip(left)
|
||||
v-btn(icon, v-show='update', @click='restartAndUpdate', slot='activator')
|
||||
v-icon.green--text update
|
||||
span Update KawAnime
|
||||
template(v-if='update')
|
||||
v-tooltip(left, lazy)
|
||||
v-btn(icon, @click='restartAndUpdate', slot='activator')
|
||||
v-icon.green--text update
|
||||
span Update KawAnime
|
||||
searcher
|
||||
downloader
|
||||
settings
|
||||
|
|
|
@ -23,7 +23,7 @@ module.exports = {
|
|||
pluginOptions: {
|
||||
electronBuilder: {
|
||||
builderOptions: {
|
||||
appId: 'com.kylart.kawanime',
|
||||
appId: 'KawAnime',
|
||||
productName: 'KawAnime',
|
||||
dmg: {
|
||||
contents: [
|
||||
|
|
Loading…
Reference in New Issue