loader timing and color
This commit is contained in:
parent
2c5fef29df
commit
fd94627fdb
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"api_addr": "http://193.2.76.103:8084"
|
||||
"api_addr": "http://0.0.0.0:8084"
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"api_addr": "http://193.2.76.103:8084"
|
||||
"api_addr": "http://0.0.0.0:8084"
|
||||
}
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
<p
|
||||
v-if="this.$root.store.api_error !== null"
|
||||
class="text-warning"
|
||||
>
|
||||
api_error: {{ this.$root.store.api_error }}
|
||||
</p>
|
||||
<Nav></Nav>
|
||||
<div class="my-home container-fluid">
|
||||
<div class="row">
|
||||
|
@ -15,6 +9,9 @@
|
|||
<LFunctors v-else></LFunctors>
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<p v-if="this.$root.store.api_error != null">
|
||||
{{ this.$root.store.api_error }}
|
||||
</p>
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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 () {
|
||||
|
|
|
@ -9,19 +9,19 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control js-login__username"
|
||||
placeholder="Uporabnik"
|
||||
v-model="credentials.username"
|
||||
type="email"
|
||||
class="form-control"
|
||||
placeholder="e-pošta"
|
||||
v-model="credentials.email"
|
||||
autocomplete="off"
|
||||
>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input
|
||||
type="email"
|
||||
class="form-control"
|
||||
placeholder="e-pošta"
|
||||
v-model="credentials.email"
|
||||
type="text"
|
||||
class="form-control js-login__username"
|
||||
placeholder="Uporabnik"
|
||||
v-model="credentials.username"
|
||||
autocomplete="off"
|
||||
>
|
||||
</div>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<input
|
||||
type="password"
|
||||
class="form-control js-login__password "
|
||||
placeholder="Ponovite geslo."
|
||||
placeholder="Ponovite geslo"
|
||||
v-model="credentials.snd_password"
|
||||
autocomplete="off"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue
Block a user