2021-10-22 06:31:46 +02:00
|
|
|
|
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 {
|
|
|
|
const reducer = useAnastasisContext()
|
|
|
|
if (!reducer) {
|
|
|
|
return <div>no reducer in context</div>
|
|
|
|
}
|
2021-10-19 15:56:52 +02:00
|
|
|
return (
|
|
|
|
<AnastasisClientFrame hideNav title="Home">
|
2021-11-03 21:30:11 +01:00
|
|
|
<div class="columns">
|
|
|
|
<div class="column" />
|
|
|
|
<div class="column is-four-fifths">
|
2021-10-22 06:31:46 +02:00
|
|
|
|
2021-11-03 21:30:11 +01:00
|
|
|
<div class="buttons">
|
|
|
|
<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-03 21:30:11 +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-10-26 17:08:03 +02:00
|
|
|
|
2021-11-03 21:30:11 +01:00
|
|
|
<button class="button">
|
|
|
|
<div class="icon"><i class="mdi mdi-file" /></div>
|
|
|
|
<span>Restore a session</span>
|
|
|
|
</button>
|
2021-10-22 06:31:46 +02:00
|
|
|
</div>
|
2021-11-03 21:30:11 +01:00
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="column" />
|
2021-10-22 06:31:46 +02:00
|
|
|
</div>
|
2021-10-19 15:56:52 +02:00
|
|
|
</AnastasisClientFrame>
|
|
|
|
);
|
|
|
|
}
|