|
|
@ -26,7 +26,7 @@ const view = computed(() => props.view) |
|
|
|
|
|
|
|
|
|
|
|
const table = computed(() => props.table) |
|
|
|
const table = computed(() => props.table) |
|
|
|
|
|
|
|
|
|
|
|
const { viewsByTable, isActiveViewLocked: isLocked } = storeToRefs(useViewsStore()) |
|
|
|
const { viewsByTable } = storeToRefs(useViewsStore()) |
|
|
|
const { loadViews, navigateToView } = useViewsStore() |
|
|
|
const { loadViews, navigateToView } = useViewsStore() |
|
|
|
|
|
|
|
|
|
|
|
const { base } = storeToRefs(useBase()) |
|
|
|
const { base } = storeToRefs(useBase()) |
|
|
@ -56,7 +56,7 @@ const quickImportDialogs: Record<(typeof quickImportDialogTypes)[number], Ref<bo |
|
|
|
) as Record<QuickImportDialogType, Ref<boolean>> |
|
|
|
) as Record<QuickImportDialogType, Ref<boolean>> |
|
|
|
|
|
|
|
|
|
|
|
const onImportClick = (dialog: any) => { |
|
|
|
const onImportClick = (dialog: any) => { |
|
|
|
if (isLocked.value) return |
|
|
|
if (lockType.value === LockType.Locked) return |
|
|
|
|
|
|
|
|
|
|
|
emits('closeModal') |
|
|
|
emits('closeModal') |
|
|
|
dialog.value = true |
|
|
|
dialog.value = true |
|
|
@ -161,10 +161,17 @@ const onDelete = async () => { |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
<NcDivider /> |
|
|
|
<NcDivider /> |
|
|
|
<template v-if="!view?.is_default"> |
|
|
|
<template v-if="!view?.is_default"> |
|
|
|
<NcMenuItem @click="onRenameMenuClick"> |
|
|
|
<NcMenuItem v-if="lockType !== LockType.Locked" @click="onRenameMenuClick"> |
|
|
|
<GeneralIcon icon="edit" /> |
|
|
|
<GeneralIcon icon="edit" /> |
|
|
|
{{ $t('activity.renameView') }} |
|
|
|
{{ $t('activity.renameView') }} |
|
|
|
</NcMenuItem> |
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
<NcTooltip v-else> |
|
|
|
|
|
|
|
<template #title> {{ $t('msg.info.disabledAsViewLocked') }} </template> |
|
|
|
|
|
|
|
<NcMenuItem class="!cursor-not-allowed !text-gray-400"> |
|
|
|
|
|
|
|
<GeneralIcon icon="edit" /> |
|
|
|
|
|
|
|
{{ $t('activity.renameView') }} |
|
|
|
|
|
|
|
</NcMenuItem> |
|
|
|
|
|
|
|
</NcTooltip> |
|
|
|
<NcMenuItem @click="onDuplicate"> |
|
|
|
<NcMenuItem @click="onDuplicate"> |
|
|
|
<GeneralIcon icon="duplicate" class="nc-view-copy-icon" /> |
|
|
|
<GeneralIcon icon="duplicate" class="nc-view-copy-icon" /> |
|
|
|
{{ $t('labels.duplicateView') }} |
|
|
|
{{ $t('labels.duplicateView') }} |
|
|
@ -203,7 +210,7 @@ const onDelete = async () => { |
|
|
|
}, |
|
|
|
}, |
|
|
|
]" |
|
|
|
]" |
|
|
|
class="nc-base-menu-item" |
|
|
|
class="nc-base-menu-item" |
|
|
|
:class="{ disabled: isLocked }" |
|
|
|
:class="{ disabled: lockType === LockType.Locked }" |
|
|
|
> |
|
|
|
> |
|
|
|
<component :is="iconMap.upload" /> |
|
|
|
<component :is="iconMap.upload" /> |
|
|
|
{{ `${$t('general.upload')} ${type.toUpperCase()}` }} |
|
|
|
{{ `${$t('general.upload')} ${type.toUpperCase()}` }} |
|
|
@ -272,7 +279,7 @@ const onDelete = async () => { |
|
|
|
</NcSubMenu> |
|
|
|
</NcSubMenu> |
|
|
|
<template v-if="!view.is_default"> |
|
|
|
<template v-if="!view.is_default"> |
|
|
|
<NcDivider /> |
|
|
|
<NcDivider /> |
|
|
|
<NcTooltip v-if="isLocked"> |
|
|
|
<NcTooltip v-if="lockType === LockType.Locked"> |
|
|
|
<template #title> {{ $t('msg.info.disabledAsViewLocked') }} </template> |
|
|
|
<template #title> {{ $t('msg.info.disabledAsViewLocked') }} </template> |
|
|
|
<NcMenuItem class="!cursor-not-allowed !text-gray-400"> |
|
|
|
<NcMenuItem class="!cursor-not-allowed !text-gray-400"> |
|
|
|
<GeneralIcon icon="delete" class="nc-view-delete-icon" /> |
|
|
|
<GeneralIcon icon="delete" class="nc-view-delete-icon" /> |
|
|
|