fix: hide update alert for non-distributed connectors (#63)

* fix: hide update alert for non-distributed connectors

* chore: formatting
This commit is contained in:
Björn Steinhagen
2025-10-09 08:36:11 +02:00
committed by GitHub
parent 185ba0f50a
commit a166b86657
2 changed files with 7 additions and 3 deletions
+2
View File
@@ -1,6 +1,8 @@
<template>
<CommonAlert
v-if="
store.isDistributedBySpeckle &&
store.latestAvailableVersion &&
!store.isConnectorUpToDate &&
!hasDismissedAlert &&
!store.isUpdateNotificationDisabled
+5 -3
View File
@@ -81,9 +81,11 @@ export const useHostAppStore = defineStore('hostAppStore', () => {
$openUrl(latestAvailableVersion.value?.Url as string)
}
const isConnectorUpToDate = computed(
() => connectorVersion.value === latestAvailableVersion.value?.Number
)
const isConnectorUpToDate = computed(() => {
if (!isDistributedBySpeckle.value) return true
if (!latestAvailableVersion.value?.Number || !connectorVersion.value) return true
return connectorVersion.value === latestAvailableVersion.value.Number
})
const setHostAppError = (error: Nullable<HostAppError>) => {
hostAppError.value = error