|
|
|
@ -45,7 +45,7 @@ const template = `
|
|
|
|
|
><a href="#" class="text-secondary" @click="on_register_click">Need an account?</a></small>
|
|
|
|
|
<small
|
|
|
|
|
class="mr-3"
|
|
|
|
|
v-if="!loading"
|
|
|
|
|
v-if="!auth_user && !loading"
|
|
|
|
|
><a href="#" class="text-secondary" @click="on_forgot_password">Forgot password?</a></small>
|
|
|
|
|
<button type="button" class="btn btn-primary" :disabled="loading" v-if="step_two" v-on:click="back_click">Back</button>
|
|
|
|
|
<button type="button" class="btn btn-primary" :disabled="loading || btn_disabled" v-on:click="step_click">{{ button_text }}</button>
|
|
|
|
@ -72,6 +72,7 @@ export default class AuthLoginForm extends Component {
|
|
|
|
|
error_message = ''
|
|
|
|
|
other_message = ''
|
|
|
|
|
allow_back = true
|
|
|
|
|
auth_user = false
|
|
|
|
|
|
|
|
|
|
watch_username(new_username, old_username) {
|
|
|
|
|
this.btn_disabled = !new_username
|
|
|
|
@ -86,6 +87,7 @@ export default class AuthLoginForm extends Component {
|
|
|
|
|
async vue_on_create() {
|
|
|
|
|
const auth_user = await auth_api.get_authenticated_user()
|
|
|
|
|
if ( auth_user ) {
|
|
|
|
|
this.auth_user = true
|
|
|
|
|
this.allow_back = false
|
|
|
|
|
this.username = auth_user
|
|
|
|
|
await this.step_click()
|
|
|
|
|