From aeb4bc650ae5a305356b32c2ac2a4337c64832b0 Mon Sep 17 00:00:00 2001 From: Candid Dauth Date: Tue, 5 Mar 2024 04:46:04 +0100 Subject: [PATCH] Replace export links with export dialog --- frontend/src/lib/components/export-dialog.vue | 213 ++++++++++++++++++ .../toolbox/toolbox-tools-dropdown.vue | 61 +---- .../components/ui/copy-to-clipboard-input.vue | 4 +- .../src/lib/components/ui/help-popover.vue | 17 ++ frontend/src/lib/utils/vue.ts | 7 +- 5 files changed, 251 insertions(+), 51 deletions(-) create mode 100644 frontend/src/lib/components/export-dialog.vue create mode 100644 frontend/src/lib/components/ui/help-popover.vue diff --git a/frontend/src/lib/components/export-dialog.vue b/frontend/src/lib/components/export-dialog.vue new file mode 100644 index 00000000..f36fd59e --- /dev/null +++ b/frontend/src/lib/components/export-dialog.vue @@ -0,0 +1,213 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/lib/components/toolbox/toolbox-tools-dropdown.vue b/frontend/src/lib/components/toolbox/toolbox-tools-dropdown.vue index 4f80547f..9fc01a08 100644 --- a/frontend/src/lib/components/toolbox/toolbox-tools-dropdown.vue +++ b/frontend/src/lib/components/toolbox/toolbox-tools-dropdown.vue @@ -3,14 +3,13 @@ import EditFilterDialog from "../edit-filter-dialog.vue"; import HistoryDialog from "../history-dialog/history-dialog.vue"; import ShareDialog from "../share-dialog.vue"; - import { computed, ref, toRef } from "vue"; - import vTooltip from "../../utils/tooltip"; + import { ref, toRef } from "vue"; import DropdownMenu from "../ui/dropdown-menu.vue"; - import { injectContextRequired, requireClientContext, requireMapContext } from "../facil-map-context-provider/facil-map-context-provider.vue"; + import { injectContextRequired, requireClientContext } from "../facil-map-context-provider/facil-map-context-provider.vue"; + import ExportDialog from "../export-dialog.vue"; const context = injectContextRequired(); const client = requireClientContext(context); - const mapContext = requireMapContext(context); const importTabContext = toRef(() => context.components.importTab); const props = defineProps<{ @@ -24,21 +23,10 @@ const dialog = ref< | "edit-pad" | "share" + | "export" | "edit-filter" | "history" >(); - - const filterQuery = computed(() => { - const v = mapContext.value; - if (v.filter) { - return { - q: `?filter=${encodeURIComponent(v.filter)}`, - a: `&filter=${encodeURIComponent(v.filter)}` - }; - } else { - return { q: "", a: "" }; - } - }); - +