Browse Source

chore(gui-v2): lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2860/head
Pranav C 2 years ago
parent
commit
854a731273
  1. 13
      packages/nc-gui-v2/components/smartsheet-toolbar/SearchData.vue
  2. 8
      packages/nc-gui-v2/components/smartsheet-toolbar/ShareView.vue
  3. 6
      packages/nc-gui-v2/components/smartsheet/Toolbar.vue
  4. 16
      packages/nc-gui-v2/composables/useViewFilters.ts

13
packages/nc-gui-v2/components/smartsheet-toolbar/SearchData.vue

@ -13,7 +13,6 @@ const columns = computed(() =>
label: c.title,
})),
)
</script>
<template>
@ -26,9 +25,15 @@ const columns = computed(() =>
>
<template #addonBefore @click="isDropdownOpen = true">
<div class="flex align-center relative">
<MdiSearchIcon class="text-grey"/>
<MdiMenuDownIcon class="text-grey"/>
<a-select size="small" :dropdownMatchSelectWidth="false" v-model:value="search.field" :options="columns" class="!absolute top-0 left-0 w-full h-full z-10 !text-xs opacity-0">
<MdiSearchIcon class="text-grey" />
<MdiMenuDownIcon class="text-grey" />
<a-select
v-model:value="search.field"
size="small"
:dropdown-match-select-width="false"
:options="columns"
class="!absolute top-0 left-0 w-full h-full z-10 !text-xs opacity-0"
>
</a-select>
</div>
</template>

8
packages/nc-gui-v2/components/smartsheet-toolbar/ShareView.vue

@ -110,7 +110,13 @@ const copyLink = () => {
</a-button>
<!-- This view is shared via a private link -->
<a-modal v-model:visible="showShareModel" size="small" :title="$t('msg.info.privateLink')" :footer="null" width="min(100vw,640px)">
<a-modal
v-model:visible="showShareModel"
size="small"
:title="$t('msg.info.privateLink')"
:footer="null"
width="min(100vw,640px)"
>
<div class="share-link-box nc-share-link-box bg-primary-50">
<div class="flex-1 h-min text-xs">{{ sharedViewUrl }}</div>
<!-- <v-spacer /> -->

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

@ -13,7 +13,7 @@
<SmartsheetToolbarMoreActions />
<div class="flex-1" />
<!-- <SmartsheetToolbarLockMenu />
<!-- <SmartsheetToolbarLockMenu />
<div class="dot" />
<SmartsheetToolbarReload />
<div class="dot" />
@ -29,10 +29,8 @@
<style scoped>
:deep(.nc-toolbar-btn) {
@apply border-0 !text-xs font-semibold px-2;
}/*
} /*
.dot {
@apply w-[3px] h-[3px] bg-gray-300 mx-1 rounded-full;
}*/
</style>

16
packages/nc-gui-v2/composables/useViewFilters.ts

@ -1,6 +1,6 @@
import type {FilterType, GalleryType, GridType, KanbanType} from 'nocodb-sdk'
import type {ComputedRef, Ref} from 'vue'
import {useNuxtApp} from '#imports'
import type { FilterType, GalleryType, GridType, KanbanType } from 'nocodb-sdk'
import type { ComputedRef, Ref } from 'vue'
import { useNuxtApp } from '#imports'
import useUIPermission from '~/composables/useUIPermission'
export function useViewFilters(
@ -8,14 +8,13 @@ export function useViewFilters(
parentId?: string,
autoApply?: ComputedRef<boolean>,
reloadData?: () => void,
shared = false
shared = false,
) {
// todo: update swagger
const filters = ref<(FilterType & { status?: 'update' | 'delete' | 'create'; parentId?: string })[]>([])
const {$api} = useNuxtApp()
const {isUIAllowed} = useUIPermission()
const { $api } = useNuxtApp()
const { isUIAllowed } = useUIPermission()
const loadFilters = async () => {
if (parentId) {
@ -45,7 +44,6 @@ export function useViewFilters(
}
const deleteFilter = async (filter: FilterType & { status: string }, i: number) => {
if (shared || !isUIAllowed('filterSync')) {
const _filters = unref(filters.value)
_filters.splice(i, 1)
@ -104,5 +102,5 @@ export function useViewFilters(
await saveOrUpdate(filters.value[index], index, true)
}
return {filters, loadFilters, sync, deleteFilter, saveOrUpdate, addFilter, addFilterGroup}
return { filters, loadFilters, sync, deleteFilter, saveOrUpdate, addFilter, addFilterGroup }
}

Loading…
Cancel
Save