Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

refactor(sql-editor): show the sheet icon when sheet is not `PRIVATE` (#932)

Yunwei Xiao95c097ccb5b8
diff --git a/frontend/src/views/SqlEditor/EditorPanel/SharePopover.vue b/frontend/src/views/SqlEditor/EditorPanel/SharePopover.vue
index d63ec364a3..0ee5b03fed 100644
--- a/frontend/src/views/SqlEditor/EditorPanel/SharePopover.vue
+++ b/frontend/src/views/SqlEditor/EditorPanel/SharePopover.vue
@@ -30,7 +30,7 @@
>
<div class="access-content--prefix flex">
<div v-if="idx === 0" class="mt-1">
- <heroicons-outline:user class="h-5 w-5" />
+ <heroicons-outline:lock-closed class="h-5 w-5" />
</div>
<div v-if="idx === 1" class="mt-1">
<heroicons-outline:user-group class="h-5 w-5" />
diff --git a/frontend/src/views/SqlEditor/TabListContainer.vue b/frontend/src/views/SqlEditor/TabListContainer.vue
index c52a51cf6e..a117a057b9 100644
--- a/frontend/src/views/SqlEditor/TabListContainer.vue
+++ b/frontend/src/views/SqlEditor/TabListContainer.vue
@@ -42,8 +42,16 @@
Edit {{ labelState.currentLabelName }}
</span>
</div>
- <span v-else>
- {{ tab.name }}
+ <span v-else class="flex items-center space-x-2">
+ <heroicons-outline:user-group
+ v-if="currentSheet.visibility === 'PROJECT'"
+ class="w-4 h-4"
+ />
+ <heroicons-outline:globe
+ v-if="currentSheet.visibility === 'PUBLIC'"
+ class="w-4 h-4"
+ />
+ <span>{{ tab.name }}</span>
</span>
</div>
<template v-if="enterTabId === tab.id && tabList.length > 1">
@@ -134,6 +142,7 @@ import {
TabGetters,
TabState,
TabActions,
+ SheetGetters,
SheetActions,
} from "@/types";
import { getDefaultTab } from "@/utils/tab";
@@ -147,6 +156,9 @@ const { currentTab, hasTabs } = useNamespacedGetters<TabGetters>("tab", [
const { isDisconnected } = useNamespacedGetters<SqlEditorGetters>("sqlEditor", [
"isDisconnected",
]);
+const { currentSheet } = useNamespacedGetters<SheetGetters>("sheet", [
+ "currentSheet",
+]);
// state map
const { currentTabId, tabList } = useNamespacedState<TabState>("tab", [