Merge branch 'fix/signup-without-email' into 'develop'
Permit signup without email See merge request pleroma/pleroma-fe!1072
This commit is contained in:
commit
f40de85b92
2 changed files with 17 additions and 11 deletions
|
@ -241,6 +241,9 @@ const getNodeInfo = async ({ store }) => {
|
||||||
: federation.enabled
|
: federation.enabled
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const accountActivationRequired = metadata.accountActivationRequired
|
||||||
|
store.dispatch('setInstanceOption', { name: 'accountActivationRequired', value: accountActivationRequired })
|
||||||
|
|
||||||
const accounts = metadata.staffAccounts
|
const accounts = metadata.staffAccounts
|
||||||
resolveStaffAccounts({ store, accounts })
|
resolveStaffAccounts({ store, accounts })
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { validationMixin } from 'vuelidate'
|
import { validationMixin } from 'vuelidate'
|
||||||
import { required, sameAs } from 'vuelidate/lib/validators'
|
import { required, requiredIf, sameAs } from 'vuelidate/lib/validators'
|
||||||
import { mapActions, mapState } from 'vuex'
|
import { mapActions, mapState } from 'vuex'
|
||||||
|
|
||||||
const registration = {
|
const registration = {
|
||||||
|
@ -14,15 +14,17 @@ const registration = {
|
||||||
},
|
},
|
||||||
captcha: {}
|
captcha: {}
|
||||||
}),
|
}),
|
||||||
validations: {
|
validations () {
|
||||||
user: {
|
return {
|
||||||
email: { required },
|
user: {
|
||||||
username: { required },
|
email: { required: requiredIf(() => this.accountActivationRequired) },
|
||||||
fullname: { required },
|
username: { required },
|
||||||
password: { required },
|
fullname: { required },
|
||||||
confirm: {
|
password: { required },
|
||||||
required,
|
confirm: {
|
||||||
sameAsPassword: sameAs('password')
|
required,
|
||||||
|
sameAsPassword: sameAs('password')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -43,7 +45,8 @@ const registration = {
|
||||||
signedIn: (state) => !!state.users.currentUser,
|
signedIn: (state) => !!state.users.currentUser,
|
||||||
isPending: (state) => state.users.signUpPending,
|
isPending: (state) => state.users.signUpPending,
|
||||||
serverValidationErrors: (state) => state.users.signUpErrors,
|
serverValidationErrors: (state) => state.users.signUpErrors,
|
||||||
termsOfService: (state) => state.instance.tos
|
termsOfService: (state) => state.instance.tos,
|
||||||
|
accountActivationRequired: (state) => state.instance.accountActivationRequired
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in a new issue