clean up settings and debug screens

This commit is contained in:
Paul Miller
2023-06-07 14:31:46 -05:00
parent 03f5ab667e
commit 3eba44f8c7
16 changed files with 369 additions and 276 deletions

View File

@@ -1,21 +1,34 @@
import { Button, Card, NiceP, VStack } from "~/components/layout";
import { createSignal } from "solid-js";
import { Button, InnerCard, NiceP, VStack } from "~/components/layout";
import { useMegaStore } from "~/state/megaStore";
export function Restart() {
const [state, _] = useMegaStore();
const [hasStopped, setHasStopped] = createSignal(false);
async function handleStop() {
await state.mutiny_wallet?.stop();
async function toggle() {
if (hasStopped()) {
await state.mutiny_wallet?.start();
setHasStopped(false);
} else {
await state.mutiny_wallet?.stop();
setHasStopped(true);
}
}
return (
<Card>
<InnerCard>
<VStack>
<NiceP>
Something *extra* screwy going on? Stop the nodes!
</NiceP>
<Button onClick={handleStop}>Stop</Button>
<Button
intent={hasStopped() ? "green" : "red"}
onClick={toggle}
>
{hasStopped() ? "Start" : "Stop"}
</Button>
</VStack>
</Card>
</InnerCard>
);
}