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