mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Implement toaster for wrong invite code and wrong nonce
This commit is contained in:
parent
4907eab095
commit
4ddc6fb07a
@ -114,13 +114,20 @@ export default {
|
||||
},
|
||||
})
|
||||
|
||||
if (
|
||||
this.sliderData.sliders[this.sliderIndex].data.response &&
|
||||
this.sliderData.sliders[this.sliderIndex].data.response.isValidInviteCode
|
||||
) {
|
||||
this.$toast.success(
|
||||
this.$t('components.registration.invite-code.form.success', { inviteCode }),
|
||||
)
|
||||
if (this.sliderData.sliders[this.sliderIndex].data.response) {
|
||||
if (this.sliderData.sliders[this.sliderIndex].data.response.isValidInviteCode) {
|
||||
this.$toast.success(
|
||||
this.$t('components.registration.invite-code.form.validations.success', {
|
||||
inviteCode,
|
||||
}),
|
||||
)
|
||||
} else {
|
||||
this.$toast.error(
|
||||
this.$t('components.registration.invite-code.form.validations.error', {
|
||||
inviteCode,
|
||||
}),
|
||||
)
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
this.sliderData.setSliderValuesCallback(false, {
|
||||
|
||||
@ -123,13 +123,22 @@ export default {
|
||||
sliderData: { request: { variables }, response: response.data },
|
||||
})
|
||||
|
||||
if (
|
||||
this.sliderData.sliders[this.sliderIndex].data.response &&
|
||||
this.sliderData.sliders[this.sliderIndex].data.response.VerifyNonce
|
||||
) {
|
||||
this.$toast.success(
|
||||
this.$t('components.registration.email-nonce.form.success', { email, nonce }),
|
||||
)
|
||||
if (this.sliderData.sliders[this.sliderIndex].data.response) {
|
||||
if (this.sliderData.sliders[this.sliderIndex].data.response.VerifyNonce) {
|
||||
this.$toast.success(
|
||||
this.$t('components.registration.email-nonce.form.validations.success', {
|
||||
email,
|
||||
nonce,
|
||||
}),
|
||||
)
|
||||
} else {
|
||||
this.$toast.error(
|
||||
this.$t('components.registration.email-nonce.form.validations.error', {
|
||||
email,
|
||||
nonce,
|
||||
}),
|
||||
)
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
this.sliderData.setSliderValuesCallback(false, {
|
||||
|
||||
@ -168,9 +168,10 @@
|
||||
"description": "Öffne Dein E-Mail Postfach und gib den Code ein, den wir geschickt haben.",
|
||||
"next": "Weiter",
|
||||
"nonce": "E-Mail-Code: 32143",
|
||||
"success": "Gültiger Bestätigungs-Code <b>{nonce}</b> für E-Mail <b>{email}</b>!",
|
||||
"validations": {
|
||||
"length": "muss genau 5 Buchstaben lang sein"
|
||||
"error": "Ungültiger Bestätigungs-Code <b>{nonce}</b> für E-Mail <b>{email}</b>!",
|
||||
"length": "muss genau 5 Buchstaben lang sein",
|
||||
"success": "Gültiger Bestätigungs-Code <b>{nonce}</b> für E-Mail <b>{email}</b>!"
|
||||
}
|
||||
},
|
||||
"title": "E-Mail Bestätigung"
|
||||
@ -181,9 +182,10 @@
|
||||
"description": "Gib den Einladungs-Code ein, den du bekommen hast.",
|
||||
"invite-code": "Einladungs-Code: ACJERB",
|
||||
"next": "Weiter",
|
||||
"success": "Gültiger Einladungs-Code <b>{inviteCode}</b>!",
|
||||
"validations": {
|
||||
"length": "muss genau 6 Buchstaben lang sein"
|
||||
"error": "Ungültiger Einladungs-Code <b>{inviteCode}</b>!",
|
||||
"length": "muss genau 6 Buchstaben lang sein",
|
||||
"success": "Gültiger Einladungs-Code <b>{inviteCode}</b>!"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -168,9 +168,10 @@
|
||||
"description": "Open your inbox and enter the code that we've sent to you.",
|
||||
"next": "Continue",
|
||||
"nonce": "E-mail code: 32143",
|
||||
"success": "Valid verification code <b>{nonce}</b> for e-mail <b>{email}</b>!",
|
||||
"validations": {
|
||||
"length": "must be 5 characters long"
|
||||
"error": "Invalid verification code <b>{nonce}</b> for e-mail <b>{email}</b>!",
|
||||
"length": "must be 5 characters long",
|
||||
"success": "Valid verification code <b>{nonce}</b> for e-mail <b>{email}</b>!"
|
||||
}
|
||||
},
|
||||
"title": "E-Mail Confirmation"
|
||||
@ -181,9 +182,10 @@
|
||||
"description": "Enter the invitation code you received.",
|
||||
"invite-code": "Invite code: ACJERB",
|
||||
"next": "Continue",
|
||||
"success": "Valid invite code <b>{inviteCode}</b>!",
|
||||
"validations": {
|
||||
"length": "must be 6 characters long"
|
||||
"error": "Invalid invite code <b>{inviteCode}</b>!",
|
||||
"length": "must be 6 characters long",
|
||||
"success": "Valid invite code <b>{inviteCode}</b>!"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user