Skip to content

Commit

Permalink
Fix installed version, fallback for channel switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Slipn3r committed Jul 20, 2023
1 parent 20f6573 commit 4b8c9a7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/flipperzero-protobuf
4 changes: 2 additions & 2 deletions frontend/src/components/InstalledApps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<q-space />

<div class="column items-end q-ml-md">
<span v-if="app.currentVersion.version" class="text-grey-7">Version:</span>
<span class="text-grey-7">Version:</span>
<b>{{ app.currentVersion.version }}</b>
</div>
<div class="q-ml-md" style="width: 80px;">
Expand Down Expand Up @@ -166,7 +166,7 @@
<q-space />

<div class="column items-end q-ml-md">
<span class="text-grey-7">Version:</span>
<span v-if="app.installedVersion.version" class="text-grey-7">Version:</span>
<b>{{ app.installedVersion.version }}</b>
</div>
<div class="q-ml-md" style="width: 80px;">
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/layouts/MainLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,16 @@ export default defineComponent({
if (!process.env.PRODUCTION) {
this.flags.catalogCanSwitchChannel = true
}
// FIXME
if (location.host === 'lab.flipper.net') {
this.flags.catalogCanSwitchChannel = false
} else if (location.host === 'lab.flipp.dev') {
this.flags.catalogCanSwitchChannel = false
if (!localStorage.getItem('catalogChannel')) {
this.flags.catalogChannelProduction = false
this.toggleCatalogChannel()
}
}
navigator.serial.addEventListener('disconnect', e => {
this.autoReconnect()
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Apps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ export default defineComponent({
const installed = this.installedApps.find(e => e.id === this.currentApp.id)
if (installed) {
this.currentApp.isInstalled = true
this.currentApp.installedVersion = { ...installed }
this.currentApp.installedVersion = installed.installedVersion
this.currentApp.installedVersion.isOutdated = this.currentApp.currentVersion.id !== this.currentApp.installedVersion.id
}
Expand Down

0 comments on commit 4b8c9a7

Please sign in to comment.