|
|
@ -1,7 +1,6 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
<script lang="ts" setup> |
|
|
|
import { ViewTypes } from 'nocodb-sdk' |
|
|
|
import { ViewTypes } from 'nocodb-sdk' |
|
|
|
import { ref } from '#imports' |
|
|
|
import { ref, useUIPermission, viewIcons } from '#imports' |
|
|
|
import { viewIcons } from '~/utils' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface Emits { |
|
|
|
interface Emits { |
|
|
|
(event: 'openModal', data: { type: ViewTypes; title?: string }): void |
|
|
|
(event: 'openModal', data: { type: ViewTypes; title?: string }): void |
|
|
@ -13,8 +12,6 @@ const { isUIAllowed } = useUIPermission() |
|
|
|
|
|
|
|
|
|
|
|
const isView = ref(false) |
|
|
|
const isView = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const showWebhookDrawer = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function onOpenModal(type: ViewTypes, title = '') { |
|
|
|
function onOpenModal(type: ViewTypes, title = '') { |
|
|
|
emits('openModal', { type, title }) |
|
|
|
emits('openModal', { type, title }) |
|
|
|
} |
|
|
|
} |
|
|
@ -22,7 +19,6 @@ function onOpenModal(type: ViewTypes, title = '') { |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<a-menu :selected-keys="[]" class="flex flex-col"> |
|
|
|
<a-menu :selected-keys="[]" class="flex flex-col"> |
|
|
|
<div class="flex-1"></div> |
|
|
|
|
|
|
|
<div v-if="isUIAllowed('virtualViewsCreateOrEdit')"> |
|
|
|
<div v-if="isUIAllowed('virtualViewsCreateOrEdit')"> |
|
|
|
<h3 class="px-3 py-1 text-xs font-semibold flex items-center gap-4 text-gray-500"> |
|
|
|
<h3 class="px-3 py-1 text-xs font-semibold flex items-center gap-4 text-gray-500"> |
|
|
|
{{ $t('activity.createView') }} |
|
|
|
{{ $t('activity.createView') }} |
|
|
@ -38,7 +34,7 @@ function onOpenModal(type: ViewTypes, title = '') { |
|
|
|
{{ $t('msg.info.addView.grid') }} |
|
|
|
{{ $t('msg.info.addView.grid') }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<div class="text-xs flex items-center h-full w-full gap-2"> |
|
|
|
<div class="nc-project-menu-item text-xs flex items-center h-full w-full gap-2"> |
|
|
|
<component :is="viewIcons[ViewTypes.GRID].icon" :style="{ color: viewIcons[ViewTypes.GRID].color }" /> |
|
|
|
<component :is="viewIcons[ViewTypes.GRID].icon" :style="{ color: viewIcons[ViewTypes.GRID].color }" /> |
|
|
|
|
|
|
|
|
|
|
|
<div>{{ $t('objects.viewType.grid') }}</div> |
|
|
|
<div>{{ $t('objects.viewType.grid') }}</div> |
|
|
@ -50,17 +46,13 @@ function onOpenModal(type: ViewTypes, title = '') { |
|
|
|
</a-tooltip> |
|
|
|
</a-tooltip> |
|
|
|
</a-menu-item> |
|
|
|
</a-menu-item> |
|
|
|
|
|
|
|
|
|
|
|
<a-menu-item |
|
|
|
<a-menu-item key="gallery" class="group !flex !items-center !my-0 nc-create-2-view" @click="onOpenModal(ViewTypes.GALLERY)"> |
|
|
|
key="gallery" |
|
|
|
|
|
|
|
class="group !flex !items-center !-my0 !h-[30px] nc-create-2-view" |
|
|
|
|
|
|
|
@click="onOpenModal(ViewTypes.GALLERY)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<a-tooltip :mouse-enter-delay="1" placement="left"> |
|
|
|
<a-tooltip :mouse-enter-delay="1" placement="left"> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ $t('msg.info.addView.gallery') }} |
|
|
|
{{ $t('msg.info.addView.gallery') }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<div class="text-xs flex items-center h-full w-full gap-2"> |
|
|
|
<div class="nc-project-menu-item text-xs flex items-center h-full w-full gap-2"> |
|
|
|
<component :is="viewIcons[ViewTypes.GALLERY].icon" :style="{ color: viewIcons[ViewTypes.GALLERY].color }" /> |
|
|
|
<component :is="viewIcons[ViewTypes.GALLERY].icon" :style="{ color: viewIcons[ViewTypes.GALLERY].color }" /> |
|
|
|
|
|
|
|
|
|
|
|
<div>{{ $t('objects.viewType.gallery') }}</div> |
|
|
|
<div>{{ $t('objects.viewType.gallery') }}</div> |
|
|
@ -83,7 +75,7 @@ function onOpenModal(type: ViewTypes, title = '') { |
|
|
|
{{ $t('msg.info.addView.form') }} |
|
|
|
{{ $t('msg.info.addView.form') }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<div class="text-xs flex items-center h-full w-full gap-2"> |
|
|
|
<div class="nc-project-menu-item text-xs flex items-center h-full w-full gap-2"> |
|
|
|
<component :is="viewIcons[ViewTypes.FORM].icon" :style="{ color: viewIcons[ViewTypes.FORM].color }" /> |
|
|
|
<component :is="viewIcons[ViewTypes.FORM].icon" :style="{ color: viewIcons[ViewTypes.FORM].color }" /> |
|
|
|
|
|
|
|
|
|
|
|
<div>{{ $t('objects.viewType.form') }}</div> |
|
|
|
<div>{{ $t('objects.viewType.form') }}</div> |
|
|
@ -95,44 +87,7 @@ function onOpenModal(type: ViewTypes, title = '') { |
|
|
|
</a-tooltip> |
|
|
|
</a-tooltip> |
|
|
|
</a-menu-item> |
|
|
|
</a-menu-item> |
|
|
|
|
|
|
|
|
|
|
|
<div class="w-full h-4"></div> |
|
|
|
<div class="w-full h-4" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
|
|
|
todo: bring back later |
|
|
|
|
|
|
|
<general-flipping-card class="my-4 lg:my-6 min-h-[100px]" :triggers="['click', { duration: 15000 }]"> |
|
|
|
|
|
|
|
<template #front> |
|
|
|
|
|
|
|
<div class="flex h-full w-full gap-6 flex-col"> |
|
|
|
|
|
|
|
<general-social /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
|
|
<a |
|
|
|
|
|
|
|
v-t="['e:hiring']" |
|
|
|
|
|
|
|
class="px-4 py-3 rounded border text-xs text-current" |
|
|
|
|
|
|
|
href="https://angel.co/company/nocodb" |
|
|
|
|
|
|
|
target="_blank" |
|
|
|
|
|
|
|
@click.stop |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
🚀 We are Hiring! 🚀 |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template #back> |
|
|
|
|
|
|
|
<!– todo: add project cost –> |
|
|
|
|
|
|
|
<a |
|
|
|
|
|
|
|
href="https://github.com/sponsors/nocodb" |
|
|
|
|
|
|
|
target="_blank" |
|
|
|
|
|
|
|
class="group flex items-center gap-2 w-full mx-3 px-4 py-3 rounded-l border transform translate-x-4 hover:(translate-x-0 shadow-lg !opacity-100) transition duration-150 ease !text-xs text-current" |
|
|
|
|
|
|
|
@click.stop |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<mdi-cards-heart class="text-red-500" /> |
|
|
|
|
|
|
|
{{ $t('activity.sponsorUs') }} |
|
|
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</general-flipping-card> --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<WebhookDrawer v-if="showWebhookDrawer" v-model="showWebhookDrawer" /> |
|
|
|
|
|
|
|
</a-menu> |
|
|
|
</a-menu> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|