|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<template>
|
|
|
|
|
<!--load mode-->
|
|
|
|
|
<div v-if="show_loader">
|
|
|
|
|
<div v-if="state === 'loading'">
|
|
|
|
|
<pulse-loader :color="loader_color"></pulse-loader>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -76,16 +76,11 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
state: "loading", // editing, normal
|
|
|
|
|
request_reload: false,
|
|
|
|
|
loader_color: "#007bff",
|
|
|
|
|
loader_color: "#b71511",
|
|
|
|
|
}},
|
|
|
|
|
created: function () {
|
|
|
|
|
this.reload()
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
show_loader: function () {
|
|
|
|
|
return this.state === "loading" && this.$root.store.api_error !== null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
hw: function () {
|
|
|
|
|
this.reload()
|
|
|
|
@ -118,6 +113,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var component = this
|
|
|
|
|
component.state = "loading"
|
|
|
|
|
this.$http.get(
|
|
|
|
|
this.$root.store.api_addr +
|
|
|
|
|
"/api/functor-frames" +
|
|
|
|
@ -131,6 +127,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.catch(function(error) {
|
|
|
|
|
component.$root.store.api_error = error
|
|
|
|
|
component.state = "error"
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getFrames: function (hw, reduce_fun=null) {
|
|
|
|
@ -149,6 +146,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var component = this
|
|
|
|
|
component.state = "loading"
|
|
|
|
|
this.$http.get(
|
|
|
|
|
this.$root.store.api_addr + "/api/frames" +
|
|
|
|
|
"?hw=" + hw + "&rf=" + reduce_fun +
|
|
|
|
@ -161,6 +159,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.catch(function(error) {
|
|
|
|
|
component.$root.store.api_error = error
|
|
|
|
|
component.state = "error"
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
buildSentences: function () {
|
|
|
|
|