Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: update sidebar (#9658)
ecmadao09a1802f98b9
diff --git a/frontend/src/components/CommonSidebar.vue b/frontend/src/components/CommonSidebar.vueindex 9c0290d8f5..c52c32a689 100644--- a/frontend/src/components/CommonSidebar.vue+++ b/frontend/src/components/CommonSidebar.vue@@ -1,21 +1,19 @@<template><nav class="flex-1 flex flex-col overflow-y-hidden"><BytebaseLogo v-if="showLogo" class="w-full px-4 shrink-0" />- <div class="flex-1 overflow-y-auto px-2.5">+ <div class="flex-1 overflow-y-auto px-2.5 space-y-1"><div v-for="(item, i) in filteredSidebarList" :key="i"><router-linkv-if="item.type === 'route'":to="item.path ?? ''"- class="outline-item group w-full font-medium flex items-center px-2 py-1.5 !text-sm rounded-md mb-1"- :class="getItemClass(item.path)"+ :class="[parentRouteClass, getItemClass(item.path)]"><component :is="item.icon" class="mr-2 w-5 h-5 text-gray-500" />{{ item.title }}</router-link><divv-else-if="item.type === 'div'"- class="group flex items-center px-2 py-1.5 leading-normal font-medium rounded-md text-gray-700 outline-item !text-sm mt-1"- :class="getItemClass(item.path)"+ :class="[parentRouteClass, getItemClass(item.path)]"@click="onClick(i)"><component :is="item.icon" class="mr-2 w-5 h-5 text-gray-500" />@@ -30,8 +28,7 @@</div><av-if="item.type === 'link'"- class="group flex items-center px-2 py-1.5 leading-5 font-medium rounded-md text-gray-700 outline-item !text-item"- :class="getItemClass(item.path)"+ :class="[parentRouteClass, getItemClass(item.path)]":href="item.path"@click="$emit('select', item.path)">@@ -44,13 +41,12 @@/><divv-if="item.children.length > 0 && state.expandedSidebar.has(i)"- class=""+ class="space-y-1 mt-1"><template v-for="(child, j) in item.children" :key="`${i}-${j}`"><av-if="child.type === 'link'"- class="group w-full flex items-center pl-9 pr-2 py-1.5 outline-item mb-0.5 mt-1"- :class="getItemClass(child.path)"+ :class="[childRouteClass, getItemClass(child.path)]":href="child.path"@click="$emit('select', child.path)">@@ -59,8 +55,7 @@<router-linkv-else-if="child.type === 'route'":to="child.path"- class="outline-item group w-full flex items-center pl-9 pr-2 py-1 rounded-md my-0.5"- :class="getItemClass(child.path)"+ :class="[childRouteClass, getItemClass(child.path)]">{{ child.title }}</router-link>@@ -113,6 +108,14 @@ const state = reactive<LocalState>({expandedSidebar: new Set(),});+const parentRouteClass = computed(() => {+ return "group flex items-center px-2 py-1.5 leading-normal font-medium rounded-md text-gray-700 outline-item !text-sm";+});++const childRouteClass = computed(() => {+ return "group w-full flex items-center pl-9 pr-2 py-1 outline-item mb-0.5 rounded-md";+});+const filteredSidebarList = computed(() => {return props.itemList.map((item) => ({diff --git a/frontend/src/components/GeneralSetting/SecuritySetting.vue b/frontend/src/components/GeneralSetting/SecuritySetting.vueindex c4bb742f33..9973ea505b 100644--- a/frontend/src/components/GeneralSetting/SecuritySetting.vue+++ b/frontend/src/components/GeneralSetting/SecuritySetting.vue@@ -13,75 +13,76 @@</div><div class="flex-1 lg:px-4"><div class="mb-7 mt-4 lg:mt-0">- <label- class="flex items-center gap-x-2 tooltip-wrapper"- :class="[allowEdit ? 'cursor-pointer' : 'cursor-not-allowed']"- >- <NCheckbox- :disabled="!allowEdit"- :checked="watermarkEnabled"- @update:checked="handleWatermarkToggle"- />- <span class="font-medium">{{- $t("settings.general.workspace.watermark.enable")- }}</span>-- <span- v-if="!allowEdit"- class="text-sm text-gray-400 -translate-y-2 tooltip"- >+ <NTooltip placement="top-start" :disabled="allowEdit">+ <template #trigger>+ <label+ class="flex items-center gap-x-2"+ :class="[allowEdit ? 'cursor-pointer' : 'cursor-not-allowed']"+ >+ <NCheckbox+ :disabled="!allowEdit"+ :checked="watermarkEnabled"+ @update:checked="handleWatermarkToggle"+ />+ <span class="font-medium">{{+ $t("settings.general.workspace.watermark.enable")+ }}</span>+ </label>+ </template>+ <span class="text-sm text-gray-400 -translate-y-2">{{ $t("settings.general.workspace.watermark.only-admin-can-edit") }}</span>- </label>+ </NTooltip><div class="mb-3 text-sm text-gray-400">{{ $t("settings.general.workspace.watermark.description") }}</div></div><div v-if="!isSaaSMode" class="mb-7 mt-4 lg:mt-0">- <label- class="flex items-center gap-x-2 tooltip-wrapper"- :class="[allowEdit ? 'cursor-pointer' : 'cursor-not-allowed']"- >- <NCheckbox- :disabled="!allowEdit"- :checked="disallowSignupEnabled"- @update:checked="handleDisallowSignupToggle"- />- <span class="font-medium">{{- $t("settings.general.workspace.disallow-signup.enable")- }}</span>-- <span- v-if="!allowEdit"- class="text-sm text-gray-400 -translate-y-2 tooltip"- >+ <NTooltip placement="top-start" :disabled="allowEdit">+ <template #trigger>+ <label+ class="flex items-center gap-x-2"+ :class="[allowEdit ? 'cursor-pointer' : 'cursor-not-allowed']"+ >+ <NCheckbox+ :disabled="!allowEdit"+ :checked="disallowSignupEnabled"+ @update:checked="handleDisallowSignupToggle"+ />+ <span class="font-medium">{{+ $t("settings.general.workspace.disallow-signup.enable")+ }}</span>+ </label>+ </template>+ <span class="text-sm text-gray-400 -translate-y-2">{{ $t("settings.general.workspace.only-admin-can-edit") }}</span>- </label>+ </NTooltip><div class="mb-3 text-sm text-gray-400">{{ $t("settings.general.workspace.disallow-signup.description") }}</div></div><div class="mb-7 mt-4 lg:mt-0">- <label- class="flex items-center gap-x-2 tooltip-wrapper"- :class="[allowEdit ? 'cursor-pointer' : 'cursor-not-allowed']"- >- <NCheckbox- :disabled="!allowEdit"- :checked="require2FAEnabled"- @update:checked="handleRequire2FAToggle"- />- <span class="font-medium">{{- $t("settings.general.workspace.require-2fa.enable")- }}</span>- <span- v-if="!allowEdit"- class="text-sm text-gray-400 -translate-y-2 tooltip"- >+ <NTooltip placement="top-start" :disabled="allowEdit">+ <template #trigger>+ <label+ class="flex items-center gap-x-2"+ :class="[allowEdit ? 'cursor-pointer' : 'cursor-not-allowed']"+ >+ <NCheckbox+ :disabled="!allowEdit"+ :checked="require2FAEnabled"+ @update:checked="handleRequire2FAToggle"+ />+ <span class="font-medium">{{+ $t("settings.general.workspace.require-2fa.enable")+ }}</span>+ </label>+ </template>+ <span class="text-sm text-gray-400 -translate-y-2">{{ $t("settings.general.workspace.only-admin-can-edit") }}</span>- </label>+ </NTooltip><div class="mb-3 text-sm text-gray-400">{{ $t("settings.general.workspace.require-2fa.description") }}</div>