refresh all after save apply buttons
This commit is contained in:
parent
6dc0d11e27
commit
bb86a23fc7
|
|
@ -1,16 +1,19 @@
|
|||
<template>
|
||||
<q-card-section>
|
||||
<q-card-actions align="right">
|
||||
<q-btn class="btn" flat v-on:click="PostData(senddata, 1, 0, ShowDelayDialog('Data applying...', 1000, null))">Apply</q-btn>
|
||||
<q-btn class="btn" flat v-on:click="PostData(senddata, 1, 1, ShowDelayDialog('Data saving...', 1000, null))">Save</q-btn>
|
||||
<q-btn class="btn" flat v-on:click="PostData(senddata, 1, 2, ShowDelayDialog('Data saving and reboot...', 10000, null))">Save &
|
||||
<q-btn class="btn" flat v-on:click="PostData(senddata, 1, 0, ShowDelayDialog('Data applying...', 250, pageReload))">Apply</q-btn>
|
||||
<q-btn class="btn" flat v-on:click="PostData(senddata, 1, 1, ShowDelayDialog('Data saving...', 250, pageReload))">Save</q-btn>
|
||||
<q-btn class="btn" flat v-on:click="PostData(senddata, 1, 2, ShowDelayDialog('Data saving and reboot...', 10000, pageReload))">Save &
|
||||
Reboot</q-btn>
|
||||
</q-card-actions>
|
||||
</q-card-section>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { PostData } from "components/webguicomp/network";
|
||||
import { PostData, PostDataControlled } from "components/webguicomp/network";
|
||||
import { ShowDelayDialog } from "./helpers";
|
||||
const props = defineProps(['senddata']);
|
||||
|
||||
function pageReload() { window.location.reload(); }
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ function ShowDelayDialog(mess, time, onexpire) {
|
|||
clearInterval(interval)
|
||||
setTimeout(() => {
|
||||
dialog.hide();
|
||||
() => { onexpire };
|
||||
}, 350)
|
||||
onexpire();
|
||||
}, 500)
|
||||
}
|
||||
}, 100)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,11 @@ function PostDataControlled(varlist, messtype, applytype, onfinished, enable) {
|
|||
for (var k in resp) varlist[k] = resp[k];
|
||||
}
|
||||
if (onfinished) onfinished();
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
Notify.create({ color: "negative", position: "top", message: err.message, icon: "report_problem", });
|
||||
console.log(JSON.stringify(err));
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user