Browse Source

WIP info button on toolbar about record limits in map view

pull/4723/head
flisowna 2 years ago
parent
commit
38eb7b0475
  1. 4
      packages/nc-gui/assets/style.scss
  2. 2
      packages/nc-gui/components/smartsheet/Toolbar.vue
  3. 2
      packages/nc-gui/composables/useMapViewDataStore.ts
  4. 3
      packages/nc-gui/composables/useSmartsheetStore.ts

4
packages/nc-gui/assets/style.scss

@ -283,6 +283,10 @@ a {
@apply !shadow-none rounded hover:(ring-1 ring-primary ring-opacity-100) focus:(ring-1 ring-accent ring-opacity-100);
}
.nc-warning-info {
@apply !shadow-none rounded ring-1 ring-red-600
}
.ant-modal {
@apply !top-[50px];
}

2
packages/nc-gui/components/smartsheet/Toolbar.vue

@ -37,6 +37,8 @@ const { allowCSVDownload } = useSharedView()
<LazySmartsheetToolbarSortListMenu v-if="isGrid || isGallery || isKanban" />
<LazySmartsheetToolbarMapRowsLimits v-if="isMap" />
<LazySmartsheetToolbarShareView v-if="(isForm || isGrid || isKanban || isGallery) && !isPublic" />
<LazySmartsheetToolbarExport v-if="(!isPublic && !isUIAllowed('dataInsert')) || (isPublic && allowCSVDownload)" />

2
packages/nc-gui/composables/useMapViewDataStore.ts

@ -15,7 +15,7 @@ const formatData = (list: Row[]) =>
const { appInfo } = $(useGlobal())
const appInfoDefaultLimit = 100
const appInfoDefaultLimit = 1000
const paginationData = ref<PaginatedType>({ page: 1, pageSize: appInfoDefaultLimit })
const [useProvideMapViewStore, useMapViewStore] = useInjectionState(

3
packages/nc-gui/composables/useSmartsheetStore.ts

@ -12,6 +12,7 @@ const [useProvideSmartsheetStore, useSmartsheetStore] = useInjectionState(
initialSorts?: Ref<SortType[]>,
initialFilters?: Ref<FilterType[]>,
) => {
const paginatedData = inject(PaginationDataInj)!
const { $api } = useNuxtApp()
const { sqlUis } = useProject()
@ -24,6 +25,7 @@ const [useProvideSmartsheetStore, useSmartsheetStore] = useInjectionState(
const eventBus = useEventBus<SmartsheetStoreEvents>(Symbol('SmartsheetStore'))
// getters
const count = computed(() => paginatedData.value?.totalRows ?? Infinity)
const isLocked = computed(() => view.value?.lock_type === 'locked')
const isPkAvail = computed(() => (meta.value as TableType)?.columns?.some((c) => c.pk))
const isGrid = computed(() => view.value?.type === ViewTypes.GRID)
@ -53,6 +55,7 @@ const [useProvideSmartsheetStore, useSmartsheetStore] = useInjectionState(
const nestedFilters = ref<FilterType[]>(unref(initialFilters) ?? [])
return {
count,
view,
meta,
isLocked,

Loading…
Cancel
Save