mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-18 14:54:26 +01:00
add beta warning
This commit is contained in:
@@ -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() {
|
||||
</span>
|
||||
</p>
|
||||
</DefaultMain>
|
||||
<BetaWarningModal />
|
||||
<NavBar activeTab="home" />
|
||||
</SafeArea>
|
||||
);
|
||||
|
||||
71
src/components/BetaWarningModal.tsx
Normal file
71
src/components/BetaWarningModal.tsx
Normal file
@@ -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 (
|
||||
<WarningModal title="Warning: beta software" linkText="Why?">
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
For instance, Mutiny currently doesn't have seed restore
|
||||
functionality or an easy way to do lightning backups.
|
||||
</p>
|
||||
<p>
|
||||
Please be careful and don't put more money into Mutiny than
|
||||
you're willing to lose.
|
||||
</p>
|
||||
<p>
|
||||
<ExternalLink href="https://github.com/MutinyWallet/mutiny-web/wiki/Mutiny-Beta-Readme">
|
||||
Learn more about the beta
|
||||
</ExternalLink>
|
||||
</p>
|
||||
<p class="small text-neutral-400">
|
||||
If you want to use pretend money to test out Mutiny without
|
||||
risk,{" "}
|
||||
<ExternalLink href="https://blog.mutinywallet.com/mutiny-wallet-signet-release/">
|
||||
check out our Signet version.
|
||||
</ExternalLink>
|
||||
</p>
|
||||
</WarningModal>
|
||||
);
|
||||
}
|
||||
|
||||
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 (
|
||||
<Dialog.Root open={open()} onOpenChange={close}>
|
||||
<Dialog.Portal>
|
||||
<Dialog.Overlay class={OVERLAY} />
|
||||
<div class={DIALOG_POSITIONER}>
|
||||
<Dialog.Content class={DIALOG_CONTENT}>
|
||||
<Dialog.Title class="flex justify-between mb-2 items-center">
|
||||
<SmallHeader>{props.title}</SmallHeader>
|
||||
<Dialog.CloseButton>
|
||||
<ModalCloseButton />
|
||||
</Dialog.CloseButton>
|
||||
</Dialog.Title>
|
||||
<Dialog.Description class="flex flex-col gap-4">
|
||||
<div>{props.children}</div>
|
||||
</Dialog.Description>
|
||||
</Dialog.Content>
|
||||
</div>
|
||||
</Dialog.Portal>
|
||||
</Dialog.Root>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user