|
|
@ -1,18 +1,8 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
<script lang="ts" setup> |
|
|
|
import type { KanbanType, ViewType, ViewTypes } from 'nocodb-sdk' |
|
|
|
import type { KanbanType, ViewType, ViewTypes } from 'nocodb-sdk' |
|
|
|
import type { WritableComputedRef } from '@vue/reactivity' |
|
|
|
import type { WritableComputedRef } from '@vue/reactivity' |
|
|
|
import { |
|
|
|
|
|
|
|
IsLockedInj, |
|
|
|
|
|
|
|
inject, |
|
|
|
|
|
|
|
message, |
|
|
|
|
|
|
|
onKeyStroke, |
|
|
|
|
|
|
|
useDebounceFn, |
|
|
|
|
|
|
|
useNuxtApp, |
|
|
|
|
|
|
|
useUIPermission, |
|
|
|
|
|
|
|
useVModel, |
|
|
|
|
|
|
|
} from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { Tooltip } from 'ant-design-vue' |
|
|
|
import { Tooltip } from 'ant-design-vue' |
|
|
|
|
|
|
|
import { IsLockedInj, inject, message, onKeyStroke, useDebounceFn, useNuxtApp, useUIPermission, useVModel } from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
interface Props { |
|
|
|
view: ViewType |
|
|
|
view: ViewType |
|
|
@ -175,8 +165,7 @@ function onStopEdit() { |
|
|
|
@dblclick.stop="onDblClick" |
|
|
|
@dblclick.stop="onDblClick" |
|
|
|
@click.stop="onClick" |
|
|
|
@click.stop="onClick" |
|
|
|
> |
|
|
|
> |
|
|
|
<div v-e="['a:view:open', { view: vModel.type }]" class="text-xs flex items-center w-full gap-2" |
|
|
|
<div v-e="['a:view:open', { view: vModel.type }]" class="text-xs flex items-center w-full gap-2" data-testid="view-item"> |
|
|
|
data-testid="view-item"> |
|
|
|
|
|
|
|
<div class="flex w-auto min-w-5" :data-testid="`view-sidebar-drag-handle-${vModel.alias || vModel.title}`"> |
|
|
|
<div class="flex w-auto min-w-5" :data-testid="`view-sidebar-drag-handle-${vModel.alias || vModel.title}`"> |
|
|
|
<a-dropdown :trigger="['click']" @click.stop> |
|
|
|
<a-dropdown :trigger="['click']" @click.stop> |
|
|
|
<component :is="isUIAllowed('tableIconCustomisation') ? Tooltip : 'div'"> |
|
|
|
<component :is="isUIAllowed('tableIconCustomisation') ? Tooltip : 'div'"> |
|
|
@ -190,8 +179,7 @@ function onStopEdit() { |
|
|
|
</a-dropdown> |
|
|
|
</a-dropdown> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<a-input v-if="isEditing" :ref="focusInput" v-model:value="vModel.title" @blur="onCancel" |
|
|
|
<a-input v-if="isEditing" :ref="focusInput" v-model:value="vModel.title" @blur="onCancel" @keydown="onKeyDown($event)" /> |
|
|
|
@keydown="onKeyDown($event)" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div v-else> |
|
|
|
<div v-else> |
|
|
|
<LazyGeneralTruncateText>{{ vModel.alias || vModel.title }}</LazyGeneralTruncateText> |
|
|
|
<LazyGeneralTruncateText>{{ vModel.alias || vModel.title }}</LazyGeneralTruncateText> |
|
|
@ -206,8 +194,7 @@ function onStopEdit() { |
|
|
|
{{ $t('activity.copyView') }} |
|
|
|
{{ $t('activity.copyView') }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<MdiContentCopy class="hidden group-hover:block text-gray-500 nc-view-copy-icon" |
|
|
|
<MdiContentCopy class="hidden group-hover:block text-gray-500 nc-view-copy-icon" @click.stop="onDuplicate" /> |
|
|
|
@click.stop="onDuplicate" /> |
|
|
|
|
|
|
|
</a-tooltip> |
|
|
|
</a-tooltip> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="!vModel.is_default"> |
|
|
|
<template v-if="!vModel.is_default"> |
|
|
|