Moved the button to adjust time to the settings page.

This commit is contained in:
David Carley
2022-07-22 22:50:19 -07:00
parent 2efd753d95
commit 2e08c824de
3 changed files with 21 additions and 10 deletions

View File

@@ -532,10 +532,6 @@ module.exports = {
showProbeDialog: function (probeType) {
SvelteComponents.showDialog("Probe", { probeType });
},
showSetTimeDialog: function () {
SvelteComponents.showDialog("SetTime");
}
},

View File

@@ -269,8 +269,6 @@ script#control-view-template(type="text/x-template")
th Current Time
td
span {{current_time}}
button.pure-button(@click="showSetTimeDialog", style="height: 28px; padding: 0px 10px")
.fa.fa-cog
tr
th Remaining

View File

@@ -2,13 +2,17 @@
import configTemplate from "../../../resources/config-template.json";
import ScreenRotationDialog from "$dialogs/ScreenRotationDialog.svelte";
import ConfigTemplatedInput from "./ConfigTemplatedInput.svelte";
import SetTimeDialog from "$dialogs/SetTimeDialog.svelte";
import Button, { Label } from "@smui/button";
const gcodeURL = "https://linuxcnc.org/docs/html/gcode/g-code.html";
let showScreenRotationDialog = false;
let showSetTimeDialog = false;
</script>
<ScreenRotationDialog bind:open={showScreenRotationDialog} />
<SetTimeDialog bind:open={showSetTimeDialog} />
<h1>Settings</h1>
@@ -17,13 +21,26 @@
<fieldset>
<div class="pure-control-group">
<label for="screen-rotation" />
<button
class="pure-button"
<Button
name="screen-rotation"
touch
variant="raised"
on:click={() => (showScreenRotationDialog = true)}
>
Change Screen Rotation
</button>
<Label>Change Screen Rotation</Label>
</Button>
</div>
<div class="pure-control-group">
<label for="set-time" />
<Button
name="set-time"
touch
variant="raised"
on:click={() => (showSetTimeDialog = true)}
>
<Label>Change Time & Timezone</Label>
</Button>
</div>
</fieldset>