diff --git a/frontend/babel.config.js b/frontend/babel.config.js
index e9558405f..162a3ea97 100644
--- a/frontend/babel.config.js
+++ b/frontend/babel.config.js
@@ -1,5 +1,3 @@
module.exports = {
- presets: [
- '@vue/cli-plugin-babel/preset'
- ]
-}
+ presets: ["@vue/cli-plugin-babel/preset"],
+};
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 56b8c537a..999cac80a 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -4,9 +4,7 @@
- This is a Demo | Username: changeme@email.com | Password: demo
-
This is a Demo | Username: changeme@email.com | Password: demo
@@ -57,9 +55,7 @@ export default {
*/
darkModeSystemCheck() {
if (this.$store.getters.getDarkMode === "system")
- Vuetify.framework.theme.dark = window.matchMedia(
- "(prefers-color-scheme: dark)"
- ).matches;
+ Vuetify.framework.theme.dark = window.matchMedia("(prefers-color-scheme: dark)").matches;
},
/**
* This will monitor the OS level darkmode and call to update dark mode.
diff --git a/frontend/src/api/api-utils.js b/frontend/src/api/api-utils.js
index 0e42f2333..a143f8452 100644
--- a/frontend/src/api/api-utils.js
+++ b/frontend/src/api/api-utils.js
@@ -3,18 +3,16 @@ import axios from "axios";
import { store } from "../store";
import utils from "@/utils";
-axios.defaults.headers.common[
- "Authorization"
-] = `Bearer ${store.getters.getToken}`;
+axios.defaults.headers.common["Authorization"] = `Bearer ${store.getters.getToken}`;
function handleError(error, getText) {
- if(getText) {
+ if (getText) {
utils.notify.error(getText(error.response));
}
return false;
}
function handleResponse(response, getText) {
- if(response && getText) {
+ if (response && getText) {
const successText = getText(response);
utils.notify.success(successText);
}
@@ -31,26 +29,36 @@ function defaultSuccessText(response) {
const apiReq = {
post: async function(url, data, getErrorText = defaultErrorText, getSuccessText) {
- const response = await axios.post(url, data).catch(function(error) { handleError(error, getErrorText) });
- return handleResponse(response, getSuccessText);
- },
-
- put: async function(url, data, getErrorText = defaultErrorText, getSuccessText) {
- const response = await axios.put(url, data).catch(function(error) { handleError(error, getErrorText) });
+ const response = await axios.post(url, data).catch(function(error) {
+ handleError(error, getErrorText);
+ });
return handleResponse(response, getSuccessText);
},
-
+
+ put: async function(url, data, getErrorText = defaultErrorText, getSuccessText) {
+ const response = await axios.put(url, data).catch(function(error) {
+ handleError(error, getErrorText);
+ });
+ return handleResponse(response, getSuccessText);
+ },
+
patch: async function(url, data, getErrorText = defaultErrorText, getSuccessText) {
- const response = await axios.patch(url, data).catch(function(error) { handleError(error, getErrorText) });
+ const response = await axios.patch(url, data).catch(function(error) {
+ handleError(error, getErrorText);
+ });
return handleResponse(response, getSuccessText);
},
get: function(url, data, getErrorText = defaultErrorText) {
- return axios.get(url, data).catch(function(error) { handleError(error, getErrorText) });
+ return axios.get(url, data).catch(function(error) {
+ handleError(error, getErrorText);
+ });
},
- delete: async function(url, data, getErrorText = defaultErrorText, getSuccessText = defaultSuccessText ) {
- const response = await axios.delete(url, data).catch( function(error) { handleError(error, getErrorText) } );
+ delete: async function(url, data, getErrorText = defaultErrorText, getSuccessText = defaultSuccessText) {
+ const response = await axios.delete(url, data).catch(function(error) {
+ handleError(error, getErrorText);
+ });
return handleResponse(response, getSuccessText);
},
diff --git a/frontend/src/api/backup.js b/frontend/src/api/backup.js
index d95dd6d27..f729eefc1 100644
--- a/frontend/src/api/backup.js
+++ b/frontend/src/api/backup.js
@@ -1,7 +1,7 @@
import { baseURL } from "./api-utils";
import { apiReq } from "./api-utils";
import { store } from "@/store";
-import i18n from '@/i18n.js';
+import i18n from "@/i18n.js";
const backupBase = baseURL + "backups/";
@@ -14,8 +14,6 @@ export const backupURLs = {
downloadBackup: fileName => `${backupBase}${fileName}/download`,
};
-
-
export const backupAPI = {
/**
* Request all backups available on the server
@@ -44,8 +42,8 @@ export const backupAPI = {
return apiReq.delete(
backupURLs.deleteBackup(fileName),
null,
- function() { return i18n.t('settings.backup.unable-to-delete-backup'); },
- function() { return i18n.t('settings.backup.backup-deleted'); }
+ () => i18n.t("settings.backup.unable-to-delete-backup"),
+ () => i18n.t("settings.backup.backup-deleted")
);
},
/**
@@ -55,10 +53,12 @@ export const backupAPI = {
*/
async create(options) {
return apiReq.post(
- backupURLs.createBackup,
+ backupURLs.createBackup,
options,
- function() { return i18n.t('settings.backup.error-creating-backup-see-log-file'); },
- function(response) { return i18n.t('settings.backup.backup-created-at-response-export_path', {path: response.data.export_path}); }
+ () => i18n.t("settings.backup.error-creating-backup-see-log-file"),
+ response => {
+ return i18n.t("settings.backup.backup-created-at-response-export_path", { path: response.data.export_path });
+ }
);
},
/**
diff --git a/frontend/src/api/category.js b/frontend/src/api/category.js
index ed0e37524..f457b27ae 100644
--- a/frontend/src/api/category.js
+++ b/frontend/src/api/category.js
@@ -1,7 +1,7 @@
import { baseURL } from "./api-utils";
import { apiReq } from "./api-utils";
import { store } from "@/store";
-import i18n from '@/i18n.js';
+import i18n from "@/i18n.js";
const prefix = baseURL + "categories";
@@ -24,12 +24,12 @@ export const categoryAPI = {
},
async create(name) {
const response = await apiReq.post(
- categoryURLs.getAll,
+ categoryURLs.getAll,
{ name: name },
- function() { return i18n.t('category.category-creation-failed'); },
- function() { return i18n.t('category.category-created'); }
+ () => i18n.t("category.category-creation-failed"),
+ () => i18n.t("category.category-created")
);
- if(response) {
+ if (response) {
store.dispatch("requestCategories");
return response.data;
}
@@ -40,10 +40,10 @@ export const categoryAPI = {
},
async update(name, newName, overrideRequest = false) {
const response = await apiReq.put(
- categoryURLs.updateCategory(name),
+ categoryURLs.updateCategory(name),
{ name: newName },
- function() { return i18n.t('category.category-update-failed'); },
- function() { return i18n.t('category.category-updated'); }
+ () => i18n.t("category.category-update-failed"),
+ () => i18n.t("category.category-updated")
);
if (response && !overrideRequest) {
store.dispatch("requestCategories");
@@ -54,8 +54,8 @@ export const categoryAPI = {
const response = await apiReq.delete(
categoryURLs.deleteCategory(category),
null,
- function() { return i18n.t('category.category-deletion-failed'); },
- function() { return i18n.t('category.category-deleted'); }
+ () => i18n.t("category.category-deletion-failed"),
+ () => i18n.t("category.category-deleted")
);
if (response && !overrideRequest) {
store.dispatch("requestCategories");
@@ -85,12 +85,12 @@ export const tagAPI = {
},
async create(name) {
const response = await apiReq.post(
- tagURLs.getAll,
+ tagURLs.getAll,
{ name: name },
- function() { return i18n.t('tag.tag-creation-failed'); },
- function() { return i18n.t('tag.tag-created'); }
+ () => i18n.t("tag.tag-creation-failed"),
+ () => i18n.t("tag.tag-created")
);
- if(response) {
+ if (response) {
store.dispatch("requestTags");
return response.data;
}
@@ -101,13 +101,13 @@ export const tagAPI = {
},
async update(name, newName, overrideRequest = false) {
const response = await apiReq.put(
- tagURLs.updateTag(name),
+ tagURLs.updateTag(name),
{ name: newName },
- function() { return i18n.t('tag.tag-update-failed'); },
- function() { return i18n.t('tag.tag-updated'); }
+ () => i18n.t("tag.tag-update-failed"),
+ () => i18n.t("tag.tag-updated")
);
- if(response) {
+ if (response) {
if (!overrideRequest) {
store.dispatch("requestTags");
}
@@ -118,10 +118,10 @@ export const tagAPI = {
const response = await apiReq.delete(
tagURLs.deleteTag(tag),
null,
- function() { return i18n.t('tag.tag-deletion-failed'); },
- function() { return i18n.t('tag.tag-deleted'); }
+ () => i18n.t("tag.tag-deletion-failed"),
+ () => i18n.t("tag.tag-deleted")
);
- if(response) {
+ if (response) {
if (!overrideRequest) {
store.dispatch("requestTags");
}
diff --git a/frontend/src/api/groups.js b/frontend/src/api/groups.js
index 011c3d104..0ee1f1778 100644
--- a/frontend/src/api/groups.js
+++ b/frontend/src/api/groups.js
@@ -1,6 +1,6 @@
import { baseURL } from "./api-utils";
import { apiReq } from "./api-utils";
-import i18n from '@/i18n.js';
+import i18n from "@/i18n.js";
const groupPrefix = baseURL + "groups";
const groupsURLs = {
@@ -12,18 +12,18 @@ const groupsURLs = {
};
function deleteErrorText(response) {
- switch(response.data.detail) {
- case 'GROUP_WITH_USERS':
- return i18n.t('group.cannot-delete-group-with-users');
-
- case 'GROUP_NOT_FOUND':
- return i18n.t('group.group-not-found');
-
- case 'DEFAULT_GROUP':
- return i18n.t('group.cannot-delete-default-group');
+ switch (response.data.detail) {
+ case "GROUP_WITH_USERS":
+ return i18n.t("group.cannot-delete-group-with-users");
+
+ case "GROUP_NOT_FOUND":
+ return i18n.t("group.group-not-found");
+
+ case "DEFAULT_GROUP":
+ return i18n.t("group.cannot-delete-default-group");
default:
- return i18n.t('group.group-deletion-failed');
+ return i18n.t("group.group-deletion-failed");
}
}
@@ -36,33 +36,27 @@ export const groupAPI = {
return apiReq.post(
groupsURLs.create,
{ name: name },
- function() { return i18n.t('group.user-group-creation-failed'); },
- function() { return i18n.t('group.user-group-created'); }
+ () => i18n.t("group.user-group-creation-failed"),
+ () => i18n.t("group.user-group-created")
);
},
delete(id) {
- return apiReq.delete(
- groupsURLs.delete(id),
- null,
- deleteErrorText,
- function() { return i18n.t('group.group-deleted'); }
- );
+ return apiReq.delete(groupsURLs.delete(id), null, deleteErrorText, function() {
+ return i18n.t("group.group-deleted");
+ });
},
async current() {
- const response = await apiReq.get(
- groupsURLs.current,
- null,
- null);
- if(response) {
+ const response = await apiReq.get(groupsURLs.current, null, null);
+ if (response) {
return response.data;
}
},
update(data) {
return apiReq.put(
- groupsURLs.update(data.id),
- data,
- function() { return i18n.t('group.error-updating-group'); },
- function() { return i18n.t('settings.group-settings-updated'); }
+ groupsURLs.update(data.id),
+ data,
+ () => i18n.t("group.error-updating-group"),
+ () => i18n.t("settings.group-settings-updated")
);
},
};
diff --git a/frontend/src/api/mealplan.js b/frontend/src/api/mealplan.js
index ff51da61e..4d396a1cf 100644
--- a/frontend/src/api/mealplan.js
+++ b/frontend/src/api/mealplan.js
@@ -1,6 +1,6 @@
import { baseURL } from "./api-utils";
import { apiReq } from "./api-utils";
-import i18n from '@/i18n.js';
+import i18n from "@/i18n.js";
const prefix = baseURL + "meal-plans/";
@@ -18,10 +18,10 @@ const mealPlanURLs = {
export const mealplanAPI = {
create(postBody) {
return apiReq.post(
- mealPlanURLs.create,
+ mealPlanURLs.create,
postBody,
- function() { return i18n.t('meal-plan.mealplan-creation-failed')},
- function() { return i18n.t('meal-plan.mealplan-created'); }
+ () => i18n.t("meal-plan.mealplan-creation-failed"),
+ () => i18n.t("meal-plan.mealplan-created")
);
},
@@ -41,19 +41,20 @@ export const mealplanAPI = {
},
delete(id) {
- return apiReq.delete(mealPlanURLs.delete(id),
+ return apiReq.delete(
+ mealPlanURLs.delete(id),
null,
- function() { return i18n.t('meal-plan.mealplan-deletion-failed'); },
- function() { return i18n.t('meal-plan.mealplan-deleted'); }
+ () => i18n.t("meal-plan.mealplan-deletion-failed"),
+ () => i18n.t("meal-plan.mealplan-deleted")
);
},
update(id, body) {
return apiReq.put(
- mealPlanURLs.update(id),
+ mealPlanURLs.update(id),
body,
- function() { return i18n.t('meal-plan.mealplan-update-failed'); },
- function() { return i18n.t('meal-plan.mealplan-updated'); }
+ () => i18n.t("meal-plan.mealplan-update-failed"),
+ () => i18n.t("meal-plan.mealplan-updated")
);
},
diff --git a/frontend/src/api/migration.js b/frontend/src/api/migration.js
index 5d967c56c..321ab0ac1 100644
--- a/frontend/src/api/migration.js
+++ b/frontend/src/api/migration.js
@@ -1,7 +1,7 @@
import { baseURL } from "./api-utils";
import { apiReq } from "./api-utils";
import { store } from "../store";
-import i18n from '@/i18n.js';
+import i18n from "@/i18n.js";
const migrationBase = baseURL + "migrations";
@@ -21,8 +21,8 @@ export const migrationAPI = {
const response = await apiReq.delete(
migrationURLs.delete(folder, file),
null,
- function() { return i18n.t('general.file-folder-not-found'); },
- function() { return i18n.t('migration.migration-data-removed'); }
+ () => i18n.t("general.file-folder-not-found"),
+ () => i18n.t("migration.migration-data-removed")
);
return response;
},
diff --git a/frontend/src/api/recipe.js b/frontend/src/api/recipe.js
index 4296fcbe9..fe755f6f7 100644
--- a/frontend/src/api/recipe.js
+++ b/frontend/src/api/recipe.js
@@ -38,10 +38,7 @@ export const recipeAPI = {
},
async getAllByCategory(categories) {
- let response = await apiReq.post(
- recipeURLs.allRecipesByCategory,
- categories
- );
+ let response = await apiReq.post(recipeURLs.allRecipesByCategory, categories);
return response.data;
},
@@ -69,9 +66,7 @@ export const recipeAPI = {
let successMessage = null;
if (!overrideSuccessMsg) {
successMessage = function() {
- return overrideSuccessMsg
- ? null
- : i18n.t("recipe.recipe-image-updated");
+ return overrideSuccessMsg ? null : i18n.t("recipe.recipe-image-updated");
};
}
diff --git a/frontend/src/api/signUps.js b/frontend/src/api/signUps.js
index 8500a0cb9..e38428447 100644
--- a/frontend/src/api/signUps.js
+++ b/frontend/src/api/signUps.js
@@ -1,6 +1,6 @@
import { baseURL } from "./api-utils";
import { apiReq } from "./api-utils";
-import i18n from '@/i18n.js';
+import i18n from "@/i18n.js";
const signUpPrefix = baseURL + "users/sign-ups";
@@ -18,24 +18,27 @@ export const signupAPI = {
},
async createToken(data) {
let response = await apiReq.post(
- signUpURLs.createToken,
+ signUpURLs.createToken,
data,
- function() { return i18n.t('signup.sign-up-link-creation-failed'); },
- function() { return i18n.t('signup.sign-up-link-created'); }
+ () => i18n.t("signup.sign-up-link-creation-failed"),
+ () => i18n.t("signup.sign-up-link-created")
);
return response.data;
},
async deleteToken(token) {
- return await apiReq.delete(signUpURLs.deleteToken(token),
- null,
- function() { return i18n.t('signup.sign-up-token-deletion-failed'); },
- function() { return i18n.t('signup.sign-up-token-deleted'); }
+ return await apiReq.delete(
+ signUpURLs.deleteToken(token),
+ null,
+ () => i18n.t("signup.sign-up-token-deletion-failed"),
+ () => i18n.t("signup.sign-up-token-deleted")
);
},
async createUser(token, data) {
- return apiReq.post(signUpURLs.createUser(token), data,
- function() { return i18n.t('user.you-are-not-allowed-to-create-a-user'); },
- function() { return i18n.t('user.user-created'); }
+ return apiReq.post(
+ signUpURLs.createUser(token),
+ data,
+ () => i18n.t("user.you-are-not-allowed-to-create-a-user"),
+ () => i18n.t("user.user-created")
);
},
};
diff --git a/frontend/src/api/siteSettings.js b/frontend/src/api/siteSettings.js
index f5c234af7..504ec339b 100644
--- a/frontend/src/api/siteSettings.js
+++ b/frontend/src/api/siteSettings.js
@@ -1,7 +1,7 @@
import { baseURL } from "./api-utils";
import { apiReq } from "./api-utils";
import { store } from "@/store";
-import i18n from '@/i18n.js';
+import i18n from "@/i18n.js";
const settingsBase = baseURL + "site-settings";
@@ -21,12 +21,12 @@ export const siteSettingsAPI = {
async update(body) {
const response = await apiReq.put(
- settingsURLs.updateSiteSettings,
+ settingsURLs.updateSiteSettings,
body,
- function() { return i18n.t('settings.settings-update-failed'); },
- function() { return i18n.t('settings.settings-updated'); }
+ () => i18n.t("settings.settings-update-failed"),
+ () => i18n.t("settings.settings-updated")
);
- if(response) {
+ if (response) {
store.dispatch("requestSiteSettings");
}
return response;
@@ -44,10 +44,10 @@ export const siteSettingsAPI = {
createPage(body) {
return apiReq.post(
- settingsURLs.customPages,
+ settingsURLs.customPages,
body,
- function() { return i18n.t('page.page-creation-failed'); },
- function() { return i18n.t('page.new-page-created'); }
+ () => i18n.t("page.page-creation-failed"),
+ () => i18n.t("page.new-page-created")
);
},
@@ -55,25 +55,26 @@ export const siteSettingsAPI = {
return await apiReq.delete(
settingsURLs.customPage(id),
null,
- function() { return i18n.t('page.page-deletion-failed'); },
- function() { return i18n.t('page.page-deleted'); });
+ () => i18n.t("page.page-deletion-failed"),
+ () => i18n.t("page.page-deleted")
+ );
},
updatePage(body) {
return apiReq.put(
settingsURLs.customPage(body.id),
body,
- function() { return i18n.t('page.page-update-failed'); },
- function() { return i18n.t('page.page-updated'); }
+ () => i18n.t("page.page-update-failed"),
+ () => i18n.t("page.page-updated")
);
},
async updateAllPages(allPages) {
let response = await apiReq.put(
- settingsURLs.customPages,
+ settingsURLs.customPages,
allPages,
- function() { return i18n.t('page.pages-update-failed'); },
- function() { return i18n.t('page.pages-updated'); }
+ () => i18n.t("page.pages-update-failed"),
+ () => i18n.t("page.pages-updated")
);
return response;
},
diff --git a/frontend/src/api/themes.js b/frontend/src/api/themes.js
index 321091754..cfd433594 100644
--- a/frontend/src/api/themes.js
+++ b/frontend/src/api/themes.js
@@ -1,6 +1,6 @@
import { baseURL } from "./api-utils";
import { apiReq } from "./api-utils";
-import i18n from '@/i18n.js';
+import i18n from "@/i18n.js";
const prefix = baseURL + "themes";
@@ -25,10 +25,11 @@ export const themeAPI = {
async create(postBody) {
return await apiReq.post(
- settingsURLs.createTheme,
+ settingsURLs.createTheme,
postBody,
- function() { return i18n.t('settings.theme.error-creating-theme-see-log-file'); },
- function() { return i18n.t('settings.theme.theme-saved'); });
+ () => i18n.t("settings.theme.error-creating-theme-see-log-file"),
+ () => i18n.t("settings.theme.theme-saved")
+ );
},
update(themeName, colors) {
@@ -37,18 +38,19 @@ export const themeAPI = {
colors: colors,
};
return apiReq.put(
- settingsURLs.updateTheme(themeName),
+ settingsURLs.updateTheme(themeName),
body,
- function() { return i18n.t('settings.theme.error-updating-theme'); },
- function() { return i18n.t('settings.theme.theme-updated'); });
+ () => i18n.t("settings.theme.error-updating-theme"),
+ () => i18n.t("settings.theme.theme-updated")
+ );
},
delete(themeName) {
return apiReq.delete(
settingsURLs.deleteTheme(themeName),
null,
- function() { return i18n.t('settings.theme.error-deleting-theme'); },
- function() { return i18n.t('settings.theme.theme-deleted'); }
+ () => i18n.t("settings.theme.error-deleting-theme"),
+ () => i18n.t("settings.theme.theme-deleted")
);
},
};
diff --git a/frontend/src/api/upload.js b/frontend/src/api/upload.js
index 14ac790f8..3bd9a02be 100644
--- a/frontend/src/api/upload.js
+++ b/frontend/src/api/upload.js
@@ -1,5 +1,5 @@
import { apiReq } from "./api-utils";
-import i18n from '@/i18n.js';
+import i18n from "@/i18n.js";
export const utilsAPI = {
// import { api } from "@/api";
@@ -9,8 +9,8 @@ export const utilsAPI = {
return apiReq.post(
url,
fileObject,
- function() { return i18n.t('general.failure-uploading-file'); },
- function() { return i18n.t('general.file-uploaded'); }
+ () => i18n.t("general.failure-uploading-file"),
+ () => i18n.t("general.file-uploaded")
);
},
};
diff --git a/frontend/src/api/users.js b/frontend/src/api/users.js
index 7d66798ee..11609ff29 100644
--- a/frontend/src/api/users.js
+++ b/frontend/src/api/users.js
@@ -1,7 +1,7 @@
import { baseURL } from "./api-utils";
import { apiReq } from "./api-utils";
import axios from "axios";
-import i18n from '@/i18n.js';
+import i18n from "@/i18n.js";
const authPrefix = baseURL + "auth";
const userPrefix = baseURL + "users";
@@ -19,22 +19,19 @@ const usersURLs = {
};
function deleteErrorText(response) {
- switch(response.data.detail) {
- case 'SUPER_USER':
- return i18n.t('user.error-cannot-delete-super-user');
+ switch (response.data.detail) {
+ case "SUPER_USER":
+ return i18n.t("user.error-cannot-delete-super-user");
default:
- return i18n.t('user.you-are-not-allowed-to-delete-this-user');
+ return i18n.t("user.you-are-not-allowed-to-delete-this-user");
}
}
export const userAPI = {
async login(formData) {
- let response = await apiReq.post(
- authURLs.token,
- formData,
- null,
- function() { return i18n.t('user.user-successfully-logged-in'); }
- );
+ let response = await apiReq.post(authURLs.token, formData, null, function() {
+ return i18n.t("user.user-successfully-logged-in");
+ });
return response;
},
async refresh() {
@@ -49,10 +46,10 @@ export const userAPI = {
},
create(user) {
return apiReq.post(
- usersURLs.users,
+ usersURLs.users,
user,
- function() { return i18n.t('user.user-creation-failed'); },
- function() { return i18n.t('user.user-created'); }
+ () => i18n.t("user.user-creation-failed"),
+ () => i18n.t("user.user-created")
);
},
async self() {
@@ -65,35 +62,32 @@ export const userAPI = {
},
update(user) {
return apiReq.put(
- usersURLs.userID(user.id),
+ usersURLs.userID(user.id),
user,
- function() { return i18n.t('user.user-update-failed'); },
- function() { return i18n.t('user.user-updated'); }
+ () => i18n.t("user.user-update-failed"),
+ () => i18n.t("user.user-updated")
);
},
changePassword(id, password) {
return apiReq.put(
- usersURLs.password(id),
+ usersURLs.password(id),
password,
- function() { return i18n.t('user.existing-password-does-not-match'); },
- function() { return i18n.t('user.password-updated'); }
- );
- },
-
- delete(id) {
- return apiReq.delete(
- usersURLs.userID(id),
- null,
- deleteErrorText,
- function() { return i18n.t('user.user-deleted'); }
+ () => i18n.t("user.existing-password-does-not-match"),
+ () => i18n.t("user.password-updated")
);
},
+
+ delete(id) {
+ return apiReq.delete(usersURLs.userID(id), null, deleteErrorText, function() {
+ return i18n.t("user.user-deleted");
+ });
+ },
resetPassword(id) {
return apiReq.put(
usersURLs.resetPassword(id),
null,
- function() { return i18n.t('user.password-reset-failed'); },
- function() { return i18n.t('user.password-has-been-reset-to-the-default-password'); }
+ () => i18n.t("user.password-reset-failed"),
+ () => i18n.t("user.password-has-been-reset-to-the-default-password")
);
},
};
diff --git a/frontend/src/components/FormHelpers/CategoryTagSelector.vue b/frontend/src/components/FormHelpers/CategoryTagSelector.vue
index 526699086..4a95208b5 100644
--- a/frontend/src/components/FormHelpers/CategoryTagSelector.vue
+++ b/frontend/src/components/FormHelpers/CategoryTagSelector.vue
@@ -31,11 +31,7 @@
-
+
@@ -90,7 +86,7 @@ export default {
computed: {
inputLabel() {
if (!this.showLabel) return null;
- return this.tagSelector ? this.$t('tag.tags') : this.$t('recipe.categories');
+ return this.tagSelector ? this.$t("tag.tags") : this.$t("recipe.categories");
},
activeItems() {
let ItemObjects = [];
@@ -125,5 +121,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/FormHelpers/ColorPickerDialog.vue b/frontend/src/components/FormHelpers/ColorPickerDialog.vue
index 1ad072e81..3c0fc13be 100644
--- a/frontend/src/components/FormHelpers/ColorPickerDialog.vue
+++ b/frontend/src/components/FormHelpers/ColorPickerDialog.vue
@@ -3,21 +3,9 @@
{{ buttonText }}
-
+
-
+
@@ -30,13 +18,7 @@
-
+
{{ color }}
@@ -88,5 +70,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/FormHelpers/DatePicker.vue b/frontend/src/components/FormHelpers/DatePicker.vue
index 2262eb3cb..610ec00a8 100644
--- a/frontend/src/components/FormHelpers/DatePicker.vue
+++ b/frontend/src/components/FormHelpers/DatePicker.vue
@@ -1,8 +1,5 @@
-
+
-
\ No newline at end of file
+
diff --git a/frontend/src/components/FormHelpers/LanguageSelector.vue b/frontend/src/components/FormHelpers/LanguageSelector.vue
index 797157173..ca6621fc1 100644
--- a/frontend/src/components/FormHelpers/LanguageSelector.vue
+++ b/frontend/src/components/FormHelpers/LanguageSelector.vue
@@ -45,4 +45,4 @@ export default {
},
},
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/FormHelpers/TimePickerDialog.vue b/frontend/src/components/FormHelpers/TimePickerDialog.vue
index 35423f9e8..2d5eaf6b9 100644
--- a/frontend/src/components/FormHelpers/TimePickerDialog.vue
+++ b/frontend/src/components/FormHelpers/TimePickerDialog.vue
@@ -1,11 +1,5 @@
-
+
- {{$t('general.cancel')}}
- {{$t('general.ok')}}
+ {{ $t("general.cancel") }}
+ {{ $t("general.ok") }}
@@ -42,7 +36,7 @@ export default {
\ No newline at end of file
+
diff --git a/frontend/src/components/ImportSummaryDialog/DataTable.vue b/frontend/src/components/ImportSummaryDialog/DataTable.vue
index 604615572..8391bc95e 100644
--- a/frontend/src/components/ImportSummaryDialog/DataTable.vue
+++ b/frontend/src/components/ImportSummaryDialog/DataTable.vue
@@ -43,5 +43,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/ImportSummaryDialog/index.vue b/frontend/src/components/ImportSummaryDialog/index.vue
index ef069ddab..1e2dde36f 100644
--- a/frontend/src/components/ImportSummaryDialog/index.vue
+++ b/frontend/src/components/ImportSummaryDialog/index.vue
@@ -63,34 +63,30 @@ export default {
}),
computed: {
-
importHeaders() {
return [
{
- text: this.$t('general.status'),
+ text: this.$t("general.status"),
value: "status",
},
{
- text: this.$t('general.name'),
+ text: this.$t("general.name"),
align: "start",
sortable: true,
value: "name",
},
- {
- text: this.$t('general.exception'),
- value: "data-table-expand",
- align: "center"
+ {
+ text: this.$t("general.exception"),
+ value: "data-table-expand",
+ align: "center",
},
- ]
+ ];
},
recipeNumbers() {
return this.calculateNumbers(this.$t("general.recipes"), this.recipeData);
},
settingsNumbers() {
- return this.calculateNumbers(
- this.$t("general.settings"),
- this.settingsData
- );
+ return this.calculateNumbers(this.$t("general.settings"), this.settingsData);
},
themeNumbers() {
return this.calculateNumbers(this.$t("general.themes"), this.themeData);
@@ -115,14 +111,7 @@ export default {
];
},
allTables() {
- return [
- this.recipeData,
- this.themeData,
- this.settingsData,
- this.pageData,
- this.userData,
- this.groupData,
- ];
+ return [this.recipeData, this.themeData, this.settingsData, this.pageData, this.userData, this.groupData];
},
},
@@ -150,5 +139,4 @@ export default {
};
-
+
diff --git a/frontend/src/components/Login/LoginDialog.vue b/frontend/src/components/Login/LoginDialog.vue
index bf2646f77..fae060b1d 100644
--- a/frontend/src/components/Login/LoginDialog.vue
+++ b/frontend/src/components/Login/LoginDialog.vue
@@ -25,5 +25,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Login/LoginForm.vue b/frontend/src/components/Login/LoginForm.vue
index 4e66c3ac2..18ddc4d56 100644
--- a/frontend/src/components/Login/LoginForm.vue
+++ b/frontend/src/components/Login/LoginForm.vue
@@ -5,14 +5,7 @@
mdi-account
-
-
+
{{ $t("user.login") }}
@@ -42,11 +35,7 @@
@click:append="showPassword = !showPassword"
>
- {{ $t("user.sign-in") }}
@@ -108,5 +97,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Login/SignUpForm.vue b/frontend/src/components/Login/SignUpForm.vue
index 0995bd3b0..d3f651774 100644
--- a/frontend/src/components/Login/SignUpForm.vue
+++ b/frontend/src/components/Login/SignUpForm.vue
@@ -5,21 +5,14 @@
mdi-account
-
-
-
- {{$t('signup.sign-up')}}
+
+
+ {{ $t("signup.sign-up") }}
- {{$t('signup.welcome-to-mealie')}}
+ {{ $t("signup.welcome-to-mealie") }}
-
- {{$t('signup.sign-up')}}
+
+ {{ $t("signup.sign-up") }}
- {{$t('signup.error-signing-up')}}
+ {{ $t("signup.error-signing-up") }}
@@ -138,14 +123,11 @@ export default {
this.$router.push("/");
}
}
-
+
this.loading = false;
-
-
},
},
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/MealPlan/MealPlanCard.vue b/frontend/src/components/MealPlan/MealPlanCard.vue
index 985f039aa..69330e895 100644
--- a/frontend/src/components/MealPlan/MealPlanCard.vue
+++ b/frontend/src/components/MealPlan/MealPlanCard.vue
@@ -1,22 +1,10 @@
-
+
-
+
{{ $d(new Date(meal.date.split("-")), "short") }}
@@ -63,5 +51,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/MealPlan/MealPlanEditor.vue b/frontend/src/components/MealPlan/MealPlanEditor.vue
index f49405bc0..76d489aca 100644
--- a/frontend/src/components/MealPlan/MealPlanEditor.vue
+++ b/frontend/src/components/MealPlan/MealPlanEditor.vue
@@ -44,5 +44,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/MealPlan/MealPlanNew.vue b/frontend/src/components/MealPlan/MealPlanNew.vue
index 212462ff6..fc43cd2d8 100644
--- a/frontend/src/components/MealPlan/MealPlanNew.vue
+++ b/frontend/src/components/MealPlan/MealPlanNew.vue
@@ -180,9 +180,7 @@ export default {
});
},
processTime(index) {
- let dateText = new Date(
- this.actualStartDate.valueOf() + 1000 * 3600 * 24 * index
- );
+ let dateText = new Date(this.actualStartDate.valueOf() + 1000 * 3600 * 24 * index);
return dateText;
},
getDate(index) {
@@ -215,22 +213,10 @@ export default {
return this.$d(date);
},
getNextDayOfTheWeek(dayName, excludeToday = true, refDate = new Date()) {
- const dayOfWeek = [
- "sun",
- "mon",
- "tue",
- "wed",
- "thu",
- "fri",
- "sat",
- ].indexOf(dayName.slice(0, 3).toLowerCase());
+ const dayOfWeek = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"].indexOf(dayName.slice(0, 3).toLowerCase());
if (dayOfWeek < 0) return;
refDate.setUTCHours(0, 0, 0, 0);
- refDate.setDate(
- refDate.getDate() +
- +!!excludeToday +
- ((dayOfWeek + 7 - refDate.getDay() - +!!excludeToday) % 7)
- );
+ refDate.setDate(refDate.getDate() + +!!excludeToday + ((dayOfWeek + 7 - refDate.getDay() - +!!excludeToday) % 7));
return refDate;
},
setQuickWeek() {
@@ -245,5 +231,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/MealPlan/ShoppingListDialog.vue b/frontend/src/components/MealPlan/ShoppingListDialog.vue
index a3b635402..13203bd40 100644
--- a/frontend/src/components/MealPlan/ShoppingListDialog.vue
+++ b/frontend/src/components/MealPlan/ShoppingListDialog.vue
@@ -3,28 +3,21 @@
- {{$t('meal-plan.shopping-list')}}
+ {{ $t("meal-plan.shopping-list") }}
- {{$t('meal-plan.group')}}
+ {{ $t("meal-plan.group") }}
-
+
{{ recipe.name }}
-
+
@@ -104,8 +97,4 @@ export default {
};
-
-
-
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/ContextMenu.vue b/frontend/src/components/Recipe/ContextMenu.vue
index c4c8b3b14..b8f221b0e 100644
--- a/frontend/src/components/Recipe/ContextMenu.vue
+++ b/frontend/src/components/Recipe/ContextMenu.vue
@@ -10,14 +10,7 @@
/>
-
+
{{ menuIcon }}
@@ -136,4 +129,4 @@ export default {
},
},
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/EditorButtonRow.vue b/frontend/src/components/Recipe/EditorButtonRow.vue
index 9852c7be9..6c043d156 100644
--- a/frontend/src/components/Recipe/EditorButtonRow.vue
+++ b/frontend/src/components/Recipe/EditorButtonRow.vue
@@ -18,14 +18,7 @@
-
+
mdi-delete
@@ -101,5 +94,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/MobileRecipeCard.vue b/frontend/src/components/Recipe/MobileRecipeCard.vue
index 08ea424a7..f7a493028 100644
--- a/frontend/src/components/Recipe/MobileRecipeCard.vue
+++ b/frontend/src/components/Recipe/MobileRecipeCard.vue
@@ -1,31 +1,14 @@
-
+
-
+
{{ name }}
{{ description }}
-
+
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/Parts/Assets.vue b/frontend/src/components/Recipe/Parts/Assets.vue
index c8a094d5b..bb8417805 100644
--- a/frontend/src/components/Recipe/Parts/Assets.vue
+++ b/frontend/src/components/Recipe/Parts/Assets.vue
@@ -11,10 +11,7 @@
-
+
-
+
mdi-plus
-
+
-
+
@@ -69,12 +52,7 @@
{{ item }}
-
+
{{ fileObject.name }}
@@ -109,13 +87,7 @@ export default {
name: "",
icon: "mdi-file",
},
- iconOptions: [
- "mdi-file",
- "mdi-file-pdf-box",
- "mdi-file-image",
- "mdi-code-json",
- "mdi-silverware-fork-knife",
- ],
+ iconOptions: ["mdi-file", "mdi-file-pdf-box", "mdi-file-image", "mdi-code-json", "mdi-silverware-fork-knife"],
menu: [
{
title: "Link 1",
@@ -156,5 +128,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/Parts/Helpers/BulkAdd.vue b/frontend/src/components/Recipe/Parts/Helpers/BulkAdd.vue
index aba3835c5..cd9db02a5 100644
--- a/frontend/src/components/Recipe/Parts/Helpers/BulkAdd.vue
+++ b/frontend/src/components/Recipe/Parts/Helpers/BulkAdd.vue
@@ -2,24 +2,17 @@
-
- {{$t('new-recipe.bulk-add')}}
+
+ {{ $t("new-recipe.bulk-add") }}
- {{$t('new-recipe.bulk-add')}}
+ {{ $t("new-recipe.bulk-add") }}
- {{$t('new-recipe.paste-in-your-recipe-data-each-line-will-be-treated-as-an-item-in-a-list')}}
+ {{ $t("new-recipe.paste-in-your-recipe-data-each-line-will-be-treated-as-an-item-in-a-list") }}
@@ -28,7 +21,7 @@
- {{$t('general.save')}}
+ {{ $t("general.save") }}
@@ -61,4 +54,4 @@ export default {
},
},
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/Parts/Helpers/ExtrasEditor.vue b/frontend/src/components/Recipe/Parts/Helpers/ExtrasEditor.vue
index 6acf9165b..c0351e51d 100644
--- a/frontend/src/components/Recipe/Parts/Helpers/ExtrasEditor.vue
+++ b/frontend/src/components/Recipe/Parts/Helpers/ExtrasEditor.vue
@@ -9,34 +9,17 @@
{{ $t("recipe.api-extras") }}
-
+
-
+
mdi-delete
-
-
+
-
-
+
@@ -74,9 +57,8 @@ export default {
dialog: false,
formKey: 1,
rules: {
- required: (v) => !!v || this.$i18n.t("recipe.key-name-required"),
- whiteSpace: (v) =>
- !v || v.split(" ").length <= 1 || this.$i18n.t("recipe.no-white-space-allowed"),
+ required: v => !!v || this.$i18n.t("recipe.key-name-required"),
+ whiteSpace: v => !v || v.split(" ").length <= 1 || this.$i18n.t("recipe.no-white-space-allowed"),
},
};
},
@@ -100,5 +82,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/Parts/Helpers/ImageUploadBtn.vue b/frontend/src/components/Recipe/Parts/Helpers/ImageUploadBtn.vue
index 8b4086a14..dc5505455 100644
--- a/frontend/src/components/Recipe/Parts/Helpers/ImageUploadBtn.vue
+++ b/frontend/src/components/Recipe/Parts/Helpers/ImageUploadBtn.vue
@@ -25,19 +25,9 @@
-
+
-
+
{{ $t("general.get") }}
@@ -80,5 +70,4 @@ export default {
};
-
+
diff --git a/frontend/src/components/Recipe/Parts/Helpers/SettingsMenu.vue b/frontend/src/components/Recipe/Parts/Helpers/SettingsMenu.vue
index 24464579f..bc598de8c 100644
--- a/frontend/src/components/Recipe/Parts/Helpers/SettingsMenu.vue
+++ b/frontend/src/components/Recipe/Parts/Helpers/SettingsMenu.vue
@@ -12,7 +12,7 @@
- {{$t('recipe.recipe-settings')}}
+ {{ $t("recipe.recipe-settings") }}
@@ -43,17 +43,16 @@ export default {
computed: {
labels() {
return {
- public: this.$t('recipe.public-recipe'),
- showNutrition: this.$t('recipe.show-nutrition-values'),
- showAssets: this.$t('recipe.show-assets'),
- landscapeView: this.$t('recipe.landscape-view-coming-soon'),
- };
- }
+ public: this.$t("recipe.public-recipe"),
+ showNutrition: this.$t("recipe.show-nutrition-values"),
+ showAssets: this.$t("recipe.show-assets"),
+ landscapeView: this.$t("recipe.landscape-view-coming-soon"),
+ };
+ },
},
-
+
methods: {},
};
-
+
diff --git a/frontend/src/components/Recipe/Parts/Ingredients.vue b/frontend/src/components/Recipe/Parts/Ingredients.vue
index b1a8c8fe1..93d7e1a06 100644
--- a/frontend/src/components/Recipe/Parts/Ingredients.vue
+++ b/frontend/src/components/Recipe/Parts/Ingredients.vue
@@ -2,18 +2,9 @@
{{ $t("recipe.ingredients") }}
-
+
-
+
mdi-arrow-up-down
-
+
mdi-delete
@@ -56,20 +42,10 @@
:key="generateKey('ingredient', index)"
@click="toggleChecked(index)"
>
-
-
+
-
-
+
@@ -130,8 +106,8 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/Parts/Instructions.vue b/frontend/src/components/Recipe/Parts/Instructions.vue
index 9b222d5bb..b80fe0fc3 100644
--- a/frontend/src/components/Recipe/Parts/Instructions.vue
+++ b/frontend/src/components/Recipe/Parts/Instructions.vue
@@ -3,13 +3,7 @@
{{ $t("recipe.instructions") }}
-
+
@@ -46,16 +40,8 @@
mdi-delete
{{ $t("recipe.step-index", { step: index + 1 }) }}
-
- {{
- !showTitleEditor[index] ? "Insert Section" : "Remove Section"
- }}
+
+ {{ !showTitleEditor[index] ? "Insert Section" : "Remove Section" }}
@@ -144,5 +130,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/Parts/Notes.vue b/frontend/src/components/Recipe/Parts/Notes.vue
index 2827f2482..cc38d8b8d 100644
--- a/frontend/src/components/Recipe/Parts/Notes.vue
+++ b/frontend/src/components/Recipe/Parts/Notes.vue
@@ -1,36 +1,17 @@
{{ $t("recipe.note") }}
-
+
-
+
mdi-delete
-
+
-
-
+
@@ -83,5 +64,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/Parts/Nutrition.vue b/frontend/src/components/Recipe/Parts/Nutrition.vue
index 9686913a1..950bb0baa 100644
--- a/frontend/src/components/Recipe/Parts/Nutrition.vue
+++ b/frontend/src/components/Recipe/Parts/Nutrition.vue
@@ -97,5 +97,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/Parts/Rating.vue b/frontend/src/components/Recipe/Parts/Rating.vue
index dfd06d088..701917288 100644
--- a/frontend/src/components/Recipe/Parts/Rating.vue
+++ b/frontend/src/components/Recipe/Parts/Rating.vue
@@ -59,5 +59,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/RecipeCard.vue b/frontend/src/components/Recipe/RecipeCard.vue
index 4e1595608..062dd377e 100644
--- a/frontend/src/components/Recipe/RecipeCard.vue
+++ b/frontend/src/components/Recipe/RecipeCard.vue
@@ -9,11 +9,7 @@
>
-
+
{{ description | truncate(300) }}
@@ -29,13 +25,7 @@
-
+
@@ -93,4 +83,4 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/RecipeEditor/index.vue b/frontend/src/components/Recipe/RecipeEditor/index.vue
index 6ebac75d5..ef735d13d 100644
--- a/frontend/src/components/Recipe/RecipeEditor/index.vue
+++ b/frontend/src/components/Recipe/RecipeEditor/index.vue
@@ -2,61 +2,24 @@
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
+
@@ -98,11 +61,7 @@
-
+
@@ -177,4 +136,4 @@ export default {
.my-divider {
margin: 0 -1px;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/RecipePrint.vue b/frontend/src/components/Recipe/RecipePrint.vue
index e23d700ef..5fc68d7cb 100644
--- a/frontend/src/components/Recipe/RecipePrint.vue
+++ b/frontend/src/components/Recipe/RecipePrint.vue
@@ -3,35 +3,16 @@
-
+
mdi-arrow-left
Font Size
-
+
mdi-minus
-
+
mdi-plus
@@ -52,8 +33,7 @@
-
-
+
@@ -104,37 +84,20 @@
Categories
-
+
{{ category }}
Tags
-
+
{{ tag }}
Notes
-
+
{{ note.title }}
{{ note.text }}
@@ -196,4 +159,4 @@ export default {
.column-wrapper {
column-count: 2;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/RecipeTimeCard.vue b/frontend/src/components/Recipe/RecipeTimeCard.vue
index 0c93fd7d9..dafd8d85d 100644
--- a/frontend/src/components/Recipe/RecipeTimeCard.vue
+++ b/frontend/src/components/Recipe/RecipeTimeCard.vue
@@ -35,31 +35,19 @@ export default {
},
computed: {
showCards() {
- return [this.prepTime, this.totalTime, this.performTime].some(
- x => !this.isEmpty(x)
- );
+ return [this.prepTime, this.totalTime, this.performTime].some(x => !this.isEmpty(x));
},
allTimes() {
- return [
- this.validateTotalTime,
- this.validatePrepTime,
- this.validatePerformTime,
- ].filter(x => x !== null);
+ return [this.validateTotalTime, this.validatePrepTime, this.validatePerformTime].filter(x => x !== null);
},
validateTotalTime() {
- return !this.isEmpty(this.totalTime)
- ? { name: this.$t("recipe.total-time"), value: this.totalTime }
- : null;
+ return !this.isEmpty(this.totalTime) ? { name: this.$t("recipe.total-time"), value: this.totalTime } : null;
},
validatePrepTime() {
- return !this.isEmpty(this.prepTime)
- ? { name: this.$t("recipe.prep-time"), value: this.prepTime }
- : null;
+ return !this.isEmpty(this.prepTime) ? { name: this.$t("recipe.prep-time"), value: this.prepTime } : null;
},
validatePerformTime() {
- return !this.isEmpty(this.performTime)
- ? { name: this.$t("recipe.perform-time"), value: this.performTime }
- : null;
+ return !this.isEmpty(this.performTime) ? { name: this.$t("recipe.perform-time"), value: this.performTime } : null;
},
},
methods: {
@@ -77,4 +65,4 @@ export default {
.custom-transparent {
opacity: 0.7;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/RecipeViewer/RecipeChips.vue b/frontend/src/components/Recipe/RecipeViewer/RecipeChips.vue
index de8d9a4b4..a8d62aa7a 100644
--- a/frontend/src/components/Recipe/RecipeViewer/RecipeChips.vue
+++ b/frontend/src/components/Recipe/RecipeViewer/RecipeChips.vue
@@ -62,5 +62,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/Recipe/RecipeViewer/index.vue b/frontend/src/components/Recipe/RecipeViewer/index.vue
index 9fcac6df6..aef80568c 100644
--- a/frontend/src/components/Recipe/RecipeViewer/index.vue
+++ b/frontend/src/components/Recipe/RecipeViewer/index.vue
@@ -21,7 +21,7 @@
{{ yields }}
-
+
@@ -50,11 +50,7 @@
-
+
@@ -150,4 +146,4 @@ export default {
.my-divider {
margin: 0 -1px;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/components/UI/Buttons/TheDownloadBtn.vue b/frontend/src/components/UI/Buttons/TheDownloadBtn.vue
index bc13898d6..4a26e97d2 100644
--- a/frontend/src/components/UI/Buttons/TheDownloadBtn.vue
+++ b/frontend/src/components/UI/Buttons/TheDownloadBtn.vue
@@ -47,5 +47,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/UI/Buttons/TheUploadBtn.vue b/frontend/src/components/UI/Buttons/TheUploadBtn.vue
index 534734fc3..7845d2933 100644
--- a/frontend/src/components/UI/Buttons/TheUploadBtn.vue
+++ b/frontend/src/components/UI/Buttons/TheUploadBtn.vue
@@ -1,12 +1,7 @@
-
+
{{ icon }}
{{ text ? text : defaultText }}
@@ -55,7 +50,7 @@ export default {
let formData = new FormData();
formData.append(this.fileName, this.file);
- if(await api.utils.uploadFile(this.url, formData)) {
+ if (await api.utils.uploadFile(this.url, formData)) {
this.$emit(UPLOAD_EVENT);
}
this.isSelecting = false;
@@ -81,5 +76,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/UI/CardSection.vue b/frontend/src/components/UI/CardSection.vue
index dd6efb0f3..6a5530a70 100644
--- a/frontend/src/components/UI/CardSection.vue
+++ b/frontend/src/components/UI/CardSection.vue
@@ -22,14 +22,10 @@
- {{
- $t("general.recent")
- }}
+ {{ $t("general.recent") }}
- {{
- $t("general.sort-alphabetically")
- }}
+ {{ $t("general.sort-alphabetically") }}
@@ -39,14 +35,7 @@
-
+
this.cardLimit) {
this.setLoader();
@@ -172,4 +158,4 @@ export default {
.transparent {
opacity: 1;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/components/UI/Dialogs/BaseDialog.vue b/frontend/src/components/UI/Dialogs/BaseDialog.vue
index 4109d9a49..8030d65c2 100644
--- a/frontend/src/components/UI/Dialogs/BaseDialog.vue
+++ b/frontend/src/components/UI/Dialogs/BaseDialog.vue
@@ -1,11 +1,7 @@
-
+
@@ -14,20 +10,16 @@
{{ title }}
-
+
- {{$t('general.cancel')}}
+ {{ $t("general.cancel") }}
- {{$t('general.submit')}}
+ {{ $t("general.submit") }}
@@ -84,4 +76,4 @@ export default {
.top-dialog {
align-self: flex-start;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/components/UI/Dialogs/ConfirmationDialog.vue b/frontend/src/components/UI/Dialogs/ConfirmationDialog.vue
index 11b062e06..5f28d208b 100644
--- a/frontend/src/components/UI/Dialogs/ConfirmationDialog.vue
+++ b/frontend/src/components/UI/Dialogs/ConfirmationDialog.vue
@@ -1,4 +1,3 @@
-
-
-
+
@@ -17,11 +15,7 @@
-
+
@@ -139,5 +133,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/UI/Dialogs/NewCategoryTagDialog.vue b/frontend/src/components/UI/Dialogs/NewCategoryTagDialog.vue
index 69c0c1588..fc64f342f 100644
--- a/frontend/src/components/UI/Dialogs/NewCategoryTagDialog.vue
+++ b/frontend/src/components/UI/Dialogs/NewCategoryTagDialog.vue
@@ -21,12 +21,7 @@
-
+
@@ -103,5 +98,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/UI/Search/FuseSearchBar.vue b/frontend/src/components/UI/Search/FuseSearchBar.vue
index 08152fbdf..e721c47c7 100644
--- a/frontend/src/components/UI/Search/FuseSearchBar.vue
+++ b/frontend/src/components/UI/Search/FuseSearchBar.vue
@@ -61,9 +61,7 @@ export default {
try {
this.results = this.fuse.search(this.search.trim());
} catch {
- this.results = this.rawData
- .map(x => ({ item: x }))
- .sort((a, b) => (a.name > b.name ? 1 : -1));
+ this.results = this.rawData.map(x => ({ item: x })).sort((a, b) => (a.name > b.name ? 1 : -1));
}
this.$emit(RESULTS_EVENT, this.results);
@@ -75,5 +73,4 @@ export default {
};
-
+
diff --git a/frontend/src/components/UI/Search/SearchBar.vue b/frontend/src/components/UI/Search/SearchBar.vue
index 964fa72a0..ef256ceef 100644
--- a/frontend/src/components/UI/Search/SearchBar.vue
+++ b/frontend/src/components/UI/Search/SearchBar.vue
@@ -1,11 +1,5 @@
-
+
-
+
Results
@@ -56,22 +45,10 @@
-
-
-
-
-
-
-
+
+
+
+
@@ -153,9 +130,7 @@ export default {
try {
this.result = this.fuse.search(this.search.trim());
} catch {
- this.result = this.data
- .map(x => ({ item: x }))
- .sort((a, b) => (a.name > b.name ? 1 : -1));
+ this.result = this.data.map(x => ({ item: x })).sort((a, b) => (a.name > b.name ? 1 : -1));
}
this.$emit("results", this.result);
@@ -173,10 +148,7 @@ export default {
if (!this.search) {
return string;
}
- return string.replace(
- new RegExp(this.search, "gi"),
- match => `${match} `
- );
+ return string.replace(new RegExp(this.search, "gi"), match => `${match} `);
},
getImage(image) {
return api.recipes.recipeTinyImage(image);
@@ -221,4 +193,4 @@ export default {
&, & > *
display: flex
flex-direction: column
-
\ No newline at end of file
+
diff --git a/frontend/src/components/UI/Search/SearchDialog.vue b/frontend/src/components/UI/Search/SearchDialog.vue
index 022e53135..efbeafa93 100644
--- a/frontend/src/components/UI/Search/SearchDialog.vue
+++ b/frontend/src/components/UI/Search/SearchDialog.vue
@@ -1,12 +1,6 @@
-
+
\ No newline at end of file
+
diff --git a/frontend/src/components/UI/TheAppBar.vue b/frontend/src/components/UI/TheAppBar.vue
index 89e027d81..b3bc0f93a 100644
--- a/frontend/src/components/UI/TheAppBar.vue
+++ b/frontend/src/components/UI/TheAppBar.vue
@@ -1,15 +1,7 @@
-
+
mdi-menu
@@ -36,7 +28,7 @@
mdi-magnify
-
+
@@ -90,5 +82,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/UI/TheRecipeFab.vue b/frontend/src/components/UI/TheRecipeFab.vue
index 30219b80d..6ae906130 100644
--- a/frontend/src/components/UI/TheRecipeFab.vue
+++ b/frontend/src/components/UI/TheRecipeFab.vue
@@ -6,14 +6,7 @@
mdi-link
-
-
+
{{ $t("new-recipe.from-url") }}
@@ -54,21 +47,9 @@
-
+
-
+
mdi-plus
@@ -132,5 +113,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/components/UI/TheSidebar.vue b/frontend/src/components/UI/TheSidebar.vue
index d36e7066a..834c60d97 100644
--- a/frontend/src/components/UI/TheSidebar.vue
+++ b/frontend/src/components/UI/TheSidebar.vue
@@ -4,11 +4,7 @@
-
+
{{ initials }}
@@ -16,21 +12,14 @@
{{ user.fullName }}
-
- {{ user.admin ? "Admin" : "User" }}
+ {{ user.admin ? "Admin" : "User" }}
-
+
{{ nav.icon }}
@@ -228,15 +217,12 @@ export default {
this.showSidebar = false;
},
async getVersion() {
- let response = await axios.get(
- "https://api.github.com/repos/hay-kot/mealie/releases/latest",
- {
- headers: {
- "content-type": "application/json",
- Authorization: null,
- },
- }
- );
+ let response = await axios.get("https://api.github.com/repos/hay-kot/mealie/releases/latest", {
+ headers: {
+ "content-type": "application/json",
+ Authorization: null,
+ },
+ });
this.latestVersion = response.data.tag_name;
},
@@ -250,4 +236,4 @@ export default {
bottom: 0 !important;
width: 100%;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/components/UI/TheSiteMenu.vue b/frontend/src/components/UI/TheSiteMenu.vue
index 5f4255f75..7c03cc174 100644
--- a/frontend/src/components/UI/TheSiteMenu.vue
+++ b/frontend/src/components/UI/TheSiteMenu.vue
@@ -1,15 +1,7 @@
-
+
mdi-account
@@ -49,7 +41,7 @@ export default {
return [
{
icon: "mdi-account",
- title: this.$t('user.login'),
+ title: this.$t("user.login"),
restricted: false,
login: true,
},
@@ -83,7 +75,7 @@ export default {
nav: "/admin",
restricted: true,
},
- ]
+ ];
},
filteredItems() {
if (this.loggedIn) {
@@ -108,4 +100,4 @@ export default {
.menu-text {
text-align: left !important;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/i18n.js b/frontend/src/i18n.js
index e63f45a8c..586cdd5b1 100644
--- a/frontend/src/i18n.js
+++ b/frontend/src/i18n.js
@@ -3,7 +3,6 @@ import VueI18n from "vue-i18n";
Vue.use(VueI18n);
-
function parseLocaleFiles(locales) {
const messages = {};
locales.keys().forEach(key => {
@@ -17,27 +16,18 @@ function parseLocaleFiles(locales) {
}
function loadLocaleMessages() {
- const locales = require.context(
- "./locales/messages",
- true,
- /[A-Za-z0-9-_,\s]+\.json$/i
- );
+ const locales = require.context("./locales/messages", true, /[A-Za-z0-9-_,\s]+\.json$/i);
return parseLocaleFiles(locales);
}
function loadDateTimeFormats() {
- const locales = require.context(
- "./locales/dateTimeFormats",
- true,
- /[A-Za-z0-9-_,\s]+\.json$/i
- );
+ const locales = require.context("./locales/dateTimeFormats", true, /[A-Za-z0-9-_,\s]+\.json$/i);
return parseLocaleFiles(locales);
}
-
export default new VueI18n({
locale: "en-US",
fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || "en-US",
messages: loadLocaleMessages(),
- dateTimeFormats: loadDateTimeFormats()
+ dateTimeFormats: loadDateTimeFormats(),
});
diff --git a/frontend/src/main.js b/frontend/src/main.js
index 04f112a29..49fc92783 100644
--- a/frontend/src/main.js
+++ b/frontend/src/main.js
@@ -22,7 +22,7 @@ const vueApp = new Vue({
}).$mount("#app");
// Truncate
-let truncate = function(text, length, clamp) {
+const truncate = function(text, length, clamp) {
clamp = clamp || "...";
let node = document.createElement("div");
node.innerHTML = text;
@@ -30,7 +30,7 @@ let truncate = function(text, length, clamp) {
return content.length > length ? content.slice(0, length) + clamp : content;
};
-let titleCase = function(value) {
+const titleCase = function(value) {
return value.replace(/(?:^|\s|-)\S/g, x => x.toUpperCase());
};
diff --git a/frontend/src/mixins/validators.js b/frontend/src/mixins/validators.js
index 243af34d1..553ddd078 100644
--- a/frontend/src/mixins/validators.js
+++ b/frontend/src/mixins/validators.js
@@ -1,21 +1,13 @@
export const validators = {
data() {
return {
- emailRule: v =>
- !v ||
- /^[^@\s]+@[^@\s.]+.[^@.\s]+$/.test(v) ||
- this.$t("user.e-mail-must-be-valid"),
+ emailRule: v => !v || /^[^@\s]+@[^@\s.]+.[^@.\s]+$/.test(v) || this.$t("user.e-mail-must-be-valid"),
existsRule: value => !!value || this.$t("general.field-required"),
- minRule: v =>
- v.length >= 8 ||
- this.$t("user.use-8-characters-or-more-for-your-password"),
+ minRule: v => v.length >= 8 || this.$t("user.use-8-characters-or-more-for-your-password"),
- whiteSpace: v =>
- !v ||
- v.split(" ").length <= 1 ||
- this.$t("recipe.no-white-space-allowed"),
+ whiteSpace: v => !v || v.split(" ").length <= 1 || this.$t("recipe.no-white-space-allowed"),
};
},
};
diff --git a/frontend/src/pages/404Page.vue b/frontend/src/pages/404Page.vue
index 0b31adbfb..bf4f195db 100644
--- a/frontend/src/pages/404Page.vue
+++ b/frontend/src/pages/404Page.vue
@@ -5,9 +5,9 @@
- {{$t('404.page-not-found')}}
+ {{ $t("404.page-not-found") }}
- {{$t('404.take-me-home')}}
+ {{ $t("404.take-me-home") }}
@@ -19,5 +19,4 @@
export default {};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/About/index.vue b/frontend/src/pages/Admin/About/index.vue
index b2b188a7e..efbb5b843 100644
--- a/frontend/src/pages/Admin/About/index.vue
+++ b/frontend/src/pages/Admin/About/index.vue
@@ -2,7 +2,7 @@
- {{$t('about.about-mealie')}}
+ {{ $t("about.about-mealie") }}
@@ -22,14 +22,8 @@
-
-
+
+
@@ -55,42 +49,42 @@ export default {
this.prettyInfo = [
{
- name: this.$t('about.version'),
+ name: this.$t("about.version"),
icon: "mdi-information",
value: debugInfo.version,
},
{
- name: this.$t('about.application-mode'),
+ name: this.$t("about.application-mode"),
icon: "mdi-dev-to",
- value: debugInfo.production ? this.$t('about.production') : this.$t('about.development'),
+ value: debugInfo.production ? this.$t("about.production") : this.$t("about.development"),
},
{
- name: this.$t('about.demo-status'),
+ name: this.$t("about.demo-status"),
icon: "mdi-test-tube",
- value: debugInfo.demoStatus ? this.$t('about.demo') : this.$t('about.not-demo'),
+ value: debugInfo.demoStatus ? this.$t("about.demo") : this.$t("about.not-demo"),
},
{
- name: this.$t('about.api-port'),
+ name: this.$t("about.api-port"),
icon: "mdi-api",
value: debugInfo.apiPort,
},
{
- name: this.$t('about.api-docs'),
+ name: this.$t("about.api-docs"),
icon: "mdi-file-document",
- value: debugInfo.apiDocs ? this.$t('general.enabled') : this.$t('general.disabled'),
+ value: debugInfo.apiDocs ? this.$t("general.enabled") : this.$t("general.disabled"),
},
{
- name: this.$t('about.database-type'),
+ name: this.$t("about.database-type"),
icon: "mdi-database",
value: debugInfo.dbType,
},
{
- name: this.$t('about.sqlite-file'),
+ name: this.$t("about.sqlite-file"),
icon: "mdi-file-cabinet",
value: debugInfo.sqliteFile,
},
{
- name: this.$t('about.default-group'),
+ name: this.$t("about.default-group"),
icon: "mdi-account-group",
value: debugInfo.defaultGroup,
},
@@ -100,5 +94,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Backup/AvailableBackupCard.vue b/frontend/src/pages/Admin/Backup/AvailableBackupCard.vue
index e7208ee43..591b31b82 100644
--- a/frontend/src/pages/Admin/Backup/AvailableBackupCard.vue
+++ b/frontend/src/pages/Admin/Backup/AvailableBackupCard.vue
@@ -8,15 +8,7 @@
@delete="deleteBackup"
/>
-
+
@@ -63,13 +55,12 @@ export default {
async importBackup(data) {
this.$emit("loading");
const response = await api.backups.import(data.name, data);
- if(response) {
+ if (response) {
let importData = response.data;
this.$emit("finished", importData);
} else {
this.$emit("finished");
}
-
},
async deleteBackup(data) {
this.$emit("loading");
@@ -85,5 +76,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Backup/ImportDialog.vue b/frontend/src/pages/Admin/Backup/ImportDialog.vue
index 9af3e31d2..9d4aceef3 100644
--- a/frontend/src/pages/Admin/Backup/ImportDialog.vue
+++ b/frontend/src/pages/Admin/Backup/ImportDialog.vue
@@ -1,10 +1,6 @@
-
+
@@ -42,12 +38,7 @@
{{ $t("general.delete") }}
-
+
{{ $t("general.import") }}
@@ -56,7 +47,6 @@
-
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Backup/ImportOptions.vue b/frontend/src/pages/Admin/Backup/ImportOptions.vue
index fcb72508c..35e783c06 100644
--- a/frontend/src/pages/Admin/Backup/ImportOptions.vue
+++ b/frontend/src/pages/Admin/Backup/ImportOptions.vue
@@ -63,5 +63,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Backup/NewBackupCard.vue b/frontend/src/pages/Admin/Backup/NewBackupCard.vue
index 1d4a09de1..e7d903a12 100644
--- a/frontend/src/pages/Admin/Backup/NewBackupCard.vue
+++ b/frontend/src/pages/Admin/Backup/NewBackupCard.vue
@@ -2,11 +2,7 @@
{{ $t("settings.backup.create-heading") }}
-
+
@@ -101,7 +97,6 @@ export default {
this.$emit("created");
}
this.loading = false;
-
},
appendTemplate(templateName) {
if (this.selectedTemplates.includes(templateName)) {
@@ -115,5 +110,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Backup/index.vue b/frontend/src/pages/Admin/Backup/index.vue
index 71090c196..6644901b5 100644
--- a/frontend/src/pages/Admin/Backup/index.vue
+++ b/frontend/src/pages/Admin/Backup/index.vue
@@ -20,19 +20,11 @@
{{ $t("settings.available-backups") }}
-
+
-
+
@@ -80,5 +72,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/ManageUsers/GroupCard.vue b/frontend/src/pages/Admin/ManageUsers/GroupCard.vue
index d2f17c3fd..b699ee760 100644
--- a/frontend/src/pages/Admin/ManageUsers/GroupCard.vue
+++ b/frontend/src/pages/Admin/ManageUsers/GroupCard.vue
@@ -17,9 +17,7 @@
{{ group.name }}
- {{
- $t("group.group-id-with-value", { groupID: group.id })
- }}
+ {{ $t("group.group-id-with-value", { groupID: group.id }) }}
@@ -36,12 +34,7 @@
-
+
{{ $t("general.delete") }}
@@ -113,9 +106,7 @@ export default {
{
text: this.$t("user.webhooks-enabled"),
icon: "mdi-webhook",
- value: this.group.webhookEnable
- ? this.$t("general.yes")
- : this.$t("general.no"),
+ value: this.group.webhookEnable ? this.$t("general.yes") : this.$t("general.no"),
},
{
text: this.$t("user.webhook-time"),
@@ -128,5 +119,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/ManageUsers/GroupDashboard.vue b/frontend/src/pages/Admin/ManageUsers/GroupDashboard.vue
index f8158a6dd..359e6bbb5 100644
--- a/frontend/src/pages/Admin/ManageUsers/GroupDashboard.vue
+++ b/frontend/src/pages/Admin/ManageUsers/GroupDashboard.vue
@@ -16,14 +16,7 @@
-
+
{{ $t("group.create-group") }}
@@ -63,18 +56,8 @@
-
-
+
+
@@ -114,5 +97,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/ManageUsers/TheSignUpTable.vue b/frontend/src/pages/Admin/ManageUsers/TheSignUpTable.vue
index e77d812a6..6deac3ce1 100644
--- a/frontend/src/pages/Admin/ManageUsers/TheSignUpTable.vue
+++ b/frontend/src/pages/Admin/ManageUsers/TheSignUpTable.vue
@@ -48,10 +48,7 @@
:rules="[existsRule]"
validate-on-blur
>
-
+
@@ -73,13 +70,7 @@
{{ `${baseURL}/sign-up/${item.token}` }}
-
+
mdi-content-copy
@@ -239,5 +230,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/ManageUsers/TheUserTable.vue b/frontend/src/pages/Admin/ManageUsers/TheUserTable.vue
index 9f7c40f24..b177b1258 100644
--- a/frontend/src/pages/Admin/ManageUsers/TheUserTable.vue
+++ b/frontend/src/pages/Admin/ManageUsers/TheUserTable.vue
@@ -84,17 +84,14 @@
>
-
+
- {{$t('user.reset-password')}}
+ {{ $t("user.reset-password") }}
@@ -110,12 +107,7 @@
-
+
@@ -192,9 +184,7 @@ export default {
computed: {
formTitle() {
- return this.createMode
- ? this.$t("user.new-user")
- : this.$t("user.edit-user");
+ return this.createMode ? this.$t("user.new-user") : this.$t("user.edit-user");
},
createMode() {
return this.editedIndex === -1 ? true : false;
@@ -274,21 +264,20 @@ export default {
resetPassword() {
api.users.resetPassword(this.editedItem.id);
},
-
+
async createUser() {
- if(await api.users.create(this.editedItem)) {
+ if (await api.users.create(this.editedItem)) {
this.close();
}
},
async updateUser() {
- if(await api.users.update(this.editedItem)) {
+ if (await api.users.update(this.editedItem)) {
this.close();
}
- }
+ },
},
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/ManageUsers/index.vue b/frontend/src/pages/Admin/ManageUsers/index.vue
index 5c465e594..fbbb1aef5 100644
--- a/frontend/src/pages/Admin/ManageUsers/index.vue
+++ b/frontend/src/pages/Admin/ManageUsers/index.vue
@@ -1,13 +1,7 @@
-
+
@@ -58,5 +52,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/MealPlanner/index.vue b/frontend/src/pages/Admin/MealPlanner/index.vue
index 1445ba899..51461f5ba 100644
--- a/frontend/src/pages/Admin/MealPlanner/index.vue
+++ b/frontend/src/pages/Admin/MealPlanner/index.vue
@@ -14,11 +14,7 @@
v-model="groupSettings.categories"
:return-object="true"
:show-add="true"
- :hint="
- $t(
- 'meal-plan.only-recipes-with-these-categories-will-be-used-in-meal-plans'
- )
- "
+ :hint="$t('meal-plan.only-recipes-with-these-categories-will-be-used-in-meal-plans')"
/>
@@ -36,11 +32,7 @@
-
+
mdi-webhook
@@ -48,12 +40,7 @@
-
+
mdi-minus
@@ -147,5 +134,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Migration/MigrationCard.vue b/frontend/src/pages/Admin/Migration/MigrationCard.vue
index 70ee1e67c..74026036c 100644
--- a/frontend/src/pages/Admin/Migration/MigrationCard.vue
+++ b/frontend/src/pages/Admin/Migration/MigrationCard.vue
@@ -16,12 +16,7 @@
{{ description }}
-
+
@@ -42,13 +37,7 @@
{{ $t("general.delete") }}
-
+
{{ $t("general.import") }}
@@ -102,5 +91,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Migration/MigrationDialog.vue b/frontend/src/pages/Admin/Migration/MigrationDialog.vue
index 478a92ac9..6a520bca0 100644
--- a/frontend/src/pages/Admin/Migration/MigrationDialog.vue
+++ b/frontend/src/pages/Admin/Migration/MigrationDialog.vue
@@ -1,5 +1,3 @@
-
-
@@ -105,5 +103,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Migration/index.vue b/frontend/src/pages/Admin/Migration/index.vue
index 76b84f823..441d28def 100644
--- a/frontend/src/pages/Admin/Migration/index.vue
+++ b/frontend/src/pages/Admin/Migration/index.vue
@@ -8,15 +8,7 @@
-
+
-
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Profile/index.vue b/frontend/src/pages/Admin/Profile/index.vue
index d25b1d003..106d4b989 100644
--- a/frontend/src/pages/Admin/Profile/index.vue
+++ b/frontend/src/pages/Admin/Profile/index.vue
@@ -4,14 +4,7 @@
-
-
+
{{ $t("settings.profile") }}
@@ -21,16 +14,8 @@
-
-
+
+
{{ initials }}
@@ -113,10 +98,7 @@
v-model="password.newTwo"
prepend-icon="mdi-lock"
:label="$t('user.confirm-password')"
- :rules="[
- password.newOne === password.newTwo ||
- $t('user.password-must-match'),
- ]"
+ :rules="[password.newOne === password.newTwo || $t('user.password-must-match')]"
validate-on-blur
:type="showPassword ? 'text' : 'password'"
@click:append="showPassword.newTwo = !showPassword.newTwo"
@@ -124,11 +106,7 @@
-
+
mdi-eye-off
mdi-eye
@@ -202,7 +180,7 @@ export default {
async updateUser() {
this.loading = true;
const response = await api.users.update(this.user);
- if(response) {
+ if (response) {
this.$store.commit("setToken", response.data.access_token);
this.refreshProfile();
this.loading = false;
@@ -227,5 +205,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Settings/CreatePageDialog.vue b/frontend/src/pages/Admin/Settings/CreatePageDialog.vue
index dff3f3fe3..da1dcf592 100644
--- a/frontend/src/pages/Admin/Settings/CreatePageDialog.vue
+++ b/frontend/src/pages/Admin/Settings/CreatePageDialog.vue
@@ -14,11 +14,7 @@
-
+
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Settings/CustomPageCreator.vue b/frontend/src/pages/Admin/Settings/CustomPageCreator.vue
index 3244a0197..e500ecfab 100644
--- a/frontend/src/pages/Admin/Settings/CustomPageCreator.vue
+++ b/frontend/src/pages/Admin/Settings/CustomPageCreator.vue
@@ -3,22 +3,15 @@
- {{$t('settings.custom-pages')}}
+ {{ $t("settings.custom-pages") }}
- {{$t('general.create')}}
+ {{ $t("general.create") }}
-
+
{{ item.name }}
@@ -41,11 +34,11 @@
- {{$t('general.delete')}}
+ {{ $t("general.delete") }}
- {{$t('general.edit')}}
+ {{ $t("general.edit") }}
@@ -55,7 +48,7 @@
- {{$t('general.save')}}
+ {{ $t("general.save") }}
@@ -76,8 +69,8 @@ export default {
customPages: [],
newPageData: {
create: true,
- title: this.$t('settings.new-page'),
- buttonText: this.$t('general.create'),
+ title: this.$t("settings.new-page"),
+ buttonText: this.$t("general.create"),
data: {
name: "",
categories: [],
@@ -86,8 +79,8 @@ export default {
},
editPageData: {
create: false,
- title: this.$t('settings.edit-page'),
- buttonText: this.$t('general.update'),
+ title: this.$t("settings.edit-page"),
+ buttonText: this.$t("general.update"),
data: {},
},
};
@@ -112,7 +105,6 @@ export default {
if (await api.siteSettings.updateAllPages(this.customPages)) {
this.getPages();
}
-
},
editPage(index) {
this.editPageData.data = this.customPages[index];
@@ -126,5 +118,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Settings/HomePageSettings.vue b/frontend/src/pages/Admin/Settings/HomePageSettings.vue
index 950ee01f5..09977140b 100644
--- a/frontend/src/pages/Admin/Settings/HomePageSettings.vue
+++ b/frontend/src/pages/Admin/Settings/HomePageSettings.vue
@@ -4,10 +4,7 @@
{{ $t("settings.homepage.home-page") }}
-
+
-
+
mdi-menu
@@ -92,10 +86,7 @@
minHeight: `150px`,
}"
>
-
+
mdi-menu
@@ -103,9 +94,7 @@
-
+
mdi-delete
@@ -214,7 +203,7 @@ export default {
this.settings.language = val;
},
deleteCategoryfromDatabase(category) {
- api.categories.delete(category);
+ api.categories.delete(category);
},
async getOptions() {
this.settings = await api.siteSettings.get();
@@ -225,11 +214,10 @@ export default {
async saveSettings() {
if (await api.siteSettings.update(this.settings)) {
this.getOptions();
- }
+ }
},
},
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Settings/index.vue b/frontend/src/pages/Admin/Settings/index.vue
index bd601452c..fde70c39d 100644
--- a/frontend/src/pages/Admin/Settings/index.vue
+++ b/frontend/src/pages/Admin/Settings/index.vue
@@ -31,5 +31,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Theme/NewThemeDialog.vue b/frontend/src/pages/Admin/Theme/NewThemeDialog.vue
index 8fc830066..f704bada5 100644
--- a/frontend/src/pages/Admin/Theme/NewThemeDialog.vue
+++ b/frontend/src/pages/Admin/Theme/NewThemeDialog.vue
@@ -51,8 +51,7 @@ export default {
dialog: false,
themeName: "",
rules: {
- required: val =>
- !!val || this.$t("settings.theme.theme-name-is-required"),
+ required: val => !!val || this.$t("settings.theme.theme-name-is-required"),
},
};
},
@@ -87,5 +86,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Theme/ThemeCard.vue b/frontend/src/pages/Admin/Theme/ThemeCard.vue
index 084789ed6..e0d67e285 100644
--- a/frontend/src/pages/Admin/Theme/ThemeCard.vue
+++ b/frontend/src/pages/Admin/Theme/ThemeCard.vue
@@ -35,9 +35,7 @@
- {{
- $t("general.apply")
- }}
+ {{ $t("general.apply") }}
@@ -87,5 +85,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/Theme/index.vue b/frontend/src/pages/Admin/Theme/index.vue
index e75c3055a..4c30adf7d 100644
--- a/frontend/src/pages/Admin/Theme/index.vue
+++ b/frontend/src/pages/Admin/Theme/index.vue
@@ -15,12 +15,7 @@
-
+
mdi-desktop-tower-monitor
@@ -58,66 +53,33 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
@@ -184,15 +146,10 @@ export default {
* This will save the current colors and make the selected theme live.
*/
saveThemes() {
- api.themes.update(
- this.selectedTheme.name,
- this.selectedTheme.colors
- );
+ api.themes.update(this.selectedTheme.name, this.selectedTheme.colors);
},
},
};
-
-
+
diff --git a/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/BulkAssign.vue b/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/BulkAssign.vue
index 2dcc7c750..bcee4e3c8 100644
--- a/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/BulkAssign.vue
+++ b/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/BulkAssign.vue
@@ -10,33 +10,16 @@
:top="true"
>
-
-
-
+
+
+
{{ $t("general.cancel") }}
-
+
{{ $t("settings.toolbox.assign-all") }}
@@ -122,9 +105,7 @@ export default {
assignAll() {
this.loading = true;
this.results.forEach(async element => {
- element.recipeCategory = element.recipeCategory.concat(
- this.catsToAssign
- );
+ element.recipeCategory = element.recipeCategory.concat(this.catsToAssign);
element.tags = element.tags.concat(this.tagsToAssign);
await api.recipes.patch(element);
});
@@ -154,9 +135,7 @@ export default {
return [];
}
return this.allRecipes.filter(x => {
- return (
- this.checkForKeywords(x.name) || this.checkForKeywords(x.description)
- );
+ return this.checkForKeywords(x.name) || this.checkForKeywords(x.description);
});
},
checkForKeywords(str) {
@@ -167,5 +146,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/RemoveUnused.vue b/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/RemoveUnused.vue
index 2fb873cbc..b8714dbde 100644
--- a/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/RemoveUnused.vue
+++ b/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/RemoveUnused.vue
@@ -4,11 +4,7 @@
ref="deleteDialog"
title-icon="mdi-tag"
color="error"
- :title="
- $t('general.delete') +
- ' ' +
- (isTags ? $t('tag.tags') : $t('recipe.categories'))
- "
+ :title="$t('general.delete') + ' ' + (isTags ? $t('tag.tags') : $t('recipe.categories'))"
:loading="loading"
modal-width="400"
>
@@ -27,12 +23,7 @@
{{ $t("general.cancel") }}
-
+
{{ $t("general.delete") }}
@@ -95,5 +86,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/index.vue b/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/index.vue
index 407769322..bc6978d82 100644
--- a/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/index.vue
+++ b/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/index.vue
@@ -43,24 +43,14 @@
-
+
{{ $t("settings.toolbox.title-case-all") }}
-
+
-
+
{{ item.name }}
- {{$t('general.edit')}}
+ {{ $t("general.edit") }}
- {{$t('general.delete')}}
+ {{ $t("general.delete") }}
@@ -149,9 +131,7 @@ export default {
return this.$vuetify.breakpoint.name === "xs";
},
allItems() {
- return this.isTags
- ? this.$store.getters.getAllTags
- : this.$store.getters.getAllCategories;
+ return this.isTags ? this.$store.getters.getAllTags : this.$store.getters.getAllCategories;
},
results() {
if (this.searchString != null && this.searchString.length >= 1) {
@@ -176,7 +156,7 @@ export default {
}
this.renameTarget = {
- title:this.$t('general.rename-object', [item.name]),
+ title: this.$t("general.rename-object", [item.name]),
name: item.name,
slug: item.slug,
newName: "",
@@ -240,4 +220,4 @@ export default {
height: auto !important;
flex-wrap: wrap;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/ToolBox/index.vue b/frontend/src/pages/Admin/ToolBox/index.vue
index 3e422e237..50333cd6d 100644
--- a/frontend/src/pages/Admin/ToolBox/index.vue
+++ b/frontend/src/pages/Admin/ToolBox/index.vue
@@ -1,13 +1,7 @@
-
+
@@ -43,5 +37,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Admin/index.vue b/frontend/src/pages/Admin/index.vue
index 40a3a4dd9..bd978f2d5 100644
--- a/frontend/src/pages/Admin/index.vue
+++ b/frontend/src/pages/Admin/index.vue
@@ -12,5 +12,4 @@
export default {};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Debug.vue b/frontend/src/pages/Debug.vue
index da7658645..d4b8db4ee 100644
--- a/frontend/src/pages/Debug.vue
+++ b/frontend/src/pages/Debug.vue
@@ -16,5 +16,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/HomePage.vue b/frontend/src/pages/HomePage.vue
index 05e4d2c99..3b2bc4536 100644
--- a/frontend/src/pages/HomePage.vue
+++ b/frontend/src/pages/HomePage.vue
@@ -61,18 +61,13 @@ export default {
this.$store.dispatch("requestRecentRecipes");
},
sortAZ(index) {
- this.recipeByCategory[index].recipes.sort((a, b) =>
- a.name > b.name ? 1 : -1
- );
+ this.recipeByCategory[index].recipes.sort((a, b) => (a.name > b.name ? 1 : -1));
},
sortRecent(index) {
- this.recipeByCategory[index].recipes.sort((a, b) =>
- a.dateAdded > b.dateAdded ? -1 : 1
- );
+ this.recipeByCategory[index].recipes.sort((a, b) => (a.dateAdded > b.dateAdded ? -1 : 1));
},
},
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/LoginPage.vue b/frontend/src/pages/LoginPage.vue
index b1c62f769..996b40b52 100644
--- a/frontend/src/pages/LoginPage.vue
+++ b/frontend/src/pages/LoginPage.vue
@@ -37,5 +37,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/MealPlan/Planner.vue b/frontend/src/pages/MealPlan/Planner.vue
index 8aa00182c..3c9903939 100644
--- a/frontend/src/pages/MealPlan/Planner.vue
+++ b/frontend/src/pages/MealPlan/Planner.vue
@@ -1,10 +1,6 @@
-
+
@@ -15,14 +11,7 @@
-
+
{{ $d(new Date(mealplan.startDate.split("-")), "short") }} -
@@ -35,46 +24,25 @@
:key="generateKey(meal.slug, index)"
:to="meal.slug ? `/recipe/${meal.slug}` : null"
>
-
+
-
-
+
-
+
{{ $t("meal-plan.shopping-list") }}
-
+
{{ $t("general.edit") }}
-
+
{{ $t("general.delete") }}
@@ -139,5 +107,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/MealPlan/ThisWeek.vue b/frontend/src/pages/MealPlan/ThisWeek.vue
index ab7e9b543..2b49fc8ec 100644
--- a/frontend/src/pages/MealPlan/ThisWeek.vue
+++ b/frontend/src/pages/MealPlan/ThisWeek.vue
@@ -2,36 +2,20 @@
-
+
-
+
{{ meal.name }}
-
- {{ $d(new Date(meal.date), "short") }}
+ {{ $d(new Date(meal.date), "short") }}
{{ meal.description }}
-
+
{{ $t("recipe.view-recipe") }}
@@ -61,8 +45,8 @@ export default {
},
async mounted() {
this.mealPlan = await api.mealPlans.thisWeek();
- if(!this.mealPlan) {
- utils.notify.warning(this.$t('meal-plan.no-meal-plan-defined-yet'))
+ if (!this.mealPlan) {
+ utils.notify.warning(this.$t("meal-plan.no-meal-plan-defined-yet"));
}
},
methods: {
@@ -77,5 +61,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Recipe/NewRecipe.vue b/frontend/src/pages/Recipe/NewRecipe.vue
index 7c1c975b6..ebf1f86be 100644
--- a/frontend/src/pages/Recipe/NewRecipe.vue
+++ b/frontend/src/pages/Recipe/NewRecipe.vue
@@ -4,38 +4,22 @@
-
+
-
+
-
+
-
+
@@ -118,4 +102,4 @@ export default {
position: absolute;
bottom: 0;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Recipe/ViewRecipe.vue b/frontend/src/pages/Recipe/ViewRecipe.vue
index 8d49e44fb..ea97cb941 100644
--- a/frontend/src/pages/Recipe/ViewRecipe.vue
+++ b/frontend/src/pages/Recipe/ViewRecipe.vue
@@ -1,23 +1,10 @@
-
-
+
+
-
+
-
+
@@ -185,13 +167,7 @@ export default {
},
async saveImage(overrideSuccessMsg = false) {
if (this.fileObject) {
- if (
- api.recipes.updateImage(
- this.recipeDetails.slug,
- this.fileObject,
- overrideSuccessMsg
- )
- ) {
+ if (api.recipes.updateImage(this.recipeDetails.slug, this.fileObject, overrideSuccessMsg)) {
this.imageKey += 1;
}
}
@@ -232,4 +208,4 @@ export default {
top: 0;
z-index: 2;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Recipes/AllRecipes.vue b/frontend/src/pages/Recipes/AllRecipes.vue
index e516f623c..6acace75a 100644
--- a/frontend/src/pages/Recipes/AllRecipes.vue
+++ b/frontend/src/pages/Recipes/AllRecipes.vue
@@ -1,10 +1,6 @@
-
+
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Recipes/CategoryPage.vue b/frontend/src/pages/Recipes/CategoryPage.vue
index 985617fc3..2d0acf225 100644
--- a/frontend/src/pages/Recipes/CategoryPage.vue
+++ b/frontend/src/pages/Recipes/CategoryPage.vue
@@ -39,9 +39,7 @@ export default {
},
methods: {
async getRecipes() {
- let data = await api.categories.getRecipesInCategory(
- this.currentCategory
- );
+ let data = await api.categories.getRecipesInCategory(this.currentCategory);
this.title = data.name;
this.recipes = data.recipes;
},
@@ -55,5 +53,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Recipes/CustomPage.vue b/frontend/src/pages/Recipes/CustomPage.vue
index 3130911f2..91d2bbe82 100644
--- a/frontend/src/pages/Recipes/CustomPage.vue
+++ b/frontend/src/pages/Recipes/CustomPage.vue
@@ -17,10 +17,7 @@
-
+
@@ -76,9 +73,7 @@ export default {
return await api.categories.getRecipesInCategory(category);
},
filterRecipe(slug) {
- const storeCategory = this.recipeStore.find(
- element => element.slug === slug
- );
+ const storeCategory = this.recipeStore.find(element => element.slug === slug);
return storeCategory ? storeCategory.recipes : [];
},
},
@@ -89,4 +84,4 @@ export default {
.header-background {
background-color: #121619;
}
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/Recipes/TagPage.vue b/frontend/src/pages/Recipes/TagPage.vue
index 32551bea1..822d94edb 100644
--- a/frontend/src/pages/Recipes/TagPage.vue
+++ b/frontend/src/pages/Recipes/TagPage.vue
@@ -53,5 +53,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/SearchPage/FilterSelector.vue b/frontend/src/pages/SearchPage/FilterSelector.vue
index 72574edb6..4570c3af9 100644
--- a/frontend/src/pages/SearchPage/FilterSelector.vue
+++ b/frontend/src/pages/SearchPage/FilterSelector.vue
@@ -1,37 +1,21 @@
-
+
- {{$t('search.include')}}
+ {{ $t("search.include") }}
- {{$t('search.exclude')}}
+ {{ $t("search.exclude") }}
-
+
- {{$t('search.and')}}
+ {{ $t("search.and") }}
- {{$t('search.or')}}
+ {{ $t("search.or") }}
@@ -65,5 +49,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/SearchPage/index.vue b/frontend/src/pages/SearchPage/index.vue
index 7760ba5c0..4c4135fd4 100644
--- a/frontend/src/pages/SearchPage/index.vue
+++ b/frontend/src/pages/SearchPage/index.vue
@@ -29,12 +29,7 @@
{{ $t("category.category-filter") }}
-
+
@@ -53,14 +48,7 @@
-
+
{
- const includesTags = this.check(
- this.includeTags,
- recipe.tags,
- this.tagFilter.matchAny,
- this.tagFilter.exclude
- );
+ const includesTags = this.check(this.includeTags, recipe.tags, this.tagFilter.matchAny, this.tagFilter.exclude);
const includesCats = this.check(
this.includeCategories,
recipe.recipeCategory,
@@ -178,5 +161,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/pages/SignUpPage.vue b/frontend/src/pages/SignUpPage.vue
index c431d754b..d1e79154f 100644
--- a/frontend/src/pages/SignUpPage.vue
+++ b/frontend/src/pages/SignUpPage.vue
@@ -37,5 +37,4 @@ export default {
};
-
\ No newline at end of file
+
diff --git a/frontend/src/plugins/vuetify.js b/frontend/src/plugins/vuetify.js
index 368c9a687..81296c552 100644
--- a/frontend/src/plugins/vuetify.js
+++ b/frontend/src/plugins/vuetify.js
@@ -3,15 +3,14 @@ import Vuetify from "vuetify/lib";
Vue.use(Vuetify);
-import de from 'vuetify/es5/locale/de';
-import en from 'vuetify/es5/locale/en';
-import fr from 'vuetify/es5/locale/fr';
-import pl from 'vuetify/es5/locale/pl';
-import pt from 'vuetify/es5/locale/pt';
-import sv from 'vuetify/es5/locale/sv';
-import zhHans from 'vuetify/es5/locale/zh-Hans';
-import zhHant from 'vuetify/es5/locale/zh-Hant';
-
+import de from "vuetify/es5/locale/de";
+import en from "vuetify/es5/locale/en";
+import fr from "vuetify/es5/locale/fr";
+import pl from "vuetify/es5/locale/pl";
+import pt from "vuetify/es5/locale/pt";
+import sv from "vuetify/es5/locale/sv";
+import zhHans from "vuetify/es5/locale/zh-Hans";
+import zhHant from "vuetify/es5/locale/zh-Hant";
const vuetify = new Vuetify({
theme: {
@@ -41,16 +40,16 @@ const vuetify = new Vuetify({
},
lang: {
locales: {
- 'de-DE' : de,
- 'en-US' : en,
- 'fr-FR' : fr,
- 'pl-PL' : pl,
- 'pt-PT' : pt,
- 'sv-SE' : sv,
- 'zh-CN' : zhHans,
- 'zh-TW' : zhHant
+ "de-DE": de,
+ "en-US": en,
+ "fr-FR": fr,
+ "pl-PL": pl,
+ "pt-PT": pt,
+ "sv-SE": sv,
+ "zh-CN": zhHans,
+ "zh-TW": zhHant,
},
- current: 'en-US',
+ current: "en-US",
},
});
diff --git a/frontend/src/routes/index.js b/frontend/src/routes/index.js
index 1ed95dc7b..3caf21d72 100644
--- a/frontend/src/routes/index.js
+++ b/frontend/src/routes/index.js
@@ -38,9 +38,7 @@ router.afterEach(to => {
const title = await to.meta.title(to);
document.title = title + TITLE_SUFFIX;
} else {
- document.title = i18n.t(to.meta.title)
- ? i18n.t(to.meta.title) + TITLE_SUFFIX
- : DEFAULT_TITLE;
+ document.title = i18n.t(to.meta.title) ? i18n.t(to.meta.title) + TITLE_SUFFIX : DEFAULT_TITLE;
}
});
});
diff --git a/frontend/src/routes/meal.js b/frontend/src/routes/meal.js
index de226e007..4a3588e2c 100644
--- a/frontend/src/routes/meal.js
+++ b/frontend/src/routes/meal.js
@@ -2,7 +2,7 @@ import Planner from "@/pages/MealPlan/Planner";
import ThisWeek from "@/pages/MealPlan/ThisWeek";
import { api } from "@/api";
-import i18n from '@/i18n.js';
+import i18n from "@/i18n.js";
import utils from "@/utils";
export const mealRoutes = [
@@ -24,10 +24,10 @@ export const mealRoutes = [
path: "/meal-plan/today",
beforeEnter: async (_to, _from, next) => {
await todaysMealRoute().then(redirect => {
- if(redirect) {
+ if (redirect) {
next(redirect);
} else {
- utils.notify.error(i18n.t('meal-plan.no-meal-planned-for-today'));
+ utils.notify.error(i18n.t("meal-plan.no-meal-planned-for-today"));
next(_from);
}
});
diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js
index 618e01507..d40042776 100644
--- a/frontend/src/store/index.js
+++ b/frontend/src/store/index.js
@@ -68,10 +68,8 @@ const store = new Vuex.Store({
getters: {
getMealPlanCategories: state => state.mealPlanCategories,
- getAllCategories: state =>
- state.allCategories.sort((a, b) => (a.slug > b.slug ? 1 : -1)),
- getAllTags: state =>
- state.allTags.sort((a, b) => (a.slug > b.slug ? 1 : -1)),
+ getAllCategories: state => state.allCategories.sort((a, b) => (a.slug > b.slug ? 1 : -1)),
+ getAllTags: state => state.allTags.sort((a, b) => (a.slug > b.slug ? 1 : -1)),
getAppInfo: state => state.appInfo,
},
});