refactor(fe): Only show comment limit dialog when its on an out of limit version

refactor(fe): Only show comment limit dialog when its on an out of limit version
This commit is contained in:
andrewwallacespeckle
2025-04-21 10:06:10 +01:00
committed by GitHub
2 changed files with 4 additions and 7 deletions
@@ -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 }
@@ -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."
}