From 61b83bf792bac0cfe85aef5ed3f9b4bb3178f103 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 28 May 2026 11:25:42 +0000 Subject: [PATCH] feat(docs): per-revision upgrade plan + hard cutoff in version history --- packages/nc-gui/composables/useEeConfig.ts | 6 ++++++ packages/nc-gui/lang/en.json | 8 +++++++- packages/nocodb-sdk/src/lib/DocumentRevision.ts | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/composables/useEeConfig.ts b/packages/nc-gui/composables/useEeConfig.ts index 8b7da06525..1d3bcf3030 100644 --- a/packages/nc-gui/composables/useEeConfig.ts +++ b/packages/nc-gui/composables/useEeConfig.ts @@ -232,6 +232,10 @@ export const useEeConfig = createSharedComposable(() => { const showUpgradeToUseDocsExportPdf = (..._args: any[]) => {} + const revisionRetentionLadder = computed<{ title: string; days: number }[]>(() => []) + + const requiredPlanForRevisionAge = (..._args: any[]): string | null => null + const showScriptPlanLimitExceededModal = (..._args: any[]) => {} const showUpgradeToUseCalendarRange = (..._args: any[]) => {} @@ -438,6 +442,8 @@ export const useEeConfig = createSharedComposable(() => { showUpgradeToUseDocsInlineComments, showUpgradeToUseDocsResolveComments, showUpgradeToUseDocsExportPdf, + revisionRetentionLadder, + requiredPlanForRevisionAge, showScriptPlanLimitExceededModal, blockAddNewScript, blockAddNewDashboard, diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index 221b6f0725..152c15368d 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -1380,7 +1380,13 @@ "labels": { "docHistory": { "title": "Version history", - "retention": "Versions are kept for {count} day on your plan. | Versions are kept for {count} days on your plan.", + "lockedTitle": "{count} day page history", + "lockedDescWithPlan": "Please upgrade to the {plan} plan to access versions older than {count} day. | Please upgrade to the {plan} plan to access versions older than {count} days.", + "lockedDescGeneric": "Upgrade your plan to access versions older than {count} day. | Upgrade your plan to access versions older than {count} days.", + "lockedDescOnPrem": "Enter your license key to access versions older than {count} day. | Enter your license key to access versions older than {count} days.", + "upgradeNow": "Upgrade now", + "retentionByPlanTitle": "Version history by plan", + "retentionByPlanDays": "{count} day | {count} days", "previewEmptyTitle": "Select a version to preview", "previewEmptySubtitle": "Pick one from the list on the right to see the page as it was at that point. Changes against the current version are highlighted inline.", "currentVersion": "Current version · {author}", diff --git a/packages/nocodb-sdk/src/lib/DocumentRevision.ts b/packages/nocodb-sdk/src/lib/DocumentRevision.ts index 7bdefeb090..26fc09bee6 100644 --- a/packages/nocodb-sdk/src/lib/DocumentRevision.ts +++ b/packages/nocodb-sdk/src/lib/DocumentRevision.ts @@ -16,6 +16,8 @@ export interface DocumentRevisionType { created_by?: string; fk_tab_id?: string; source?: DocRevisionSource; + /** True when older than the plan's retention window — content is gated. */ + locked?: boolean; created_at?: string; updated_at?: string; }