blob: 1af45310e1ae6445f03eabaaea93529f2427e191 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<script>
import FloatingButton from "../../ComponentLib/Button/FloatingButton.svelte";
import ConfirmActionDialog from "../Dialogs/ConfirmActionDialog.svelte";
import { authorizedSocket } from "../../stores/socketStore.js";
function restartSystem() {
authorizedSocket.emit("restart:system");
}
function restartService() {
authorizedSocket.emit("restart:service");
}
</script>
<style>
h1, p {
margin-bottom: 10px;
}
.button { margin-bottom: 10px; }
</style>
<div>
<h1>System restart</h1>
<ConfirmActionDialog title="Are you sure?" text="Are you sure you want to restart the rPI?" action={restartSystem}>
<svelte:fragment slot="trigger" let:open>
<div class="button"><FloatingButton on:click={open} fullWidth=true>Restart system</FloatingButton></div>
</svelte:fragment>
</ConfirmActionDialog>
<ConfirmActionDialog title="Are you sure?" text="Are you sure you want to restart the Luxcena NEO service?" action={restartService}>
<svelte:fragment slot="trigger" let:open>
<div class="button"><FloatingButton on:click={open} fullWidth=true>Restart service</FloatingButton></div>
</svelte:fragment>
</ConfirmActionDialog>
</div>
|