From 1a98913639a251260be17cb7a20f4a75e0ebd31c Mon Sep 17 00:00:00 2001 From: oliviareichl <122532494+oliviareichl@users.noreply.github.com> Date: Wed, 25 Sep 2024 12:52:12 +0200 Subject: [PATCH] Feat/detail view (#8) implement a first version of the detail view, which displays all data of the work + implement an sheet overlay for places with a map display. --- components/map-sidebar.vue | 49 ++ components/map.client.vue | 107 ++++ components/map.context.ts | 7 + components/search-data-table/data-table.vue | 99 +++- components/ui/accordion/AccordionContent.vue | 2 +- components/ui/accordion/AccordionTrigger.vue | 4 +- components/ui/sheet/Sheet.vue | 19 + components/ui/sheet/SheetClose.vue | 11 + components/ui/sheet/SheetContent.vue | 70 +++ components/ui/sheet/SheetDescription.vue | 23 + components/ui/sheet/SheetFooter.vue | 13 + components/ui/sheet/SheetHeader.vue | 13 + components/ui/sheet/SheetTitle.vue | 23 + components/ui/sheet/SheetTrigger.vue | 11 + components/ui/sheet/index.ts | 31 + components/ui/tooltip/Tooltip.vue | 19 + components/ui/tooltip/TooltipContent.vue | 49 ++ components/ui/tooltip/TooltipProvider.vue | 11 + components/ui/tooltip/TooltipTrigger.vue | 11 + components/ui/tooltip/index.ts | 4 + composables/use-get-work.ts | 16 + config/map.config.ts | 6 + package.json | 1 + pages/work/[id].vue | 577 +++++++++++++++++++ pnpm-lock.yaml | 436 +++++++++++++- scripts/generate-api-client.ts | 2 +- types/api.ts | 1 + utils/get-work-icon.ts | 75 +++ 28 files changed, 1657 insertions(+), 33 deletions(-) create mode 100644 components/map-sidebar.vue create mode 100644 components/map.client.vue create mode 100644 components/map.context.ts create mode 100644 components/ui/sheet/Sheet.vue create mode 100644 components/ui/sheet/SheetClose.vue create mode 100644 components/ui/sheet/SheetContent.vue create mode 100644 components/ui/sheet/SheetDescription.vue create mode 100644 components/ui/sheet/SheetFooter.vue create mode 100644 components/ui/sheet/SheetHeader.vue create mode 100644 components/ui/sheet/SheetTitle.vue create mode 100644 components/ui/sheet/SheetTrigger.vue create mode 100644 components/ui/sheet/index.ts create mode 100644 components/ui/tooltip/Tooltip.vue create mode 100644 components/ui/tooltip/TooltipContent.vue create mode 100644 components/ui/tooltip/TooltipProvider.vue create mode 100644 components/ui/tooltip/TooltipTrigger.vue create mode 100644 components/ui/tooltip/index.ts create mode 100644 composables/use-get-work.ts create mode 100644 config/map.config.ts create mode 100644 pages/work/[id].vue create mode 100644 utils/get-work-icon.ts diff --git a/components/map-sidebar.vue b/components/map-sidebar.vue new file mode 100644 index 0000000..b10388c --- /dev/null +++ b/components/map-sidebar.vue @@ -0,0 +1,49 @@ + + + diff --git a/components/map.client.vue b/components/map.client.vue new file mode 100644 index 0000000..9866b52 --- /dev/null +++ b/components/map.client.vue @@ -0,0 +1,107 @@ + + + diff --git a/components/map.context.ts b/components/map.context.ts new file mode 100644 index 0000000..c49a7d7 --- /dev/null +++ b/components/map.context.ts @@ -0,0 +1,7 @@ +import type { Map as GeoMap } from "maplibre-gl"; + +export interface GeoMapContext { + map: GeoMap | null; +} + +export const geoMapContextKey = Symbol("geo-map-context"); diff --git a/components/search-data-table/data-table.vue b/components/search-data-table/data-table.vue index 64106fd..3b22895 100644 --- a/components/search-data-table/data-table.vue +++ b/components/search-data-table/data-table.vue @@ -1,6 +1,12 @@