.env.production file eliminated ! (-> .env)
.env.production worked in local added myconfig messagepopup working (but not ready yet) added Graphql (only module)
This commit is contained in:
@@ -23,6 +23,7 @@ import './signin.scss'
|
||||
export default class Signin extends Vue {
|
||||
public $v
|
||||
public $q
|
||||
loading: boolean
|
||||
$t: any
|
||||
|
||||
public signin: ISigninOptions = {
|
||||
@@ -33,6 +34,8 @@ export default class Signin extends Vue {
|
||||
|
||||
created() {
|
||||
this.$v.$reset()
|
||||
// this.$myconfig.socialLogin.facebook = true
|
||||
// console.log('PROVA fb:', this.$myconfig.socialLogin.facebook)
|
||||
}
|
||||
|
||||
public env() {
|
||||
@@ -79,6 +82,27 @@ export default class Signin extends Vue {
|
||||
|
||||
}
|
||||
|
||||
redirect(response) {
|
||||
this.loading = false
|
||||
window.location.href = response.data.redirect
|
||||
}
|
||||
|
||||
error(error) {
|
||||
this.loading = false
|
||||
this.$errorHandler(this, error)
|
||||
}
|
||||
|
||||
facebook() {
|
||||
this.loading = true
|
||||
this.$axios.get('/backend/loginFacebook')
|
||||
.then(response => this.redirect(response))
|
||||
.catch(error => this.error(error))
|
||||
}
|
||||
|
||||
google() {
|
||||
|
||||
}
|
||||
|
||||
submit() {
|
||||
this.$v.signin.$touch()
|
||||
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
:before="[{icon: 'person', handler () {}}]"
|
||||
@blur="$v.signin.username.$touch"
|
||||
:error="$v.signin.username.$error"
|
||||
:float-label="$t('reg.username')"
|
||||
/>
|
||||
:float-label="$t('reg.username')"></q-input>
|
||||
</q-field>
|
||||
|
||||
<q-field
|
||||
@@ -34,8 +33,7 @@
|
||||
:before="[{icon: 'vpn_key', handler () {}}]"
|
||||
@blur="$v.signin.password.$touch"
|
||||
:error="$v.signin.password.$error"
|
||||
:float-label="$t('reg.password')"
|
||||
/>
|
||||
:float-label="$t('reg.password')"></q-input>
|
||||
</q-field>
|
||||
|
||||
<div>
|
||||
@@ -44,6 +42,14 @@
|
||||
|
||||
<br>
|
||||
|
||||
<q-card-main class="flex flex-center">
|
||||
<!--<q-btn v-if="$myconfig.socialLogin.facebook" :loading="loading" class="q-mb-md q-mr-md" rounded icon="fab fa-facebook-f" size="sm" color="blue-10" text-color="white" @click="facebook" :label="$t('components.authentication.login.facebook')"/>-->
|
||||
<!--
|
||||
<q-btn v-if="$myconfig.socialLogin.facebook" class="q-mb-md q-mr-md" rounded icon="fab fa-facebook-f" size="sm" color="blue-10" text-color="white" @click="facebook" :label="$t('components.authentication.login.facebook')"/>
|
||||
<q-btn v-if="$myconfig.socialLogin.google" class="q-mb-md q-mr-md" rounded icon="fab fa-google" size="sm" color="deep-orange-14" text-color="white" @click="google" :label="$t('components.authentication.login.google')"/>
|
||||
-->
|
||||
</q-card-main>
|
||||
|
||||
<div align="center">
|
||||
<q-btn rounded size="lg" color="primary" @click="submit" :disable="$v.$error">{{$t('login.enter')}}
|
||||
</q-btn>
|
||||
|
||||
@@ -39,9 +39,6 @@ export default class Signup extends Vue {
|
||||
}
|
||||
|
||||
mounted() {
|
||||
if (this.$v) {
|
||||
this.$v.$touch()
|
||||
}
|
||||
}
|
||||
|
||||
public logoimg() {
|
||||
@@ -109,6 +106,7 @@ export default class Signup extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
if (!item.required) return this.$t('reg.err.required')
|
||||
if (cosa === 'email') {
|
||||
// console.log("EMAIL " + item.isUnique);
|
||||
// console.log(item);
|
||||
@@ -118,7 +116,6 @@ export default class Signup extends Vue {
|
||||
if (!item.isUnique) return this.$t('reg.err.duplicate_username')
|
||||
}
|
||||
|
||||
if (!item.required) return this.$t('reg.err.required')
|
||||
if (!item.complexity) return this.$t('reg.err.complexity')
|
||||
if (!item.minLength) return this.$t('reg.err.atleast') + ` ${item.$params.minLength.min} ` + this.$t('reg.err.char')
|
||||
if (!item.maxLength) return this.$t('reg.err.notmore') + ` ${item.$params.maxLength.max} ` + this.$t('reg.err.char')
|
||||
|
||||
Reference in New Issue
Block a user