From ac6fb7b57aa490771c2b140224e03e5e0accbd9b Mon Sep 17 00:00:00 2001 From: baldo Date: Fri, 26 Aug 2022 19:08:31 +0200 Subject: [PATCH] Add checkbox for monitoring when creating node. --- frontend/src/components/BaseCard.vue | 95 ++++++++++++ frontend/src/components/ErrorCard.vue | 53 ++----- frontend/src/components/InfoCard.vue | 16 +++ .../src/components/form/CheckboxInput.vue | 135 ++++++++++++++++++ .../components/form/ValidationFormInput.vue | 4 +- .../src/components/nodes/NodeCreateForm.vue | 66 ++++++++- frontend/src/scss/_variables.scss | 27 ++-- 7 files changed, 338 insertions(+), 58 deletions(-) create mode 100644 frontend/src/components/BaseCard.vue create mode 100644 frontend/src/components/InfoCard.vue create mode 100644 frontend/src/components/form/CheckboxInput.vue diff --git a/frontend/src/components/BaseCard.vue b/frontend/src/components/BaseCard.vue new file mode 100644 index 0000000..8708dad --- /dev/null +++ b/frontend/src/components/BaseCard.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/frontend/src/components/ErrorCard.vue b/frontend/src/components/ErrorCard.vue index 967a63e..e752ca4 100644 --- a/frontend/src/components/ErrorCard.vue +++ b/frontend/src/components/ErrorCard.vue @@ -1,49 +1,16 @@ - + diff --git a/frontend/src/components/InfoCard.vue b/frontend/src/components/InfoCard.vue new file mode 100644 index 0000000..b1babe5 --- /dev/null +++ b/frontend/src/components/InfoCard.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/frontend/src/components/form/CheckboxInput.vue b/frontend/src/components/form/CheckboxInput.vue new file mode 100644 index 0000000..ec83cd3 --- /dev/null +++ b/frontend/src/components/form/CheckboxInput.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/frontend/src/components/form/ValidationFormInput.vue b/frontend/src/components/form/ValidationFormInput.vue index d6a9e44..504d778 100644 --- a/frontend/src/components/form/ValidationFormInput.vue +++ b/frontend/src/components/form/ValidationFormInput.vue @@ -3,11 +3,13 @@ import { computed, getCurrentInstance, onMounted, ref } from "vue"; import { type Constraint, forConstraint } from "@/shared/validation/validator"; import ExpandableHelpBox from "@/components/ExpandableHelpBox.vue"; +type InputType = "text" | "number" | "password" | "email" | "tel" | "url"; + interface Props { name: string; modelValue?: string; label?: string; - type?: string; + type?: InputType; placeholder: string; constraint: Constraint; validationError: string; diff --git a/frontend/src/components/nodes/NodeCreateForm.vue b/frontend/src/components/nodes/NodeCreateForm.vue index e8d0f6d..b7295d0 100644 --- a/frontend/src/components/nodes/NodeCreateForm.vue +++ b/frontend/src/components/nodes/NodeCreateForm.vue @@ -27,6 +27,8 @@ import { route, RouteName } from "@/router"; import RouteButton from "@/components/form/RouteButton.vue"; import { ApiError } from "@/utils/Api"; import NodeCoordinatesInput from "@/components/nodes/NodeCoordinatesInput.vue"; +import CheckboxInput from "@/components/form/CheckboxInput.vue"; +import InfoCard from "@/components/InfoCard.vue"; const configStore = useConfigStore(); const nodeStore = useNodeStore(); @@ -211,8 +213,57 @@ async function onSubmit() { /> -
-

TODO: Monitoring

+
+

Möchtest Du automatisiert Status-E-Mails bekommen?

+ +