Browse Source

chore(gui-v2): lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3262/head
Pranav C 2 years ago
parent
commit
851fb467cd
  1. 10
      packages/nc-gui-v2/components/smartsheet-toolbar/ViewActions.vue
  2. 7
      packages/nc-gui-v2/components/smartsheet/Toolbar.vue
  3. 1
      packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/LockMenu.vue
  4. 6
      packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/ToggleDrawer.vue
  5. 3
      packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/index.vue
  6. 4
      packages/nc-gui-v2/components/tabs/Smartsheet.vue
  7. 5
      packages/nc-gui-v2/components/virtual-cell/HasMany.vue

10
packages/nc-gui-v2/components/smartsheet-toolbar/ViewActions.vue

@ -147,7 +147,7 @@ async function changeLockType(type: LockType) {
<template #overlay> <template #overlay>
<a-menu class="ml-6 !text-sm !p-0 !rounded"> <a-menu class="ml-6 !text-sm !p-0 !rounded">
<a-menu-item-group> <a-menu-item-group>
<a-sub-menu key="lock-type" v-if="isUIAllowed('view-type')" > <a-sub-menu v-if="isUIAllowed('view-type')" key="lock-type">
<template #title> <template #title>
<div v-t="['c:navdraw:preview-as']" class="nc-project-menu-item group"> <div v-t="['c:navdraw:preview-as']" class="nc-project-menu-item group">
<MdiFileEyeOutline class="group-hover:text-pink-500" /> <MdiFileEyeOutline class="group-hover:text-pink-500" />
@ -200,8 +200,7 @@ async function changeLockType(type: LockType) {
<MdiAccountIcon /> <MdiAccountIcon />
{{ $t('title.personalView') }} {{ $t('title.personalView') }}
<div class="nc-subtitle"> <div class="nc-subtitle">
Only you can edit the view configuration. Other collaborators personal views are hidden by Only you can edit the view configuration. Other collaborators personal views are hidden by default.
default.
</div> </div>
</div> </div>
</div> </div>
@ -268,13 +267,12 @@ async function changeLockType(type: LockType) {
</a-menu-item> </a-menu-item>
</a-sub-menu> </a-sub-menu>
<a-menu-item> <a-menu-item>
<div <div
v-if="isUIAllowed('SharedViewList') && !isView && !isPublicView" v-if="isUIAllowed('SharedViewList') && !isView && !isPublicView"
v-t="['a:actions:shared-view-list']" v-t="['a:actions:shared-view-list']"
@click="sharedViewListDlg = true"
class="py-2 flex gap-2" class="py-2 flex gap-2"
@click="sharedViewListDlg = true"
> >
<MdiViewListOutline class="text-gray-500" /> <MdiViewListOutline class="text-gray-500" />
<!-- Shared View List --> <!-- Shared View List -->
@ -282,7 +280,6 @@ async function changeLockType(type: LockType) {
</div> </div>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
<div <div
v-if="isUIAllowed('webhook') && !isView && !isPublicView" v-if="isUIAllowed('webhook') && !isView && !isPublicView"
v-t="['c:actions:webhook']" v-t="['c:actions:webhook']"
@ -293,7 +290,6 @@ async function changeLockType(type: LockType) {
{{ $t('objects.webhooks') }} {{ $t('objects.webhooks') }}
</div> </div>
</a-menu-item> </a-menu-item>
</a-menu-item-group> </a-menu-item-group>
</a-menu> </a-menu>
</template> </template>

7
packages/nc-gui-v2/components/smartsheet/Toolbar.vue

@ -9,7 +9,6 @@ const { allowCSVDownload } = useSharedView()
const isPublic = inject(IsPublicInj, ref(false)) const isPublic = inject(IsPublicInj, ref(false))
const { isOpen } = useSidebar() const { isOpen } = useSidebar()
</script> </script>
<template> <template>
@ -24,21 +23,15 @@ const {isOpen} =useSidebar()
<SmartsheetToolbarShareView v-if="(isForm || isGrid) && !isPublic" /> <SmartsheetToolbarShareView v-if="(isForm || isGrid) && !isPublic" />
<!-- <SmartsheetToolbarMoreActions v-if="(isGrid && !isPublic) || (isGrid && isPublic && allowCSVDownload)" /> --> <!-- <SmartsheetToolbarMoreActions v-if="(isGrid && !isPublic) || (isGrid && isPublic && allowCSVDownload)" /> -->
<div class="flex-1" /> <div class="flex-1" />
<Reload /> <Reload />
<AddRow /> <AddRow />
<SmartsheetToolbarSearchData v-if="(isGrid || isGallery) && !isPublic" class="shrink mr-2 ml-2" /> <SmartsheetToolbarSearchData v-if="(isGrid || isGallery) && !isPublic" class="shrink mr-2 ml-2" />
<ToggleDrawer class="mr-2" /> <ToggleDrawer class="mr-2" />
</div> </div>
</template> </template>

1
packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/LockMenu.vue

@ -113,5 +113,4 @@ const Icon = computed(() => {
.nc-subtitle { .nc-subtitle {
@apply font-size-sm font-weight-light; @apply font-size-sm font-weight-light;
} }
</style> </style>

6
packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/ToggleDrawer.vue

@ -16,9 +16,7 @@ const { isOpen, toggle } = useSidebar({ storageKey: 'nc-right-sidebar' })
</div> </div>
</a-tooltip> --> </a-tooltip> -->
<a-button @click="toggle(!isOpen)" size="small"> <a-button size="small" @click="toggle(!isOpen)">
<div class="flex items-center gap-2"> <MdiMenu/> Views <div class="flex items-center gap-2"><MdiMenu /> Views</div>
</div>
</a-button> </a-button>
</template> </template>

3
packages/nc-gui-v2/components/smartsheet/sidebar/toolbar/index.vue

@ -59,9 +59,6 @@ const { isOpen } = useSidebar({ storageKey: 'nc-right-sidebar' })
<!-- <div :class="{ 'w-[calc(100%_+_16px)] h-[1px] bg-gray-200 mt-1 -ml-1': !isOpen, 'dot': isOpen }" /> --> <!-- <div :class="{ 'w-[calc(100%_+_16px)] h-[1px] bg-gray-200 mt-1 -ml-1': !isOpen, 'dot': isOpen }" /> -->
<ToggleDrawer /> <ToggleDrawer />
<slot name="end" /> <slot name="end" />

4
packages/nc-gui-v2/components/tabs/Smartsheet.vue

@ -83,15 +83,13 @@ watch(isLocked, (nextValue) => (treeViewIsLockedInj.value = nextValue), { immedi
<SmartsheetForm v-else-if="isForm" /> <SmartsheetForm v-else-if="isForm" />
</div> </div>
<SmartsheetSidebar class="nc-right-sidebar" v-if="meta" /> <SmartsheetSidebar v-if="meta" class="nc-right-sidebar" />
</div> </div>
</template> </template>
</div> </div>
</div> </div>
</template> </template>
<style scoped> <style scoped>
:deep(.nc-right-sidebar.ant-layout-sider-collapsed) { :deep(.nc-right-sidebar.ant-layout-sider-collapsed) {
@apply !w-0 !max-w-0 !min-w-0 overflow-x-hidden; @apply !w-0 !max-w-0 !min-w-0 overflow-x-hidden;

5
packages/nc-gui-v2/components/virtual-cell/HasMany.vue

@ -95,10 +95,7 @@ const unlinkRef = async (rec: Record<string, any>) => {
</span> </span>
</template> </template>
</div> </div>
<div <div v-if="!isLocked && isUIAllowed('xcDatatableEditable')" class="flex-1 flex justify-end gap-1 min-h-[30px] items-center">
v-if="!isLocked && isUIAllowed('xcDatatableEditable')"
class="flex-1 flex justify-end gap-1 min-h-[30px] items-center"
>
<MdiArrowExpand <MdiArrowExpand
class="select-none transform text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-arrow-expand" class="select-none transform text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-arrow-expand"
@click="childListDlg = true" @click="childListDlg = true"

Loading…
Cancel
Save