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

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

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

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

@ -113,5 +113,4 @@ const Icon = computed(() => {
.nc-subtitle {
@apply font-size-sm font-weight-light;
}
</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>
</a-tooltip> -->
<a-button @click="toggle(!isOpen)" size="small">
<div class="flex items-center gap-2"> <MdiMenu/> Views
</div>
<a-button size="small" @click="toggle(!isOpen)">
<div class="flex items-center gap-2"><MdiMenu /> Views</div>
</a-button>
</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 }" /> -->
<ToggleDrawer />
<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" />
</div>
<SmartsheetSidebar class="nc-right-sidebar" v-if="meta" />
<SmartsheetSidebar v-if="meta" class="nc-right-sidebar" />
</div>
</template>
</div>
</div>
</template>
<style scoped>
:deep(.nc-right-sidebar.ant-layout-sider-collapsed) {
@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>
</template>
</div>
<div
v-if="!isLocked && isUIAllowed('xcDatatableEditable')"
class="flex-1 flex justify-end gap-1 min-h-[30px] items-center"
>
<div v-if="!isLocked && isUIAllowed('xcDatatableEditable')" class="flex-1 flex justify-end gap-1 min-h-[30px] items-center">
<MdiArrowExpand
class="select-none transform text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-arrow-expand"
@click="childListDlg = true"

Loading…
Cancel
Save