Skip to content

Commit

Permalink
fix: Firmware update button text displayed correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mlyubimov committed Feb 21, 2024
1 parent 4b09689 commit 3a32f0d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frontend/src/components/Updater.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
color="positive"
padding="12px 30px"
:class="!$q.screen.xs ? 'q-ml-lg' : 'q-mt-sm'"
>Install</q-btn>
>{{ getTextButton }}</q-btn>
</div>
<q-btn
v-if="mainFlags.installFromFile && flags.uploadEnabled"
Expand Down Expand Up @@ -161,6 +161,13 @@ watch(fwModel, (newModel) => {
localStorage.setItem('selectedFwChannel', newModel.value)
})
const getTextButton = computed(() => {
if (fwModel.value.version === info.value.firmware.version) {
return 'Reinstall'
}
return 'Install'
})
const update = async (fromFile) => {
if (!info.value.storage.sdcard.status.isInstalled) {
mainStore.toggleFlag('microSDcardMissingDialog', true)
Expand Down

0 comments on commit 3a32f0d

Please sign in to comment.