auto-update Implemented. win only for now
This commit is contained in:
parent
70f6288546
commit
b9d638ee67
4 changed files with 26 additions and 3 deletions
|
@ -123,6 +123,7 @@
|
|||
"term.tracks": "tracks", // Assume x amount of tracks. e.g. 50 tracks
|
||||
"term.videos": "Videos",
|
||||
"term.menu": "Menu",
|
||||
"term.check": "Check",
|
||||
|
||||
// Home
|
||||
"home.title": "Home",
|
||||
|
|
|
@ -13,7 +13,7 @@ import * as mm from 'music-metadata';
|
|||
import fetch from 'electron-fetch'
|
||||
import {wsapi} from "./wsapi";
|
||||
import * as jsonc from "jsonc";
|
||||
|
||||
import { NsisUpdater, AppImageUpdater } from "electron-updater";
|
||||
export class Win {
|
||||
private win: any | undefined = null;
|
||||
private app: any | undefined = null;
|
||||
|
@ -522,6 +522,15 @@ export class Win {
|
|||
})
|
||||
});
|
||||
|
||||
electron.ipcMain.on('check-for-update', async (_event, url) => {
|
||||
const options = {
|
||||
provider: 'generic',
|
||||
url: 'https://43-429851205-gh.circle-artifacts.com/0/%257E/Cider/dist/artifacts' //Base URL
|
||||
}
|
||||
const autoUpdater = new NsisUpdater(options) //Windows Only (for now) -q
|
||||
autoUpdater.checkForUpdatesAndNotify()
|
||||
})
|
||||
|
||||
/* *********************************************************************************************
|
||||
* Window Events
|
||||
* **********************************************************************************************/
|
||||
|
|
|
@ -3535,9 +3535,11 @@ const app = new Vue({
|
|||
closeWindow(){
|
||||
// window.close doesnt call the win "close" event for some reason
|
||||
ipcRenderer.send('win-close');
|
||||
},
|
||||
checkForUpdate(){
|
||||
ipcRenderer.send('check-for-update')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
Vue.component('animated-number', {
|
||||
|
|
|
@ -614,6 +614,17 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment">
|
||||
Update Cider
|
||||
</div>
|
||||
<div class="md-option-segment md-option-segment_auto">
|
||||
<button class="md-btn" id="lfmConnect" ref="lfmConnect"
|
||||
onclick="app.checkForUpdate()">
|
||||
{{$root.getLz('term.check')}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="opacity: 0.5; pointer-events: none">
|
||||
<div class="md-option-header">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue