added manual time set
This commit is contained in:
parent
da5566698e
commit
3f22726f76
|
|
@ -13,21 +13,31 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
<q-card-section class="q-pt-none">
|
||||||
|
<div class="q-pa-md">
|
||||||
|
<q-btn flat class="btn" label="Set time from system" @click="SetTimeFromSystem"></q-btn>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
<CardActions :senddata="data"></CardActions>
|
<CardActions :senddata="data"></CardActions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from "vue";
|
import { reactive, computed } from "vue";
|
||||||
import { PostData } from "components/webguicomp/network";
|
import { PostData } from "components/webguicomp/network";
|
||||||
import CardActions from "components/webguicomp/CardActions.vue"
|
import CardActions from "components/webguicomp/CardActions.vue"
|
||||||
|
//const timestr = reactive(new Date().toISOString().replace("T", " ").substring(0, 19));
|
||||||
|
|
||||||
|
function SetTimeFromSystem() {
|
||||||
|
let time = Math.floor(new Date() / 1000);
|
||||||
|
PostData({ time_set: time }, 1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
const init = {
|
const init = {
|
||||||
sntp_serv1: "",
|
sntp_serv1: "",
|
||||||
sntp_serv2: "",
|
sntp_serv2: "",
|
||||||
sntp_serv3: "",
|
sntp_serv3: "",
|
||||||
sntp_enab: false
|
sntp_enab: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = reactive(init);
|
const data = reactive(init);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user