Browse Source

chore(nc-gui): lint

pull/3612/head
braks 2 years ago committed by Muhammed Mustafa
parent
commit
1d19e4822e
  1. 6
      packages/nc-gui/assets/style.scss
  2. 62
      packages/nc-gui/components/erd/SimpleView.vue
  3. 2
      packages/nc-gui/components/smartsheet-toolbar/ViewActions.vue

6
packages/nc-gui/assets/style.scss

@ -249,9 +249,3 @@ a {
transform: scale(75%); transform: scale(75%);
transform-origin: bottom right; transform-origin: bottom right;
} }
.nc-modal-erd {
.ant-modal {
transform: none !important;
}
}

62
packages/nc-gui/components/erd/SimpleView.vue

@ -24,6 +24,8 @@ const { metasWithIdAsKey } = useMetas()
const { $destroy, fitView } = useVueFlow() const { $destroy, fitView } = useVueFlow()
const isTransitioning = ref(true)
const nodes = ref<Node[]>([]) const nodes = ref<Node[]>([])
const edges = ref<Edge[]>([]) const edges = ref<Edge[]>([])
@ -193,35 +195,41 @@ init()
onScopeDispose($destroy) onScopeDispose($destroy)
watch([() => tables, () => config], () => init(true), { deep: true, flush: 'pre' }) watch([() => tables, () => config], () => init(true), { deep: true, flush: 'pre' })
useEventListener('transitionend', () => {
isTransitioning.value = false
})
</script> </script>
<template> <template>
<VueFlow :nodes="nodes" :edges="edges" fit-view-on-init elevate-edges-on-select> <Transition name="layout" mode="out-in">
<Controls class="!left-auto right-2 !top-3.5 !bottom-auto" :show-fit-view="false" :show-interactive="false" /> <VueFlow v-if="!isTransitioning" :nodes="nodes" :edges="edges" fit-view-on-init elevate-edges-on-select>
<Controls class="!left-auto right-2 !top-3.5 !bottom-auto" :show-fit-view="false" :show-interactive="false" />
<template #node-custom="props">
<TableNode :data="props.data" /> <template #node-custom="props">
</template> <TableNode :data="props.data" />
</template>
<template #edge-custom="props">
<RelationEdge v-bind="props" /> <template #edge-custom="props">
</template> <RelationEdge v-bind="props" />
</template>
<Background />
<Background />
<div
v-if="!config.singleTableMode" <div
class="absolute bottom-0 right-0 flex flex-col text-xs bg-white px-2 py-1 border-1 rounded-md border-gray-200" v-if="!config.singleTableMode"
style="font-size: 0.6rem" class="absolute bottom-0 right-0 flex flex-col text-xs bg-white px-2 py-1 border-1 rounded-md border-gray-200 z-50 nc-erd-histogram"
> style="font-size: 0.6rem"
<div class="flex flex-row items-center space-x-1 border-b-1 pb-1 border-gray-100"> >
<MdiTableLarge class="text-primary" /> <div class="flex flex-row items-center space-x-1 border-b-1 pb-1 border-gray-100">
<div>{{ $t('objects.table') }}</div> <MdiTableLarge class="text-primary" />
</div> <div>{{ $t('objects.table') }}</div>
<div class="flex flex-row items-center space-x-1 pt-1"> </div>
<MdiEyeCircleOutline class="text-primary" /> <div class="flex flex-row items-center space-x-1 pt-1">
<div>{{ $t('objects.sqlVIew') }}</div> <MdiEyeCircleOutline class="text-primary" />
<div>{{ $t('objects.sqlVIew') }}</div>
</div>
</div> </div>
</div> </VueFlow>
</VueFlow> </Transition>
</template> </template>

2
packages/nc-gui/components/smartsheet-toolbar/ViewActions.vue

@ -245,7 +245,7 @@ const { isSqlView } = useSmartsheetStoreOrThrow()
</div> </div>
</template> </template>
<style lang="scss" scoped> <style scoped>
:deep(.ant-dropdown-menu-submenu-title) { :deep(.ant-dropdown-menu-submenu-title) {
@apply py-0; @apply py-0;
} }

Loading…
Cancel
Save