From 341f9441ec47f16b850677adb89eaf797ba8a0f7 Mon Sep 17 00:00:00 2001 From: andrewwallacespeckle Date: Sat, 19 Apr 2025 13:42:24 +0100 Subject: [PATCH] Only show comment when its on an out of limit version --- packages/frontend-2/components/viewer/PreSetupWrapper.vue | 5 ++--- packages/frontend-2/components/viewer/limits/Dialog.vue | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/frontend-2/components/viewer/PreSetupWrapper.vue b/packages/frontend-2/components/viewer/PreSetupWrapper.vue index 425309f2b..2c47ffa54 100644 --- a/packages/frontend-2/components/viewer/PreSetupWrapper.vue +++ b/packages/frontend-2/components/viewer/PreSetupWrapper.vue @@ -287,11 +287,10 @@ watch( return } - if (missingThread) { + // Only show comment dialog if it's a federated view AND we have a missing referenced object + if (missingThread && isFederated.value && hasMissingReferencedObject.value) { limitsDialogType.value = 'comment' showLimitsDialog.value = true - } else { - showLimitsDialog.value = false } }, { immediate: true } diff --git a/packages/frontend-2/components/viewer/limits/Dialog.vue b/packages/frontend-2/components/viewer/limits/Dialog.vue index 5d4d1a8c5..c1767bdc3 100644 --- a/packages/frontend-2/components/viewer/limits/Dialog.vue +++ b/packages/frontend-2/components/viewer/limits/Dialog.vue @@ -34,9 +34,7 @@ const emit = defineEmits<{ }>() const { isEnabled: isEmbedEnabled } = useEmbed() -const { versionLimitFormatted, commentLimitFormatted } = useWorkspaceLimits( - props.workspaceSlug -) +const { versionLimitFormatted } = useWorkspaceLimits(props.workspaceSlug) const dialogOpen = computed({ get: () => props.open || false, @@ -63,7 +61,7 @@ const message = computed(() => { case 'federated': return `One of the models is older than the ${versionLimitFormatted.value}-day version history limit allowed by your workspace plan. Upgrade your workspace plan to gain access.` case 'comment': - return `The comment is older than the ${commentLimitFormatted.value} comment history limit allowed by your workspace plan. Upgrade your workspace plan to gain access.` + return `Unable to load the comment because one or more of the referenced models is older than the ${versionLimitFormatted.value}-day version history limit. Upgrade your workspace plan to gain access.` default: return "You've reached the limit of your plan. Please upgrade to continue." }