1
0

Allow setting api url from the login screen (#264)

Cleanup

Use the http factory everywhere instead of the created element

Use the current domain if the api path is relative to the frontend host

Format

Prevent setting an empty url

Fix styling

Add changing api url

Add change url component

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/264
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
This commit is contained in:
konrad
2020-10-11 10:13:35 +00:00
parent 9f3d17c3f3
commit 1935af83c3
10 changed files with 214 additions and 10 deletions

View File

@ -5,6 +5,7 @@
<div class="notification is-success has-text-centered" v-if="confirmedEmailSuccess">
You successfully confirmed your email! You can log in now.
</div>
<api-config/>
<form @submit.prevent="submit" id="loginform">
<div class="field">
<label class="label" for="username">Username</label>
@ -76,13 +77,15 @@
import {mapState} from 'vuex'
import router from '../../router'
import {HTTP} from '@/http-common'
import {HTTPFactory} from '@/http-common'
import message from '../../message'
import {ERROR_MESSAGE, LOADING} from '@/store/mutation-types'
import legal from '../../components/misc/legal'
import ApiConfig from '@/components/misc/api-config'
export default {
components: {
ApiConfig,
legal,
},
data() {
@ -91,6 +94,7 @@ export default {
}
},
beforeMount() {
const HTTP = HTTPFactory()
// Try to verify the email
// FIXME: Why is this here? Can we find a better place for this?
let emailVerifyToken = localStorage.getItem('emailConfirmToken')