Hide the login form if no api url is configured
This commit is contained in:
parent
fa5b1807c7
commit
8d04bdc4f0
2 changed files with 6 additions and 3 deletions
|
@ -189,6 +189,7 @@ export default {
|
||||||
localStorage.setItem('API_URL', window.API_URL)
|
localStorage.setItem('API_URL', window.API_URL)
|
||||||
this.configureApi = false
|
this.configureApi = false
|
||||||
this.apiUrl = window.API_URL
|
this.apiUrl = window.API_URL
|
||||||
|
this.$emit('foundApi', this.apiUrl)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<div class="notification is-success has-text-centered" v-if="confirmedEmailSuccess">
|
<div class="notification is-success has-text-centered" v-if="confirmedEmailSuccess">
|
||||||
You successfully confirmed your email! You can log in now.
|
You successfully confirmed your email! You can log in now.
|
||||||
</div>
|
</div>
|
||||||
<api-config/>
|
<api-config @foundApi="hasApiUrl = true"/>
|
||||||
<form @submit.prevent="submit" id="loginform" v-if="localAuthEnabled">
|
<form @submit.prevent="submit" id="loginform" v-if="hasApiUrl && localAuthEnabled">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="username">Username Or Email Address</label>
|
<label class="label" for="username">Username Or Email Address</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div v-if="openidConnect.enabled && openidConnect.providers && openidConnect.providers.length > 0" class="mt-4">
|
<div v-if="hasApiUrl && openidConnect.enabled && openidConnect.providers && openidConnect.providers.length > 0" class="mt-4">
|
||||||
<x-button
|
<x-button
|
||||||
@click="redirectToProvider(p)"
|
@click="redirectToProvider(p)"
|
||||||
v-for="(p, k) in openidConnect.providers"
|
v-for="(p, k) in openidConnect.providers"
|
||||||
|
@ -117,6 +117,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
confirmedEmailSuccess: false,
|
confirmedEmailSuccess: false,
|
||||||
|
hasApiUrl: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
|
@ -144,6 +145,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.hasApiUrl = window.API_URL !== ''
|
||||||
this.setTitle('Login')
|
this.setTitle('Login')
|
||||||
},
|
},
|
||||||
computed: mapState({
|
computed: mapState({
|
||||||
|
|
Loading…
Reference in a new issue