Skip to content

Commit

Permalink
Adjust frontend for unsupported version changes
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Pickering <[email protected]>
  • Loading branch information
adamkpickering committed Apr 19, 2023
1 parent b668d50 commit f412ad3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
23 changes: 23 additions & 0 deletions pkg/rancher-desktop/components/UpdateStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,25 @@
<span v-else></span>
</template>
</card>
<card v-else-if="unsupportedUpgradeAvailable" ref="osUpdateRequired" :show-highlight-border="false">
<template #title>
<div class="type-title">
<h3>Operating System Upgrade Required</h3>
</div>
</template>
<template #body>
<p>
A newer version of Rancher Desktop is available, but not supported on the current version
of your operating system. Please upgrade your operating system to run it.
</p>
<br>
<p>
For more information please see
<a href="https://docs.rancherdesktop.io/getting-started/installation">the installation documentation</a>.
</p>
</template>
<template #actions><div></div></template>
</card>
</div>
</template>

Expand Down Expand Up @@ -138,6 +157,10 @@ class UpdateStatus extends UpdateStatusProps {
return this.applying ? 'Applying update...' : 'Restart Now';
}
get unsupportedUpgradeAvailable() {
return !this.hasUpdate && this.updateState?.info?.unsupportedUpgradeAvailable;
}
applyUpdate() {
this.applying = true;
this.$emit('apply');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ describe('UpdateStatus.vue', () => {
available: true,
downloaded: false,
info: {
version: 'v1.2.3', files: [], path: '', sha512: '', releaseDate: '',
version: 'v1.2.3',
files: [],
path: '',
sha512: '',
releaseDate: '',
nextUpdateTime: 12345,
unsupportedUpgradeAvailable: false,
},
progress: {
percent: 12.34,
Expand Down

0 comments on commit f412ad3

Please sign in to comment.