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-10-22 06:31:46 +02:00
|
|
|
<div>
|
|
|
|
<section class="section is-main-section">
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column" />
|
|
|
|
<div class="column is-four-fifths">
|
|
|
|
|
|
|
|
<div class="buttons is-right">
|
|
|
|
<button class="button is-success" autoFocus onClick={() => reducer.startBackup()}>
|
|
|
|
Backup
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button class="button is-info" onClick={() => reducer.startRecover()}>Recover</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="column" />
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
2021-10-19 15:56:52 +02:00
|
|
|
</AnastasisClientFrame>
|
|
|
|
);
|
|
|
|
}
|