From 85704f17a012764134cedf0a8164dc1e0e8cf37f Mon Sep 17 00:00:00 2001 From: Candid Dauth Date: Fri, 12 Apr 2024 23:35:46 +0200 Subject: [PATCH] Show compact checkbox fields on small screens --- .../src/lib/components/edit-line-dialog.vue | 31 +++++++++---- .../src/lib/components/edit-marker-dialog.vue | 31 +++++++++---- .../edit-type-dialog/edit-type-dialog.vue | 2 +- .../edit-type-dropdown-dialog.vue | 2 +- .../src/lib/components/ui/field-input.vue | 43 +++++++++++++------ 5 files changed, 75 insertions(+), 34 deletions(-) diff --git a/frontend/src/lib/components/edit-line-dialog.vue b/frontend/src/lib/components/edit-line-dialog.vue index afbbd055..5f411ec0 100644 --- a/frontend/src/lib/components/edit-line-dialog.vue +++ b/frontend/src/lib/components/edit-line-dialog.vue @@ -15,6 +15,7 @@ import ValidatedField from "./ui/validated-form/validated-field.vue"; import StrokePicker from "./ui/stroke-picker.vue"; import { useI18n } from "../utils/i18n"; + import { useMaxBreakpoint } from "../utils/bootstrap"; const context = injectContextRequired(); const client = requireClientContext(context); @@ -43,6 +44,8 @@ const resolvedCanControl = computed(() => canControl(client.value.types[line.value.typeId])); + const isXs = useMaxBreakpoint("xs"); + watch(originalLine, (newLine, oldLine) => { if (!newLine) { modalRef.value?.modal.hide(); @@ -136,16 +139,26 @@ diff --git a/frontend/src/lib/components/edit-marker-dialog.vue b/frontend/src/lib/components/edit-marker-dialog.vue index e1a17931..8920047e 100644 --- a/frontend/src/lib/components/edit-marker-dialog.vue +++ b/frontend/src/lib/components/edit-marker-dialog.vue @@ -15,6 +15,7 @@ import { injectContextRequired, requireClientContext } from "./facil-map-context-provider/facil-map-context-provider.vue"; import ValidatedField from "./ui/validated-form/validated-field.vue"; import { useI18n } from "../utils/i18n"; + import { useMaxBreakpoint } from "../utils/bootstrap"; const context = injectContextRequired(); const client = requireClientContext(context); @@ -42,6 +43,8 @@ const resolvedCanControl = computed(() => canControl(client.value.types[marker.value.typeId])); + const isXs = useMaxBreakpoint("xs"); + watch(originalMarker, (newMarker, oldMarker) => { if (!newMarker) { modalRef.value?.modal.hide(); @@ -134,16 +137,26 @@ diff --git a/frontend/src/lib/components/edit-type-dialog/edit-type-dialog.vue b/frontend/src/lib/components/edit-type-dialog/edit-type-dialog.vue index 51b4e611..8a05591a 100644 --- a/frontend/src/lib/components/edit-type-dialog/edit-type-dialog.vue +++ b/frontend/src/lib/components/edit-type-dialog/edit-type-dialog.vue @@ -459,7 +459,7 @@ - + diff --git a/frontend/src/lib/components/edit-type-dialog/edit-type-dropdown-dialog.vue b/frontend/src/lib/components/edit-type-dialog/edit-type-dropdown-dialog.vue index 61444cec..eed287c8 100644 --- a/frontend/src/lib/components/edit-type-dialog/edit-type-dropdown-dialog.vue +++ b/frontend/src/lib/components/edit-type-dialog/edit-type-dropdown-dialog.vue @@ -282,7 +282,7 @@ >