Browse Source

fix: tooltips and color corrections

pull/9879/head
DarkPhoenix2704 3 days ago
parent
commit
6834d46eb5
  1. 8
      packages/nc-gui/components/dashboard/settings/BaseSettings.vue
  2. 7
      packages/nc-gui/composables/useBetaFeatureToggle.ts

8
packages/nc-gui/components/dashboard/settings/BaseSettings.vue

@ -3,9 +3,13 @@ const { isUIAllowed } = useRoles()
const hasPermissionForSnapshots = computed(() => isUIAllowed('manageSnapshot'))
const { isFeatureEnabled } = useBetaFeatureToggle()
const router = useRouter()
const activeMenu = ref(isEeUI && hasPermissionForSnapshots.value ? 'snapshots' : 'visibility')
const activeMenu = ref(
isEeUI && isFeatureEnabled(FEATURE_FLAG.BASE_SNAPSHOTS) && hasPermissionForSnapshots.value ? 'snapshots' : 'visibility',
)
const selectMenu = (option: string) => {
if (!hasPermissionForSnapshots.value && option === 'snapshots') {
@ -34,7 +38,7 @@ onMounted(() => {
<div class="flex flex-col">
<div class="h-full w-60">
<div
v-if="isEeUI && hasPermissionForSnapshots"
v-if="isEeUI && hasPermissionForSnapshots && isFeatureEnabled(FEATURE_FLAG.BASE_SNAPSHOTS)"
data-testid="snapshots-tab"
:class="{
'active-menu': activeMenu === 'snapshots',

7
packages/nc-gui/composables/useBetaFeatureToggle.ts

@ -50,6 +50,13 @@ const FEATURES = [
enabled: false,
isEngineering: true,
},
{
id: 'base_snapshots',
title: 'Enable Base Snapshots',
description: 'Snapshots are complete backups of your database at the time of creation.',
enabled: false,
isEngineering: true,
},
]
export const FEATURE_FLAG = Object.fromEntries(FEATURES.map((feature) => [feature.id.toUpperCase(), feature.id])) as Record<

Loading…
Cancel
Save