diff --git a/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue b/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue index 816abbb52d..d346d3a157 100644 --- a/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue +++ b/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue @@ -139,8 +139,7 @@ async function updateProjectTitle() { $e('a:base:rename') useTitle(`${base.value?.title}`) - } - catch (e: any) { + } catch (e: any) { message.error(await extractSdkResponseErrorMsg(e)) } } @@ -159,8 +158,7 @@ async function copyProjectInfo() { // Copied to clipboard message.info(t('msg.info.copiedToClipboard')) } - } - catch (e: any) { + } catch (e: any) { console.error(e) message.error(e.message) } @@ -180,8 +178,7 @@ async function setIcon(icon: string, base: BaseType) { basesStore.updateProject(base.id!, { meta: JSON.stringify(meta) }) $e('a:base:icon:navdraw', { icon }) - } - catch (e: any) { + } catch (e: any) { message.error(await extractSdkResponseErrorMsg(e)) } } @@ -227,6 +224,7 @@ function openTableCreateDialog(sourceIndex?: number | undefined) { } const isAddNewProjectChildEntityLoading = ref(false) + async function addNewProjectChildEntity() { if (isAddNewProjectChildEntityLoading.value) return @@ -246,8 +244,7 @@ async function addNewProjectChildEntity() { if (!base.value.isExpanded && base.value.type !== NcProjectType.DB) { base.value.isExpanded = true } - } - finally { + } finally { isAddNewProjectChildEntityLoading.value = false } } @@ -264,8 +261,7 @@ async function onProjectClick(base: NcProject, ignoreNavigation?: boolean, toggl if (toggleIsExpanded) { base.isExpanded = !base.isExpanded - } - else { + } else { base.isExpanded = true } @@ -315,8 +311,7 @@ function openErdView(source: SourceType) { const contextMenuBase = computed(() => { if (contextMenuTarget.type === 'source') { 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) if (source) return source } @@ -402,8 +397,9 @@ function projectDelete() {