From 2df72c2eab37abd9e47a149e513e860f5afc7f29 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Fri, 15 Sep 2023 14:27:56 -0500 Subject: [PATCH] remove contact from form for now --- src/i18n/en/translations.ts | 8 ++- src/routes/Feedback.tsx | 125 +----------------------------------- 2 files changed, 6 insertions(+), 127 deletions(-) diff --git a/src/i18n/en/translations.ts b/src/i18n/en/translations.ts index bb58c04..3464089 100644 --- a/src/i18n/en/translations.ts +++ b/src/i18n/en/translations.ts @@ -121,8 +121,8 @@ export default { more: "Got more to say?", tracking: "Mutiny doesn't track or spy on your behavior, so your feedback is incredibly helpful.", - github: "If you're comfortable with GitHub you can also", - create_issue: "create an issue.", + github: "If you'd like support please", + create_issue: "create a GitHub issue.", link: "Feedback?", feedback_placeholder: "Bugs, feature requests, feedback, etc.", info_label: "Include contact info", @@ -279,7 +279,9 @@ export default { title: "Pending Requests", configure_link: "Configure", approve_all: "Approve All" - } + }, + careful: + "Be careful where you share this connection! Requests within budget will paid automatically." }, emergency_kit: { title: "Emergency Kit", diff --git a/src/routes/Feedback.tsx b/src/routes/Feedback.tsx index c83c353..7a781be 100644 --- a/src/routes/Feedback.tsx +++ b/src/routes/Feedback.tsx @@ -1,11 +1,4 @@ -import { - createForm, - email, - getValue, - required, - setValue, - SubmitHandler -} from "@modular-forms/solid"; +import { createForm, required, SubmitHandler } from "@modular-forms/solid"; import { createSignal, Match, Show, Switch } from "solid-js"; import { A, useLocation } from "solid-start"; @@ -15,12 +8,10 @@ import { BackPop, Button, ButtonLink, - Checkbox, DefaultMain, LargeHeader, NiceP, SafeArea, - StyledRadioGroup, TextField, VStack } from "~/components/layout"; @@ -69,25 +60,6 @@ async function formDataFromFeedbackForm(f: FeedbackForm) { formData.append("contact", JSON.stringify(contact)); } - // TODO: add back logs and image uploads - - // if (f.include_logs) { - // const logs = await MutinyWallet.get_logs(); - - // console.log(logs); - - // // create a blob - // const blob = new Blob([logs], { type: "text/plain" }); - // // add it to the form data - // formData.append("log", blob); - // } - - // if (f.images.length > 0) { - // for (const image of f.images) { - // formData.append("image", image); - // } - // } - if (f.include_contact) { const contact = f.user_type === "nostr" @@ -106,19 +78,6 @@ function FeedbackForm(props: { onSubmitted: () => void }) { const [loading, setLoading] = createSignal(false); const [error, setError] = createSignal(); - const COMMUNICATION_METHODS = [ - { - value: "nostr", - label: i18n.t("feedback.nostr"), - caption: i18n.t("feedback.nostr_caption") - }, - { - value: "email", - label: i18n.t("feedback.email"), - caption: i18n.t("feedback.email_caption") - } - ]; - const [feedbackForm, { Form, Field }] = createForm({ initialValues: { user_type: "nostr", @@ -185,88 +144,6 @@ function FeedbackForm(props: { onSubmitted: () => void }) { /> )} - - {(field, _props) => ( - - setValue(feedbackForm, "include_contact", c) - } - /> - )} - - - - {(field, _props) => ( - // TODO: there's probably a "real" way to do this with modular-forms - - setValue( - feedbackForm, - "user_type", - newValue as "nostr" | "email" - ) - } - choices={COMMUNICATION_METHODS} - /> - )} - - - - - {(field, props) => ( - - )} - - - - - {(field, props) => ( - - )} - - - - {error()?.message}