mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-28 10:43:17 -05: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:
@@ -55,10 +55,10 @@ export default {
|
||||
let formData = new FormData();
|
||||
formData.append(this.fileName, this.file);
|
||||
|
||||
await api.utils.uploadFile(this.url, formData);
|
||||
|
||||
if(await api.utils.uploadFile(this.url, formData)) {
|
||||
this.$emit(UPLOAD_EVENT);
|
||||
}
|
||||
this.isSelecting = false;
|
||||
this.$emit(UPLOAD_EVENT);
|
||||
}
|
||||
},
|
||||
onButtonClick() {
|
||||
|
||||
@@ -105,17 +105,15 @@ export default {
|
||||
async createRecipe() {
|
||||
if (this.$refs.urlForm.validate()) {
|
||||
this.processing = true;
|
||||
let response = await api.recipes.createByURL(this.recipeURL);
|
||||
if (response.status !== 201) {
|
||||
this.error = true;
|
||||
this.processing = false;
|
||||
return;
|
||||
}
|
||||
|
||||
this.addRecipe = false;
|
||||
const response = await api.recipes.createByURL(this.recipeURL);
|
||||
this.processing = false;
|
||||
this.recipeURL = "";
|
||||
this.$router.push(`/recipe/${response.data}`);
|
||||
if (response) {
|
||||
this.addRecipe = false;
|
||||
this.recipeURL = "";
|
||||
this.$router.push(`/recipe/${response.data}`);
|
||||
} else {
|
||||
this.error = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@ export default {
|
||||
components: {
|
||||
LoginDialog,
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
items: [
|
||||
computed: {
|
||||
items() {
|
||||
return [
|
||||
{
|
||||
icon: "mdi-account",
|
||||
title: "Login",
|
||||
@@ -83,10 +83,8 @@ export default {
|
||||
nav: "/admin",
|
||||
restricted: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
]
|
||||
},
|
||||
filteredItems() {
|
||||
if (this.loggedIn) {
|
||||
return this.items.filter(x => x.restricted == true);
|
||||
|
||||
Reference in New Issue
Block a user