From a71f5976013177f2792b1a82aa1019cfed66119c Mon Sep 17 00:00:00 2001 From: Mike Tasset Date: Tue, 10 Dec 2024 16:33:58 +0100 Subject: [PATCH] Fix: Hide disclaimer if FF is enabled --- .../components/workspace/RegionStaticDataDisclaimer.vue | 2 +- packages/frontend-2/composables/globals.ts | 8 ++++++++ packages/frontend-2/lib/workspaces/composables/region.ts | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/frontend-2/components/workspace/RegionStaticDataDisclaimer.vue b/packages/frontend-2/components/workspace/RegionStaticDataDisclaimer.vue index 109411b74f..9cb7f5b0de 100644 --- a/packages/frontend-2/components/workspace/RegionStaticDataDisclaimer.vue +++ b/packages/frontend-2/components/workspace/RegionStaticDataDisclaimer.vue @@ -44,7 +44,7 @@ const dialogButtons = computed((): LayoutDialogButton[] => [ } }, { - text: 'I Understand', + text: 'I understand', onClick: () => { open.value = false emit('confirm') diff --git a/packages/frontend-2/composables/globals.ts b/packages/frontend-2/composables/globals.ts index 088b36e65d..26f3869085 100644 --- a/packages/frontend-2/composables/globals.ts +++ b/packages/frontend-2/composables/globals.ts @@ -26,6 +26,14 @@ export const useIsWorkspacesSsoEnabled = () => { return ref(FF_WORKSPACES_SSO_ENABLED) } +export const useIsWorkspacesMultiRegionBlobStorageEnabled = () => { + const { + public: { FF_WORKSPACES_MULTI_REGION_BLOB_STORAGE_ENABLED } + } = useRuntimeConfig() + + return ref(FF_WORKSPACES_MULTI_REGION_BLOB_STORAGE_ENABLED) +} + export const useIsMultipleEmailsEnabled = () => { const { public: { FF_MULTIPLE_EMAILS_MODULE_ENABLED } diff --git a/packages/frontend-2/lib/workspaces/composables/region.ts b/packages/frontend-2/lib/workspaces/composables/region.ts index edef847cab..45118ea1f6 100644 --- a/packages/frontend-2/lib/workspaces/composables/region.ts +++ b/packages/frontend-2/lib/workspaces/composables/region.ts @@ -39,6 +39,8 @@ export const useWorkspaceCustomDataResidencyDisclaimer = < onConfirmAction: (...args: ConfirmArgs) => MaybeAsync }) => { const { onConfirmAction, workspace } = params + const isWorkspacesMultiRegionBlobStorageEnabled = + useIsWorkspacesMultiRegionBlobStorageEnabled() const showRegionStaticDataDisclaimer = ref(false) const storedArgs = shallowRef() @@ -50,7 +52,7 @@ export const useWorkspaceCustomDataResidencyDisclaimer = < * Trigger the actual action that requires the user to confirm the data residency disclaimer */ const triggerAction = (...args: ConfirmArgs) => { - if (!hasCustomDataResidency.value) { + if (!hasCustomDataResidency.value || isWorkspacesMultiRegionBlobStorageEnabled) { onConfirmAction(...args) } else { storedArgs.value = args