add check for updates button

This commit is contained in:
Jiiks 2019-03-08 15:15:58 +02:00
parent 7059e522b4
commit bf73fff4ee
2 changed files with 11 additions and 2 deletions

View File

@ -12,8 +12,9 @@
<SettingsWrapper headertext="Super Secret">
<div class="bd-flex bd-flexCol bd-devview">
<FormButton @click="forceUpdate">Force Update</FormButton>
<FormButton @click="debugConfig">Config Debug</FormButton>
<FormButton @click="checkForUpdates">Check for Updates</FormButton>
<FormButton @click="testUpdateUi">Update UI Test</FormButton>
<FormButton @click="debugConfig">Config Debug</FormButton>
</div>
</SettingsWrapper>
</template>
@ -38,6 +39,9 @@
forceUpdate() {
ClientIPC.send('debug-updater-forceUpdate');
},
checkForUpdates() {
ClientIPC.send('debug-updater-checkForUpdates');
},
debugConfig() {
console.log(Globals);
},

View File

@ -84,9 +84,14 @@ export default class Updater extends Module {
clearInterval(this.updaterThread);
this.updateAll(updates);
});
ipc.on('debug-updater-forceUpdate', () => {
this.checkForUpdates(true);
});
ipc.on('debug-updater-checkForUpdates', () => {
this.checkForUpdates();
});
}
async updateBd(update) {
@ -217,7 +222,7 @@ export default class Updater extends Module {
}
async checkForUpdates(forced = false) {
console.log('[BetterDiscord:Updater] Checking for updates');
console.log('[BetterDiscord:Updater] Checking for updates', forced);
this.bd.sendToDiscord('updater-checkForUpdates', '');
try {