Add a note if user attempts to register with (apparently) an email

This commit is contained in:
thecashewtrader 2022-11-28 16:57:35 +05:30
parent abdc80cdbe
commit 74c0795248
2 changed files with 4 additions and 1 deletions

View file

@ -52,6 +52,8 @@ export default {
methods: {
register() {
if (!this.username || !this.password) return;
if (this.username.includes("@") && !confirm(this.$t("info.register_no_email_note"))) return;
this.fetchJson(this.authApiUrl() + "/register", null, {
method: "POST",
body: JSON.stringify({

View file

@ -168,6 +168,7 @@
"page_not_found": "Page not found",
"copied": "Copied!",
"cannot_copy": "Can't copy!",
"local_storage": "This action requires localStorage, are cookies enabled?"
"local_storage": "This action requires localStorage, are cookies enabled?",
"register_no_email_note": "Piped has detected that you are using an email as username to register. Providing an email is not required to register on Piped. If you still want to continue, press OK."
}
}