From 4b8c9a7a7188533014682c5bec4808e0a2c196d9 Mon Sep 17 00:00:00 2001
From: Slipn3r <61992469+Slipn3r@users.noreply.github.com>
Date: Thu, 20 Jul 2023 13:14:14 +0300
Subject: [PATCH] Fix installed version, fallback for channel switch
---
frontend/flipperzero-protobuf | 2 +-
frontend/src/components/InstalledApps.vue | 4 ++--
frontend/src/layouts/MainLayout.vue | 10 ++++++++++
frontend/src/pages/Apps.vue | 2 +-
4 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/frontend/flipperzero-protobuf b/frontend/flipperzero-protobuf
index 1f6b4a0..e5af96e 160000
--- a/frontend/flipperzero-protobuf
+++ b/frontend/flipperzero-protobuf
@@ -1 +1 @@
-Subproject commit 1f6b4a08c5d05c2b17926a3ba79f60109638932f
+Subproject commit e5af96e08fea8351898f7b8c6d1e34ce5fd6cdef
diff --git a/frontend/src/components/InstalledApps.vue b/frontend/src/components/InstalledApps.vue
index 8f8b450..ed36482 100644
--- a/frontend/src/components/InstalledApps.vue
+++ b/frontend/src/components/InstalledApps.vue
@@ -120,7 +120,7 @@
- Version:
+ Version:
{{ app.currentVersion.version }}
@@ -166,7 +166,7 @@
- Version:
+ Version:
{{ app.installedVersion.version }}
diff --git a/frontend/src/layouts/MainLayout.vue b/frontend/src/layouts/MainLayout.vue
index 29bb502..5176faa 100644
--- a/frontend/src/layouts/MainLayout.vue
+++ b/frontend/src/layouts/MainLayout.vue
@@ -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()
})
diff --git a/frontend/src/pages/Apps.vue b/frontend/src/pages/Apps.vue
index 94cc80d..eb01582 100644
--- a/frontend/src/pages/Apps.vue
+++ b/frontend/src/pages/Apps.vue
@@ -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
}