|
|
@ -139,8 +139,7 @@ async function updateProjectTitle() { |
|
|
|
$e('a:base:rename') |
|
|
|
$e('a:base:rename') |
|
|
|
|
|
|
|
|
|
|
|
useTitle(`${base.value?.title}`) |
|
|
|
useTitle(`${base.value?.title}`) |
|
|
|
} |
|
|
|
} catch (e: any) { |
|
|
|
catch (e: any) { |
|
|
|
|
|
|
|
message.error(await extractSdkResponseErrorMsg(e)) |
|
|
|
message.error(await extractSdkResponseErrorMsg(e)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -159,8 +158,7 @@ async function copyProjectInfo() { |
|
|
|
// Copied to clipboard |
|
|
|
// Copied to clipboard |
|
|
|
message.info(t('msg.info.copiedToClipboard')) |
|
|
|
message.info(t('msg.info.copiedToClipboard')) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (e: any) { |
|
|
|
catch (e: any) { |
|
|
|
|
|
|
|
console.error(e) |
|
|
|
console.error(e) |
|
|
|
message.error(e.message) |
|
|
|
message.error(e.message) |
|
|
|
} |
|
|
|
} |
|
|
@ -180,8 +178,7 @@ async function setIcon(icon: string, base: BaseType) { |
|
|
|
basesStore.updateProject(base.id!, { meta: JSON.stringify(meta) }) |
|
|
|
basesStore.updateProject(base.id!, { meta: JSON.stringify(meta) }) |
|
|
|
|
|
|
|
|
|
|
|
$e('a:base:icon:navdraw', { icon }) |
|
|
|
$e('a:base:icon:navdraw', { icon }) |
|
|
|
} |
|
|
|
} catch (e: any) { |
|
|
|
catch (e: any) { |
|
|
|
|
|
|
|
message.error(await extractSdkResponseErrorMsg(e)) |
|
|
|
message.error(await extractSdkResponseErrorMsg(e)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -227,6 +224,7 @@ function openTableCreateDialog(sourceIndex?: number | undefined) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const isAddNewProjectChildEntityLoading = ref(false) |
|
|
|
const isAddNewProjectChildEntityLoading = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
async function addNewProjectChildEntity() { |
|
|
|
async function addNewProjectChildEntity() { |
|
|
|
if (isAddNewProjectChildEntityLoading.value) return |
|
|
|
if (isAddNewProjectChildEntityLoading.value) return |
|
|
|
|
|
|
|
|
|
|
@ -246,8 +244,7 @@ async function addNewProjectChildEntity() { |
|
|
|
if (!base.value.isExpanded && base.value.type !== NcProjectType.DB) { |
|
|
|
if (!base.value.isExpanded && base.value.type !== NcProjectType.DB) { |
|
|
|
base.value.isExpanded = true |
|
|
|
base.value.isExpanded = true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} finally { |
|
|
|
finally { |
|
|
|
|
|
|
|
isAddNewProjectChildEntityLoading.value = false |
|
|
|
isAddNewProjectChildEntityLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -264,8 +261,7 @@ async function onProjectClick(base: NcProject, ignoreNavigation?: boolean, toggl |
|
|
|
|
|
|
|
|
|
|
|
if (toggleIsExpanded) { |
|
|
|
if (toggleIsExpanded) { |
|
|
|
base.isExpanded = !base.isExpanded |
|
|
|
base.isExpanded = !base.isExpanded |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
base.isExpanded = true |
|
|
|
base.isExpanded = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -315,8 +311,7 @@ function openErdView(source: SourceType) { |
|
|
|
const contextMenuBase = computed(() => { |
|
|
|
const contextMenuBase = computed(() => { |
|
|
|
if (contextMenuTarget.type === 'source') { |
|
|
|
if (contextMenuTarget.type === 'source') { |
|
|
|
return contextMenuTarget.value |
|
|
|
return contextMenuTarget.value |
|
|
|
} |
|
|
|
} else if (contextMenuTarget.type === 'table') { |
|
|
|
else if (contextMenuTarget.type === 'table') { |
|
|
|
|
|
|
|
const source = base.value?.sources?.find((b) => b.id === contextMenuTarget.value.source_id) |
|
|
|
const source = base.value?.sources?.find((b) => b.id === contextMenuTarget.value.source_id) |
|
|
|
if (source) return source |
|
|
|
if (source) return source |
|
|
|
} |
|
|
|
} |
|
|
@ -402,8 +397,9 @@ function projectDelete() { |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex items-center mr-1" @click="onProjectClick(base)"> |
|
|
|
<div class="flex items-center mr-1" @click="onProjectClick(base)"> |
|
|
|
<div class="flex items-center select-none w-6 h-full"> |
|
|
|
<div v-e="['c:base:emojiSelect']" class="flex items-center select-none w-6 h-full"> |
|
|
|
<a-spin v-if="base.isLoading" class="!ml-1.25 !flex !flex-row !items-center !my-0.5 w-8" :indicator="indicator" /> |
|
|
|
<a-spin v-if="base.isLoading" class="!ml-1.25 !flex !flex-row !items-center !my-0.5 w-8" :indicator="indicator" /> |
|
|
|
|
|
|
|
|
|
|
|
<LazyGeneralEmojiPicker |
|
|
|
<LazyGeneralEmojiPicker |
|
|
|
v-else |
|
|
|
v-else |
|
|
|
:key="base.meta?.icon" |
|
|
|
:key="base.meta?.icon" |
|
|
@ -412,9 +408,7 @@ function projectDelete() { |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
@emoji-selected="setIcon($event, base)" |
|
|
|
@emoji-selected="setIcon($event, base)" |
|
|
|
> |
|
|
|
> |
|
|
|
<div v-e="['c:base:emojiSelect']"> |
|
|
|
<GeneralProjectIcon :type="base.type" /> |
|
|
|
<GeneralProjectIcon :type="base.type" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</LazyGeneralEmojiPicker> |
|
|
|
</LazyGeneralEmojiPicker> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -441,19 +435,35 @@ function projectDelete() { |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<div :class="{ 'flex flex-grow h-full': !editMode }" @click="onProjectClick(base)"></div> |
|
|
|
<div :class="{ 'flex flex-grow h-full': !editMode }" @click="onProjectClick(base)"></div> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="!isSharedBase"> |
|
|
|
<NcDropdown v-if="!isSharedBase" v-model:visible="isOptionsOpen" :trigger="['click']"> |
|
|
|
<NcDropdown v-model:visible="isOptionsOpen" :trigger="['click']"> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
v-e="['c:base:options']" |
|
|
|
v-e="['c:base:options']" |
|
|
|
class="nc-sidebar-node-btn" |
|
|
|
class="nc-sidebar-node-btn" |
|
|
|
:class="{ '!text-black !opacity-100': isOptionsOpen }" |
|
|
|
:class="{ '!text-black !opacity-100': isOptionsOpen }" |
|
|
|
data-testid="nc-sidebar-context-menu" |
|
|
|
data-testid="nc-sidebar-context-menu" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
size="xxsmall" |
|
|
|
size="xxsmall" |
|
|
|
@click.stop |
|
|
|
@click.stop |
|
|
|
> |
|
|
|
|
|
|
|
<GeneralIcon icon="threeDotHorizontal" class="text-xl w-4.75" /> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
<template #overlay> |
|
|
|
|
|
|
|
<NcMenu |
|
|
|
|
|
|
|
class="nc-scrollbar-md" |
|
|
|
|
|
|
|
:style="{ |
|
|
|
|
|
|
|
maxHeight: '70vh', |
|
|
|
|
|
|
|
overflow: 'overlay', |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
:data-testid="`nc-sidebar-base-${base.title}-options`" |
|
|
|
|
|
|
|
@click="isOptionsOpen = false" |
|
|
|
> |
|
|
|
> |
|
|
|
<GeneralIcon icon="threeDotHorizontal" class="text-xl w-4.75" /> |
|
|
|
<template v-if="!isSharedBase"> |
|
|
|
</NcButton> |
|
|
|
<NcMenuItem v-if="isUIAllowed('baseRename')" data-testid="nc-sidebar-project-rename" @click="enableEditMode"> |
|
|
|
|
|
|
|
<div v-e="['c:base:rename']" class="flex gap-2 items-center"> |
|
|
|
|
|
|
|
<GeneralIcon icon="edit" class="group-hover:text-black" /> |
|
|
|
|
|
|
|
{{ $t('general.rename') }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
<NcMenuItem |
|
|
|
v-if="isUIAllowed('baseDuplicate', { roles: [stringifyRolesObj(orgRoles), baseRole].join() })" |
|
|
|
v-if="isUIAllowed('baseDuplicate', { roles: [stringifyRolesObj(orgRoles), baseRole].join() })" |
|
|
@ -482,11 +492,7 @@ function projectDelete() { |
|
|
|
</NcMenuItem> |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
<!-- ERD View --> |
|
|
|
<!-- ERD View --> |
|
|
|
<NcMenuItem |
|
|
|
<NcMenuItem key="erd" data-testid="nc-sidebar-base-relations" @click="openErdView(base?.sources?.[0]!)"> |
|
|
|
key="erd" |
|
|
|
|
|
|
|
data-testid="nc-sidebar-base-relations" |
|
|
|
|
|
|
|
@click="openErdView(base?.sources?.[0]!)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div v-e="['c:base:erd']" class="flex gap-2 items-center"> |
|
|
|
<div v-e="['c:base:erd']" class="flex gap-2 items-center"> |
|
|
|
<GeneralIcon icon="erd" /> |
|
|
|
<GeneralIcon icon="erd" /> |
|
|
|
{{ $t('title.relations') }} |
|
|
|
{{ $t('title.relations') }} |
|
|
@ -497,7 +503,6 @@ function projectDelete() { |
|
|
|
<NcMenuItem |
|
|
|
<NcMenuItem |
|
|
|
v-if="isUIAllowed('apiDocs')" |
|
|
|
v-if="isUIAllowed('apiDocs')" |
|
|
|
key="api" |
|
|
|
key="api" |
|
|
|
v-e="['c:base:api-docs']" |
|
|
|
|
|
|
|
data-testid="nc-sidebar-base-rest-apis" |
|
|
|
data-testid="nc-sidebar-base-rest-apis" |
|
|
|
@click.stop=" |
|
|
|
@click.stop=" |
|
|
|
() => { |
|
|
|
() => { |
|
|
@ -523,121 +528,43 @@ function projectDelete() { |
|
|
|
<NcMenuItem |
|
|
|
<NcMenuItem |
|
|
|
v-if="isUIAllowed('baseMiscSettings')" |
|
|
|
v-if="isUIAllowed('baseMiscSettings')" |
|
|
|
key="teamAndSettings" |
|
|
|
key="teamAndSettings" |
|
|
|
v-e="['c:base:settings']" |
|
|
|
|
|
|
|
data-testid="nc-sidebar-base-settings" |
|
|
|
data-testid="nc-sidebar-base-settings" |
|
|
|
class="nc-sidebar-base-base-settings" |
|
|
|
class="nc-sidebar-base-base-settings" |
|
|
|
@click="toggleDialog(true, 'teamAndAuth', undefined, base.id)" |
|
|
|
@click="toggleDialog(true, 'teamAndAuth', undefined, base.id)" |
|
|
|
> |
|
|
|
> |
|
|
|
<template v-if="!isSharedBase"> |
|
|
|
<div v-e="['c:base:settings']" class="flex gap-2 items-center"> |
|
|
|
<NcMenuItem v-if="isUIAllowed('baseRename')" data-testid="nc-sidebar-project-rename" @click="enableEditMode"> |
|
|
|
<GeneralIcon icon="settings" class="group-hover:text-black" /> |
|
|
|
<div v-e="['c:base:rename']" class="flex gap-2 items-center"> |
|
|
|
{{ $t('activity.settings') }} |
|
|
|
<GeneralIcon icon="edit" class="group-hover:text-black" /> |
|
|
|
|
|
|
|
{{ $t('general.rename') }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
v-if="isUIAllowed('baseDuplicate', { roles: [stringifyRolesObj(orgRoles), baseRole].join() })" |
|
|
|
|
|
|
|
data-testid="nc-sidebar-base-duplicate" |
|
|
|
|
|
|
|
@click="duplicateProject(base)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div v-e="['c:base:duplicate']" class="flex gap-2 items-center"> |
|
|
|
|
|
|
|
<GeneralIcon icon="duplicate" class="text-gray-700" /> |
|
|
|
|
|
|
|
{{ $t('general.duplicate') }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<NcDivider v-if="['baseDuplicate', 'baseRename'].some((permission) => isUIAllowed(permission))" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Copy Project Info --> |
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
v-if="!isEeUI" |
|
|
|
|
|
|
|
key="copy" |
|
|
|
|
|
|
|
data-testid="nc-sidebar-base-copy-base-info" |
|
|
|
|
|
|
|
@click.stop="copyProjectInfo" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div v-e="['c:base:copy-proj-info']" class="flex gap-2 items-center"> |
|
|
|
|
|
|
|
<GeneralIcon icon="copy" class="group-hover:text-black" /> |
|
|
|
|
|
|
|
{{ $t('activity.account.projInfo') }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ERD View --> |
|
|
|
|
|
|
|
<NcMenuItem key="erd" data-testid="nc-sidebar-base-relations" @click="openErdView(base?.sources?.[0]!)"> |
|
|
|
|
|
|
|
<div v-e="['c:base:erd']" class="flex gap-2 items-center"> |
|
|
|
|
|
|
|
<GeneralIcon icon="erd" /> |
|
|
|
|
|
|
|
{{ $t('title.relations') }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Swagger: Rest APIs --> |
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
v-if="isUIAllowed('apiDocs')" |
|
|
|
|
|
|
|
key="api" |
|
|
|
|
|
|
|
data-testid="nc-sidebar-base-rest-apis" |
|
|
|
|
|
|
|
@click.stop=" |
|
|
|
|
|
|
|
() => { |
|
|
|
|
|
|
|
$e('c:base:api-docs') |
|
|
|
|
|
|
|
openLink(`/api/v1/db/meta/projects/${base.id}/swagger`, appInfo.ncSiteUrl) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div v-e="['c:base:api-docs']" class="flex gap-2 items-center"> |
|
|
|
|
|
|
|
<GeneralIcon icon="snippet" class="group-hover:text-black !max-w-3.9" /> |
|
|
|
|
|
|
|
{{ $t('activity.account.swagger') }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="base.sources && base.sources[0] && showBaseOption"> |
|
|
|
|
|
|
|
<NcDivider /> |
|
|
|
|
|
|
|
<DashboardTreeViewBaseOptions v-model:base="base" :source="base.sources[0]" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
v-if="isUIAllowed('baseDelete', { roles: [stringifyRolesObj(orgRoles), baseRole].join() })" |
|
|
|
|
|
|
|
data-testid="nc-sidebar-base-delete" |
|
|
|
|
|
|
|
class="!text-red-500 !hover:bg-red-50" |
|
|
|
|
|
|
|
@click="projectDelete" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="flex gap-2 items-center"> |
|
|
|
|
|
|
|
<GeneralIcon icon="delete" class="w-4" /> |
|
|
|
|
|
|
|
{{ $t('general.delete') }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</NcMenu> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</NcDropdown> |
|
|
|
|
|
|
|
|
|
|
|
<NcDivider v-if="['baseMiscSettings', 'baseDelete'].some((permission) => isUIAllowed(permission))" /> |
|
|
|
<NcButton |
|
|
|
|
|
|
|
v-if="isUIAllowed('tableCreate', { roles: baseRole })" |
|
|
|
<NcMenuItem |
|
|
|
v-e="['c:base:create-table']" |
|
|
|
v-if="isUIAllowed('baseMiscSettings')" |
|
|
|
class="nc-sidebar-node-btn" |
|
|
|
key="teamAndSettings" |
|
|
|
size="xxsmall" |
|
|
|
data-testid="nc-sidebar-base-settings" |
|
|
|
type="text" |
|
|
|
class="nc-sidebar-base-base-settings" |
|
|
|
data-testid="nc-sidebar-add-base-entity" |
|
|
|
@click="toggleDialog(true, 'teamAndAuth', undefined, base.id)" |
|
|
|
:class="{ '!text-black !visible': isAddNewProjectChildEntityLoading, '!visible': isOptionsOpen }" |
|
|
|
> |
|
|
|
:loading="isAddNewProjectChildEntityLoading" |
|
|
|
<div v-e="['c:base:settings']" class="flex gap-2 items-center"> |
|
|
|
@click.stop="addNewProjectChildEntity" |
|
|
|
<GeneralIcon icon="settings" class="group-hover:text-black" /> |
|
|
|
> |
|
|
|
{{ $t('activity.settings') }} |
|
|
|
<GeneralIcon icon="plus" class="text-xl leading-5" style="-webkit-text-stroke: 0.15px" /> |
|
|
|
</div> |
|
|
|
</NcButton> |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
|
|
|
|
v-if="isUIAllowed('baseDelete', { roles: [stringifyRolesObj(orgRoles), baseRole].join() })" |
|
|
|
|
|
|
|
data-testid="nc-sidebar-base-delete" |
|
|
|
|
|
|
|
class="!text-red-500 !hover:bg-red-50" |
|
|
|
|
|
|
|
@click="projectDelete" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="flex gap-2 items-center"> |
|
|
|
|
|
|
|
<GeneralIcon icon="delete" class="w-4" /> |
|
|
|
|
|
|
|
{{ $t('general.delete') }} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</NcMenu> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</NcDropdown> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="isUIAllowed('tableCreate', { roles: baseRole })" v-e="['c:base:create-table']"> |
|
|
|
|
|
|
|
<NcButton |
|
|
|
|
|
|
|
class="nc-sidebar-node-btn" |
|
|
|
|
|
|
|
size="xxsmall" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
data-testid="nc-sidebar-add-base-entity" |
|
|
|
|
|
|
|
:class="{ '!text-black !visible': isAddNewProjectChildEntityLoading, '!visible': isOptionsOpen }" |
|
|
|
|
|
|
|
:loading="isAddNewProjectChildEntityLoading" |
|
|
|
|
|
|
|
@click.stop="addNewProjectChildEntity" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<GeneralIcon icon="plus" class="text-xl leading-5" style="-webkit-text-stroke: 0.15px" /> |
|
|
|
|
|
|
|
</NcButton> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
@ -679,7 +606,6 @@ function projectDelete() { |
|
|
|
:class="{ '!rotate-180': isActive }" |
|
|
|
:class="{ '!rotate-180': isActive }" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<a-collapse-panel :key="`collapse-${source.id}`"> |
|
|
|
<a-collapse-panel :key="`collapse-${source.id}`"> |
|
|
|
<template #header> |
|
|
|
<template #header> |
|
|
@ -718,18 +644,16 @@ function projectDelete() { |
|
|
|
:trigger="['click']" |
|
|
|
:trigger="['click']" |
|
|
|
@update:visible="isBasesOptionsOpen[source!.id!] = $event" |
|
|
|
@update:visible="isBasesOptionsOpen[source!.id!] = $event" |
|
|
|
> |
|
|
|
> |
|
|
|
<div v-e="['c:source:options']"> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
v-e="['c:source:options']" |
|
|
|
class="nc-sidebar-node-btn" |
|
|
|
class="nc-sidebar-node-btn" |
|
|
|
:class="{ '!text-black !opacity-100': isBasesOptionsOpen[source!.id!] }" |
|
|
|
:class="{ '!text-black !opacity-100': isBasesOptionsOpen[source!.id!] }" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
size="xxsmall" |
|
|
|
size="xxsmall" |
|
|
|
@click.stop="isBasesOptionsOpen[source!.id!] = !isBasesOptionsOpen[source!.id!]" |
|
|
|
@click.stop="isBasesOptionsOpen[source!.id!] = !isBasesOptionsOpen[source!.id!]" |
|
|
|
> |
|
|
|
> |
|
|
|
<GeneralIcon icon="threeDotHorizontal" class="text-xl w-4.75" /> |
|
|
|
<GeneralIcon icon="threeDotHorizontal" class="text-xl w-4.75" /> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template #overlay> |
|
|
|
<template #overlay> |
|
|
|
<NcMenu |
|
|
|
<NcMenu |
|
|
|
class="nc-scrollbar-md" |
|
|
|
class="nc-scrollbar-md" |
|
|
@ -752,16 +676,16 @@ function projectDelete() { |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</NcDropdown> |
|
|
|
</NcDropdown> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="isUIAllowed('tableCreate', { roles: baseRole })" v-e="['c:source:add-table']"> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
v-if="isUIAllowed('tableCreate', { roles: baseRole })" |
|
|
|
type="text" |
|
|
|
v-e="['c:source:add-table']" |
|
|
|
size="xxsmall" |
|
|
|
type="text" |
|
|
|
class="nc-sidebar-node-btn" |
|
|
|
size="xxsmall" |
|
|
|
@click.stop="openTableCreateDialog(sourceIndex)" |
|
|
|
class="nc-sidebar-node-btn" |
|
|
|
> |
|
|
|
@click.stop="openTableCreateDialog(sourceIndex)" |
|
|
|
<GeneralIcon icon="plus" class="text-xl leading-5" style="-webkit-text-stroke: 0.15px" /> |
|
|
|
> |
|
|
|
</NcButton> |
|
|
|
<GeneralIcon icon="plus" class="text-xl leading-5" style="-webkit-text-stroke: 0.15px" /> |
|
|
|
</div> |
|
|
|
</NcButton> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -773,7 +697,6 @@ function projectDelete() { |
|
|
|
<DashboardTreeViewTableList :base="base" :source-index="sourceIndex" /> |
|
|
|
<DashboardTreeViewTableList :base="base" :source-index="sourceIndex" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-collapse-panel> |
|
|
|
</a-collapse-panel> |
|
|
|
|
|
|
|
|
|
|
|
</a-collapse> |
|
|
|
</a-collapse> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -795,6 +718,7 @@ function projectDelete() { |
|
|
|
{{ $t('general.rename') }} |
|
|
|
{{ $t('general.rename') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</NcMenuItem> |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
|
|
|
|
<NcMenuItem |
|
|
|
<NcMenuItem |
|
|
|
v-if="isUIAllowed('tableDuplicate') && (contextMenuBase?.is_meta || contextMenuBase?.is_local)" |
|
|
|
v-if="isUIAllowed('tableDuplicate') && (contextMenuBase?.is_meta || contextMenuBase?.is_local)" |
|
|
|
@click="duplicateTable(contextMenuTarget.value)" |
|
|
|
@click="duplicateTable(contextMenuTarget.value)" |
|
|
@ -814,7 +738,6 @@ function projectDelete() { |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</NcMenu> |
|
|
|
</NcMenu> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
</NcDropdown> |
|
|
|
</NcDropdown> |
|
|
|
<DlgTableDelete |
|
|
|
<DlgTableDelete |
|
|
|
v-if="contextMenuTarget.value?.id && base?.id" |
|
|
|
v-if="contextMenuTarget.value?.id && base?.id" |
|
|
@ -822,11 +745,8 @@ function projectDelete() { |
|
|
|
:table-id="contextMenuTarget.value?.id" |
|
|
|
:table-id="contextMenuTarget.value?.id" |
|
|
|
:base-id="base?.id" |
|
|
|
:base-id="base?.id" |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<DlgProjectDelete v-model:visible="isProjectDeleteDialogVisible" :base-id="base?.id" /> |
|
|
|
<DlgProjectDelete v-model:visible="isProjectDeleteDialogVisible" :base-id="base?.id" /> |
|
|
|
|
|
|
|
|
|
|
|
<DlgProjectDuplicate v-if="selectedProjectToDuplicate" v-model="isDuplicateDlgOpen" :base="selectedProjectToDuplicate" /> |
|
|
|
<DlgProjectDuplicate v-if="selectedProjectToDuplicate" v-model="isDuplicateDlgOpen" :base="selectedProjectToDuplicate" /> |
|
|
|
|
|
|
|
|
|
|
|
<GeneralModal v-model:visible="isErdModalOpen" size="large"> |
|
|
|
<GeneralModal v-model:visible="isErdModalOpen" size="large"> |
|
|
|
<div class="h-[80vh]"> |
|
|
|
<div class="h-[80vh]"> |
|
|
|
<LazyDashboardSettingsErd :source-id="activeBaseId" /> |
|
|
|
<LazyDashboardSettingsErd :source-id="activeBaseId" /> |
|
|
|