wallet-core/packages/anastasis-webui/src/pages/home/StartScreen.tsx

48 lines
1.4 KiB
TypeScript
Raw Normal View History

2021-10-19 15:56:52 +02:00
import { h, VNode } from "preact";
2021-10-22 06:31:46 +02:00
import { useAnastasisContext } from "../../context/anastasis";
2021-10-19 15:56:52 +02:00
import { AnastasisClientFrame } from "./index";
2021-10-22 06:31:46 +02:00
export function StartScreen(): VNode {
2021-11-10 14:20:52 +01:00
const reducer = useAnastasisContext();
2021-10-22 06:31:46 +02:00
if (!reducer) {
2021-11-10 14:20:52 +01:00
return <div>no reducer in context</div>;
2021-10-22 06:31:46 +02:00
}
2021-10-19 15:56:52 +02:00
return (
<AnastasisClientFrame hideNav title="Home">
<div class="columns">
<div class="column" />
<div class="column is-four-fifths">
<div class="buttons">
2021-11-10 14:20:52 +01:00
<button
class="button is-success"
autoFocus
onClick={() => reducer.startBackup()}
>
<div class="icon">
<i class="mdi mdi-arrow-up" />
</div>
<span>Backup a secret</span>
</button>
2021-10-22 06:31:46 +02:00
2021-11-10 14:20:52 +01:00
<button
class="button is-info"
onClick={() => reducer.startRecover()}
>
<div class="icon">
<i class="mdi mdi-arrow-down" />
</div>
<span>Recover a secret</span>
</button>
2021-11-04 19:18:30 +01:00
{/* <button class="button">
<div class="icon"><i class="mdi mdi-file" /></div>
<span>Restore a session</span>
2021-11-04 19:18:30 +01:00
</button> */}
2021-10-22 06:31:46 +02:00
</div>
</div>
<div class="column" />
2021-10-22 06:31:46 +02:00
</div>
2021-10-19 15:56:52 +02:00
</AnastasisClientFrame>
);
}