File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,11 @@ import { chatApi, ChatInfo } from '@/api/chat.ts'
88import { datasourceApi } from ' @/api/datasource.ts'
99import Card from ' @/views/ds/ChatCard.vue'
1010import AddDrawer from ' @/views/ds/AddDrawer.vue'
11+ import { useUserStore } from ' @/stores/user'
1112
13+ const userStore = useUserStore ()
14+
15+ const isWsAdmin = computed (() => userStore .isAdmin || userStore .isSpaceAdmin )
1216const props = withDefaults (
1317 defineProps <{
1418 hidden? : boolean
@@ -187,7 +191,7 @@ defineExpose({
187191 img-type =" noneWhite"
188192 />
189193
190- <div style =" text-align : center ; margin-top : -10px " >
194+ <div v-if = " isWsAdmin " style =" text-align : center ; margin-top : -10px " >
191195 <el-button type =" primary" @click =" handleAddDatasource" >
192196 <template #icon >
193197 <icon _add_outlined ></icon _add_outlined >
You can’t perform that action at this time.
0 commit comments