From d24b276115d06366cf2186a780bdb817d0f10c67 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Mon, 19 Jun 2023 15:04:31 -0500 Subject: [PATCH] add beta warning --- src/components/App.tsx | 2 + src/components/BetaWarningModal.tsx | 71 +++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 src/components/BetaWarningModal.tsx diff --git a/src/components/App.tsx b/src/components/App.tsx index 01a7174..9e887ec 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -10,6 +10,7 @@ import userClock from "~/assets/icons/user-clock.svg"; import { useMegaStore } from "~/state/megaStore"; import { Show } from "solid-js"; import { ExternalLink } from "./layout/ExternalLink"; +import { BetaWarningModal } from "~/components/BetaWarningModal"; export default function App() { const [state, _actions] = useMegaStore(); @@ -60,6 +61,7 @@ export default function App() {

+ ); diff --git a/src/components/BetaWarningModal.tsx b/src/components/BetaWarningModal.tsx new file mode 100644 index 0000000..23dbf6a --- /dev/null +++ b/src/components/BetaWarningModal.tsx @@ -0,0 +1,71 @@ +import { Dialog } from "@kobalte/core"; +import { ParentComponent, createSignal } from "solid-js"; +import { DIALOG_CONTENT, DIALOG_POSITIONER, OVERLAY } from "./DetailsModal"; +import { ModalCloseButton, SmallHeader } from "./layout"; +import { ExternalLink } from "./layout/ExternalLink"; + +export function BetaWarningModal() { + return ( + +

+ We're so glad you're here. But we do want to warn you: Mutiny + Wallet is in beta, and there are still bugs and rough edges. +

+

+ For instance, Mutiny currently doesn't have seed restore + functionality or an easy way to do lightning backups. +

+

+ Please be careful and don't put more money into Mutiny than + you're willing to lose. +

+

+ + Learn more about the beta + +

+

+ If you want to use pretend money to test out Mutiny without + risk,{" "} + + check out our Signet version. + +

+
+ ); +} + +export const WarningModal: ParentComponent<{ + linkText: string; + title: string; +}> = (props) => { + const [open, setOpen] = createSignal( + localStorage.getItem("betaWarned") !== "true" + ); + + function close() { + localStorage.setItem("betaWarned", "true"); + setOpen(false); + } + + return ( + + + +
+ + + {props.title} + + + + + +
{props.children}
+
+
+
+
+
+ ); +};