1
1
mirror of https://github.com/Fabio286/antares.git synced 2024-12-24 16:00:54 +01:00

fix: hide update tab for Windows Store distributions

This commit is contained in:
Fabio Di Stasio 2021-04-01 14:12:49 +02:00
parent 99f7511c4d
commit dcb135dd01
5 changed files with 12 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -9,10 +9,13 @@ autoUpdater.allowPrerelease = persistentStore.get('allow_prerelease', true);
export default () => {
ipcMain.on('check-for-updates', event => {
mainWindow = event;
autoUpdater.checkForUpdatesAndNotify().catch(() => {
mainWindow.reply('check-failed');
});
if (process.windowsStore)
mainWindow.reply('no-auto-update');
else {
autoUpdater.checkForUpdatesAndNotify().catch(() => {
mainWindow.reply('check-failed');
});
}
});
ipcMain.on('restart-to-update', () => {

View File

@ -30,6 +30,7 @@
<a class="c-hand">{{ $t('word.themes') }}</a>
</li>
<li
v-if="updateStatus !== 'disabled'"
class="tab-item"
:class="{'active': selectedTab === 'update'}"
@click="selectTab('update')"

View File

@ -10,7 +10,7 @@ export default {
is_setting_modal: false,
selected_setting_tab: 'general',
selected_conection: {},
update_status: 'noupdate', // noupdate, available, checking, nocheck, downloading, downloaded
update_status: 'noupdate', // noupdate, available, checking, nocheck, downloading, downloaded, disabled
download_progress: 0,
base_completer: [] // Needed to reset ace editor, due global-only ace completer
},

View File

@ -13,6 +13,9 @@ export default store => {
ipcRenderer.on('check-failed', () => {
store.commit('application/CHANGE_UPDATE_STATUS', 'nocheck');
});
ipcRenderer.on('no-auto-update', () => {
store.commit('application/CHANGE_UPDATE_STATUS', 'disabled');
});
ipcRenderer.on('download-progress', (event, data) => {
store.commit('application/CHANGE_UPDATE_STATUS', 'downloading');
store.commit('application/CHANGE_PROGRESS_PERCENTAGE', data.percent);