Skip to content

Commit

Permalink
fix: hide update tab for Windows Store distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Apr 1, 2021
1 parent 99f7511 commit dcb135d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
Binary file modified build/appx/StoreLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions src/main/ipc-handlers/updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/ModalSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')"
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store/modules/application.store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/store/plugins/ipcUpdates.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dcb135d

Please sign in to comment.