diff options
author | Jakob Stendahl <14180120+JakobST1n@users.noreply.github.com> | 2021-10-11 20:02:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 20:02:04 +0200 |
commit | c67531161e56488166a33232f87566309ba8676e (patch) | |
tree | 846e59a020e80bea48557d5a06af5728e44961ff /src_frontend/Components/Settings/System.svelte | |
parent | e6880cd8ccf82d993f222cb14b4860581654acb8 (diff) | |
parent | c1b6eec770b885a9829e1f62bad5cc99389ca429 (diff) | |
download | Luxcena-Neo-c67531161e56488166a33232f87566309ba8676e.tar.gz Luxcena-Neo-c67531161e56488166a33232f87566309ba8676e.zip |
Merge pull request #24 from JakobST1n/rebuild
v1.0.0
Diffstat (limited to 'src_frontend/Components/Settings/System.svelte')
-rw-r--r-- | src_frontend/Components/Settings/System.svelte | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src_frontend/Components/Settings/System.svelte b/src_frontend/Components/Settings/System.svelte new file mode 100644 index 0000000..1af4531 --- /dev/null +++ b/src_frontend/Components/Settings/System.svelte @@ -0,0 +1,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>
\ No newline at end of file |