This commit is contained in:
parent
acc315b581
commit
a7a7c75dc5
|
@ -5,7 +5,10 @@
|
||||||
<section v-else-if="error !== ''">
|
<section v-else-if="error !== ''">
|
||||||
<no-auth-wrapper>
|
<no-auth-wrapper>
|
||||||
<card>
|
<card>
|
||||||
<div class="notification is-danger">
|
<p v-if="error === errorNoApiUrl">
|
||||||
|
{{ $t('ready.noApiUrlConfigured') }}
|
||||||
|
</p>
|
||||||
|
<div class="notification is-danger" v-else>
|
||||||
<p>
|
<p>
|
||||||
{{ $t('ready.errorOccured') }}<br/>
|
{{ $t('ready.errorOccured') }}<br/>
|
||||||
{{ error }}
|
{{ error }}
|
||||||
|
@ -34,6 +37,8 @@ import logoUrl from '@/assets/logo.svg'
|
||||||
import ApiConfig from '@/components/misc/api-config'
|
import ApiConfig from '@/components/misc/api-config'
|
||||||
import NoAuthWrapper from '@/components/misc/no-auth-wrapper'
|
import NoAuthWrapper from '@/components/misc/no-auth-wrapper'
|
||||||
|
|
||||||
|
const ERROR_NO_API_URL = 'noApiUrlProvided'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ready',
|
name: 'ready',
|
||||||
components: {
|
components: {
|
||||||
|
@ -44,6 +49,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
logoUrl,
|
logoUrl,
|
||||||
error: '',
|
error: '',
|
||||||
|
errorNoApiUrl: ERROR_NO_API_URL,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -54,11 +60,16 @@ export default {
|
||||||
return this.$store.state.vikunjaReady
|
return this.$store.state.vikunjaReady
|
||||||
},
|
},
|
||||||
showLoading() {
|
showLoading() {
|
||||||
return !this.ready || this.error !== ''
|
return !this.ready && this.error === ''
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
load() {
|
load() {
|
||||||
|
if (window.API_URL === '') {
|
||||||
|
this.error = ERROR_NO_API_URL
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.$store.dispatch('loadApp')
|
this.$store.dispatch('loadApp')
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.error = e
|
this.error = e
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
"ready": {
|
"ready": {
|
||||||
"loading": "Vikunja is loading…",
|
"loading": "Vikunja is loading…",
|
||||||
"errorOccured": "An error occured:",
|
"errorOccured": "An error occured:",
|
||||||
"checkApiUrl": "Please check if the api url is correct below."
|
"checkApiUrl": "Please check if the api url is correct.",
|
||||||
|
"noApiUrlConfigured": "No API url was configured. Please set one below:"
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
"auth": {
|
"auth": {
|
||||||
|
|
Reference in New Issue
Block a user