From 832c4adf8bbc250c06b8990d5a730e4b6bb8ba49 Mon Sep 17 00:00:00 2001 From: flisowna Date: Thu, 29 Dec 2022 13:39:41 +0100 Subject: [PATCH] clean code --- packages/nc-gui/components/cell/GeoData.vue | 13 ++----------- packages/nc-gui/components/smartsheet/Map.vue | 8 -------- .../sidebar/toolbar/GeodataSwitcher.vue | 18 ------------------ .../nc-gui/composables/useMapViewDataStore.ts | 3 --- 4 files changed, 2 insertions(+), 40 deletions(-) diff --git a/packages/nc-gui/components/cell/GeoData.vue b/packages/nc-gui/components/cell/GeoData.vue index fa25aa61c6..8f85e8a577 100644 --- a/packages/nc-gui/components/cell/GeoData.vue +++ b/packages/nc-gui/components/cell/GeoData.vue @@ -3,7 +3,6 @@ import type { GeoLocationType } from 'nocodb-sdk' import { useVModel } from '#imports' interface Props { - // modelValue?: GeoLocationType | null modelValue?: string | null } @@ -15,14 +14,8 @@ const props = defineProps() const emits = defineEmits() -// const editEnabled = inject(EditModeInj) - -// const isForm = inject(IsFormInj, ref(false)) - const vModel = useVModel(props, 'modelValue', emits) -// const localValueState = ref() - let error = $ref() let isExpanded = $ref(false) @@ -36,7 +29,6 @@ const latLongStr = computed(() => { return latitude && longitude ? `${latitude}; ${longitude}` : 'Set location' }) - const formState = reactive({ latitude, longitude, @@ -54,7 +46,6 @@ const clear = () => { formState.latitude = latitude formState.longitude = longitude - console.log(`clear - formState: `, formState) } const onGetCurrentLocation = () => { @@ -92,8 +83,8 @@ const onGetCurrentLocation = () => { - - Your Location + + Your Location Cancel diff --git a/packages/nc-gui/components/smartsheet/Map.vue b/packages/nc-gui/components/smartsheet/Map.vue index 3fb58fef98..5a08c5cb98 100644 --- a/packages/nc-gui/components/smartsheet/Map.vue +++ b/packages/nc-gui/components/smartsheet/Map.vue @@ -135,14 +135,6 @@ onMounted(async () => { localStorage.setItem(getMapCenterLocalStorageKey(mapMetaData?.value?.fk_view_id), JSON.stringify(myMap.getCenter())) } }) - // myMap.on('contextmenu', async function (e) { - // // const newRow = await addEmptyRow() - // const lat = e.latlng.lat - // const lng = e.latlng.lng - // addMarker(lat, lng, newRow) - // expandForm(newRow) - // // submitForm() - // }) }) reloadViewMetaHook?.on(async () => { diff --git a/packages/nc-gui/components/smartsheet/sidebar/toolbar/GeodataSwitcher.vue b/packages/nc-gui/components/smartsheet/sidebar/toolbar/GeodataSwitcher.vue index 6de566974c..3525884dc5 100644 --- a/packages/nc-gui/components/smartsheet/sidebar/toolbar/GeodataSwitcher.vue +++ b/packages/nc-gui/components/smartsheet/sidebar/toolbar/GeodataSwitcher.vue @@ -1,24 +1,7 @@ diff --git a/packages/nc-gui/composables/useMapViewDataStore.ts b/packages/nc-gui/composables/useMapViewDataStore.ts index 4ae40fba56..08e0ff82c9 100644 --- a/packages/nc-gui/composables/useMapViewDataStore.ts +++ b/packages/nc-gui/composables/useMapViewDataStore.ts @@ -6,8 +6,6 @@ import type { Row } from '~/lib' export const geodataToggleState = reactive({ show: false }) -// const { project, isSharedBase } = useProject() - const formatData = (list: Row[]) => list.map((row) => ({ row: { ...row }, @@ -38,7 +36,6 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState( const paginationData = ref({ page: 1, pageSize: appInfoDefaultLimit }) const queryParams = computed(() => ({ - // offset: ((paginationData.value.page ?? 0) - 1) * (paginationData.value.pageSize ?? appInfoDefaultLimit), limit: paginationData.value.pageSize ?? appInfoDefaultLimit, where: where?.value ?? '', }))