feat: maybe fix for revit 2022
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
class="w-4 text-foreground-disabled group-hover:text-foreground-2"
|
||||
/>
|
||||
</HeaderButton>
|
||||
<HeaderButton v-tippy="'Send us feedback'" @click="$intercom.show()">
|
||||
<HeaderButton v-tippy="'Send us feedback'" @click="openFeedbackDialog()">
|
||||
<ChatBubbleLeftIcon
|
||||
class="w-4 text-foreground-disabled group-hover:text-foreground-2"
|
||||
/>
|
||||
@@ -100,5 +100,16 @@ app.$baseBinding.on('documentChanged', () => {
|
||||
showReceiveDialog.value = false
|
||||
})
|
||||
|
||||
// const { $intercom } = useNuxtApp()
|
||||
const { $intercom } = useNuxtApp()
|
||||
|
||||
const openFeedbackDialog = () => {
|
||||
if (
|
||||
hostAppStore.hostAppName?.toLowerCase() === 'revit' &&
|
||||
hostAppStore.hostAppVersion?.includes('2022')
|
||||
) {
|
||||
showFeedbackDialog.value = true
|
||||
} else {
|
||||
$intercom.show()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -30,7 +30,6 @@ export const useIntercom = () => {
|
||||
const shouldEnableIntercom = computed(() => !isRouteBlacklisted.value)
|
||||
|
||||
const bootIntercom = () => {
|
||||
console.log('YOLO')
|
||||
if (!shouldEnableIntercom.value || isInitialized.value || !intercomAppId) return
|
||||
isInitialized.value = true
|
||||
|
||||
|
||||
@@ -694,6 +694,14 @@ export const useHostAppStore = defineStore('hostAppStore', () => {
|
||||
await refreshSendFilters()
|
||||
await getSendSettings()
|
||||
tryToUpgradeModelCardSettings(sendSettings.value || [], 'SenderModelCard')
|
||||
|
||||
// Do not poke intercom in ancient revit version
|
||||
if (
|
||||
hostAppName.value?.toLowerCase() === 'revit' &&
|
||||
hostAppVersion.value?.includes('2022')
|
||||
)
|
||||
return
|
||||
|
||||
app.$intercom.updateConnectorDetails(
|
||||
hostAppName.value as string,
|
||||
hostAppVersion.value as string,
|
||||
|
||||
Reference in New Issue
Block a user