From aa0d63fd44f6ddd8576d8d6b861060978bce74aa Mon Sep 17 00:00:00 2001 From: baldo Date: Wed, 24 Aug 2022 23:48:03 +0200 Subject: [PATCH] Show node on map in confirmation before deleting it. --- frontend/package.json | 2 + frontend/src/App.vue | 3 + frontend/src/components/NodeMap.vue | 109 ++++++++++++++++++ .../nodes/NodeDeleteConfirmationForm.vue | 5 +- .../src/components/nodes/NodePreviewCard.vue | 15 +++ frontend/src/scss/_variables.scss | 5 + frontend/src/utils/Api.ts | 4 +- frontend/src/utils/Numbers.ts | 49 +++++++- frontend/yarn.lock | 17 +++ server/shared/types/index.ts | 4 + 10 files changed, 205 insertions(+), 8 deletions(-) create mode 100644 frontend/src/components/NodeMap.vue diff --git a/frontend/package.json b/frontend/package.json index c74621f..b615739 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -17,6 +17,7 @@ }, "dependencies": { "fork-awesome": "^1.2.0", + "leaflet": "^1.8.0", "pinia": "^2.0.20", "sparkson": "^1.3.6", "vue": "^3.2.37", @@ -25,6 +26,7 @@ "devDependencies": { "@rushstack/eslint-patch": "^1.1.4", "@types/jsdom": "^20.0.0", + "@types/leaflet": "^1.7.11", "@types/node": "^18.7.13", "@vitejs/plugin-basic-ssl": "^0.1.2", "@vitejs/plugin-vue": "^3.0.3", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 4c48591..07961ad 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -28,6 +28,9 @@ body { } main { + position: relative; + z-index: 0; + padding-top: $page-padding-top; padding-bottom: $page-padding-bottom; diff --git a/frontend/src/components/NodeMap.vue b/frontend/src/components/NodeMap.vue new file mode 100644 index 0000000..a4952b4 --- /dev/null +++ b/frontend/src/components/NodeMap.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/frontend/src/components/nodes/NodeDeleteConfirmationForm.vue b/frontend/src/components/nodes/NodeDeleteConfirmationForm.vue index 5fa15fc..2262853 100644 --- a/frontend/src/components/nodes/NodeDeleteConfirmationForm.vue +++ b/frontend/src/components/nodes/NodeDeleteConfirmationForm.vue @@ -103,6 +103,9 @@ async function onAbort() { diff --git a/frontend/src/components/nodes/NodePreviewCard.vue b/frontend/src/components/nodes/NodePreviewCard.vue index 246cd33..da0ff58 100644 --- a/frontend/src/components/nodes/NodePreviewCard.vue +++ b/frontend/src/components/nodes/NodePreviewCard.vue @@ -1,6 +1,7 @@