mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-03-26 15:45:34 -04:00
More localization (#358)
* Translate missing items on About page * Localize import summary dialog * Make site menu translation reactive * Localize import options * Include semi colon in string * Move API texts to frontend + better status codes * Provide feedback to user when no meal is planned * Fix API tests after latest rework * Add warning for API changes in changelog * Refactor API texts handling * Refactor API texts handling #2 * Better API feedback * Rearrange strings hierarchy * Add messages upon recipe updated * Fix 'recipe effected' typo * Remove snackbar usage in backend * Translate toolbox * Provide feedback for tags CRUD * Fix messed up merge * Translate sign-up form * Better feedback for sign-up CRUD * Refactor log-in API texts handling * No error message when user is not authenticated * Remove unimportant console log
This commit is contained in:
@@ -13,13 +13,13 @@
|
||||
class="mr-2"
|
||||
>
|
||||
</v-progress-circular>
|
||||
<v-toolbar-title class="headline"> Sign Up </v-toolbar-title>
|
||||
<v-toolbar-title class="headline">
|
||||
{{$t('signup.sign-up')}}
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
</v-app-bar>
|
||||
<v-card-text>
|
||||
Welcome to Mealie! To become a user of this instance you are required to
|
||||
have a valid invitation link. If you haven't recieved an invitation you
|
||||
are unable to sign-up. To recieve a link, contact the sites administrator.
|
||||
{{$t('signup.welcome-to-mealie')}}
|
||||
<v-divider class="mt-3"></v-divider>
|
||||
<v-form ref="signUpForm" @submit.prevent="signUp">
|
||||
<v-text-field
|
||||
@@ -28,7 +28,7 @@
|
||||
prepend-icon="mdi-account"
|
||||
validate-on-blur
|
||||
:rules="[existsRule]"
|
||||
label="Display Name"
|
||||
:label="$t('signup.display-name')"
|
||||
type="email"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
@@ -59,7 +59,7 @@
|
||||
:type="showPassword ? 'text' : 'password'"
|
||||
:append-icon="showPassword ? 'mdi-eye' : 'mdi-eye-off'"
|
||||
:rules="[
|
||||
user.password === user.passwordConfirm || 'Password must match',
|
||||
user.password === user.passwordConfirm || $t('user.password-must-match'),
|
||||
]"
|
||||
@click:append="showPassword = !showPassword"
|
||||
></v-text-field>
|
||||
@@ -71,11 +71,11 @@
|
||||
block="block"
|
||||
type="submit"
|
||||
>
|
||||
Sign Up
|
||||
{{$t('signup.sign-up')}}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
<v-alert dense v-if="error" outlined class="mt-3 mb-0" type="error">
|
||||
Error Signing Up
|
||||
{{$t('signup.error-signing-up')}}
|
||||
</v-alert>
|
||||
</v-form>
|
||||
</v-card-text>
|
||||
@@ -132,18 +132,16 @@ export default {
|
||||
admin: false,
|
||||
};
|
||||
|
||||
let successUser = false;
|
||||
if (this.$refs.signUpForm.validate()) {
|
||||
let response = await api.signUps.createUser(this.token, userData);
|
||||
successUser = response.snackbar.text.includes("Created");
|
||||
if (await api.signUps.createUser(this.token, userData)) {
|
||||
this.$emit("user-created");
|
||||
this.$router.push("/");
|
||||
}
|
||||
}
|
||||
|
||||
this.$emit("user-created");
|
||||
|
||||
|
||||
this.loading = false;
|
||||
if (successUser) {
|
||||
this.$router.push("/");
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user