network and helpers moved to webguicomp
This commit is contained in:
parent
5c5bf951db
commit
b89a78c0a4
|
|
@ -8,6 +8,6 @@
|
|||
|
||||
<script setup>
|
||||
import { SendAndRequest } from "components/webguicomp/network";
|
||||
import { defineProps } from "vue";
|
||||
//import { defineProps } from "vue";
|
||||
const props = defineProps(['senddata']);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<script setup>
|
||||
import { useDialogPluginComponent } from 'quasar'
|
||||
import { PostData } from "boot/network";
|
||||
import { PostData } from "components/webguicomp/network";
|
||||
import { reactive, ref } from 'vue';
|
||||
|
||||
defineEmits([
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import { reactive } from "vue";
|
||||
import { SendAndRequest } from "boot/network";
|
||||
import { SendAndRequest } from "components/webguicomp/network";
|
||||
import CardActions from "components/webguicomp/CardActions.vue"
|
||||
|
||||
defineOptions({
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<script setup>
|
||||
import { reactive } from "vue";
|
||||
import { SendAndRequest } from "boot/network";
|
||||
import { SendAndRequest } from "components/webguicomp/network";
|
||||
import CardActions from "components/webguicomp/CardActions.vue"
|
||||
|
||||
defineOptions({
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
<script setup>
|
||||
import { computed, onUnmounted, reactive, onMounted } from "vue";
|
||||
import { SendAndRequest } from "boot/network";
|
||||
import { secondsToHms } from "boot/helpers"
|
||||
import { SendAndRequest } from "components/webguicomp//network";
|
||||
import { secondsToHms } from "components/webguicomp/helpers"
|
||||
|
||||
defineOptions({
|
||||
name: 'HomeCard'
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<script setup>
|
||||
import { reactive } from "vue";
|
||||
import { SendAndRequest } from "boot/network";
|
||||
import { SendAndRequest } from "components/webguicomp//network";
|
||||
import CardActions from "components/webguicomp/CardActions.vue"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<script setup>
|
||||
import { reactive } from "vue";
|
||||
import { SendAndRequest } from "boot/network";
|
||||
import { SendAndRequest } from "components/webguicomp//network";
|
||||
import CardActions from "components/webguicomp/CardActions.vue"
|
||||
|
||||
const init = {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<script setup>
|
||||
import { reactive } from "vue";
|
||||
import { SendAndRequest } from "boot/network";
|
||||
import { SendAndRequest } from "components/webguicomp/network";
|
||||
import CardActions from "components/webguicomp/CardActions.vue"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@
|
|||
|
||||
<script setup>
|
||||
import { computed, onUnmounted, reactive, onMounted } from "vue";
|
||||
import { SendAndRequest } from "boot/network";
|
||||
import { secondsToHms } from "boot/helpers"
|
||||
import { SendAndRequest } from "components/webguicomp/network";
|
||||
import { secondsToHms } from "components/webguicomp/helpers"
|
||||
|
||||
defineOptions({
|
||||
name: 'StatCard'
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<script setup>
|
||||
import { reactive } from "vue";
|
||||
import { SendAndRequest } from "boot/network";
|
||||
import { SendAndRequest } from "components/webguicomp/network"
|
||||
import CardActions from "components/webguicomp/CardActions.vue"
|
||||
|
||||
defineOptions({
|
||||
|
|
|
|||
37
helpers.js
Normal file
37
helpers.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import { Dialog } from "quasar";
|
||||
|
||||
function secondsToHms(d) {
|
||||
d = Number(d);
|
||||
var dd = Math.floor(d / 86400);
|
||||
var h = Math.floor(d % 86400 / 3600);
|
||||
var m = Math.floor(d % 3600 / 60);
|
||||
var s = Math.floor(d % 3600 % 60);
|
||||
return (' ' + dd + 'd ' + (h < 10 ? "0" : "") + h + ":" + (m < 10 ? "0" : "") + m + ":" + (s < 10 ? "0" : "") + s);
|
||||
}
|
||||
|
||||
function ShowDelayDialog(mess, time, onexpire) {
|
||||
const dialog = Dialog.create({
|
||||
message: '',
|
||||
progress: true,
|
||||
persistent: true, // we want the user to not be able to close it
|
||||
ok: false // we want the user to not be able to close it
|
||||
})
|
||||
|
||||
let percentage = 0
|
||||
const interval = setInterval(() => {
|
||||
percentage = Math.min(100, percentage + 10000 / time);
|
||||
dialog.update({ message: `${mess} ${percentage}%` })
|
||||
|
||||
|
||||
// if we are done, we're gonna close it
|
||||
if (percentage === 100) {
|
||||
clearInterval(interval)
|
||||
setTimeout(() => {
|
||||
dialog.hide();
|
||||
onexpire();
|
||||
}, 350)
|
||||
}
|
||||
}, 100)
|
||||
}
|
||||
|
||||
export { secondsToHms, ShowDelayDialog }
|
||||
|
|
@ -22,8 +22,6 @@ function ShowSaveDialog(apltype) {
|
|||
}, 100)
|
||||
}
|
||||
|
||||
|
||||
|
||||
function PostData(varlist, messtype, applytype, onfinished) {
|
||||
var pld = {};
|
||||
var data = {};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user