mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
chore: update dev dependencies (#1282)
* update dev dependencies * upgrade eslint * resolve several errors * resolve eslint errors
This commit is contained in:
parent
01f3fef21f
commit
921fceddea
21 changed files with 802 additions and 934 deletions
|
@ -35,6 +35,7 @@ module.exports = {
|
||||||
"vue/singleline-html-element-content-newline": "off",
|
"vue/singleline-html-element-content-newline": "off",
|
||||||
"vue/multiline-html-element-content-newline": "off",
|
"vue/multiline-html-element-content-newline": "off",
|
||||||
"vue/no-mutating-props": "off",
|
"vue/no-mutating-props": "off",
|
||||||
|
"vue/no-v-text-v-html-on-component": "warn",
|
||||||
"vue/no-v-for-template-key-on-child": "off",
|
"vue/no-v-for-template-key-on-child": "off",
|
||||||
"vue/valid-v-slot": [
|
"vue/valid-v-slot": [
|
||||||
"error",
|
"error",
|
||||||
|
|
|
@ -28,9 +28,13 @@
|
||||||
</v-list-item-avatar>
|
</v-list-item-avatar>
|
||||||
|
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-list-item-title v-text="item.title"></v-list-item-title>
|
<v-list-item-title>
|
||||||
|
{{ item.title }}
|
||||||
|
</v-list-item-title>
|
||||||
|
|
||||||
<v-list-item-subtitle v-text="item.text"></v-list-item-subtitle>
|
<v-list-item-subtitle>
|
||||||
|
{{ item.text }}
|
||||||
|
</v-list-item-subtitle>
|
||||||
<v-list-item-subtitle>
|
<v-list-item-subtitle>
|
||||||
{{ $d(Date.parse(item.timeStamp), "long") }}
|
{{ $d(Date.parse(item.timeStamp), "long") }}
|
||||||
</v-list-item-subtitle>
|
</v-list-item-subtitle>
|
||||||
|
@ -103,5 +107,4 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped></style>
|
||||||
</style>
|
|
||||||
|
|
|
@ -10,23 +10,27 @@
|
||||||
<v-list-item-icon class="ma-auto">
|
<v-list-item-icon class="ma-auto">
|
||||||
<v-tooltip bottom>
|
<v-tooltip bottom>
|
||||||
<template #activator="{ on, attrs }">
|
<template #activator="{ on, attrs }">
|
||||||
<v-icon v-bind="attrs" v-on="on" v-text="getIconDefinition(item.icon).icon"></v-icon>
|
<v-icon v-bind="attrs" v-on="on">
|
||||||
|
{{ getIconDefinition(item.icon).icon }}
|
||||||
|
</v-icon>
|
||||||
</template>
|
</template>
|
||||||
<span>{{ getIconDefinition(item.icon).title }}</span>
|
<span>{{ getIconDefinition(item.icon).title }}</span>
|
||||||
</v-tooltip>
|
</v-tooltip>
|
||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-list-item-title class="pl-2" v-text="item.name"></v-list-item-title>
|
<v-list-item-title class="pl-2">
|
||||||
|
{{ item.name }}
|
||||||
|
</v-list-item-title>
|
||||||
</v-list-item-content>
|
</v-list-item-content>
|
||||||
<v-list-item-action>
|
<v-list-item-action>
|
||||||
<v-btn v-if="!edit" color="primary" icon :href="assetURL(item.fileName)" target="_blank" top>
|
<v-btn v-if="!edit" color="primary" icon :href="assetURL(item.fileName as string)" target="_blank" top>
|
||||||
<v-icon> {{ $globals.icons.download }} </v-icon>
|
<v-icon> {{ $globals.icons.download }} </v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<v-btn color="error" icon top @click="value.splice(i, 1)">
|
<v-btn color="error" icon top @click="value.splice(i, 1)">
|
||||||
<v-icon>{{ $globals.icons.delete }}</v-icon>
|
<v-icon>{{ $globals.icons.delete }}</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<AppButtonCopy color="" :copy-text="assetEmbed(item.fileName)" />
|
<AppButtonCopy color="" :copy-text="assetEmbed(item.fileName as string)" />
|
||||||
</div>
|
</div>
|
||||||
</v-list-item-action>
|
</v-list-item-action>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
@ -36,7 +40,7 @@
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<BaseDialog
|
<BaseDialog
|
||||||
v-model="newAssetDialog"
|
v-model="newAssetDialog"
|
||||||
:title="$t('asset.new-asset')"
|
:title="$tc('asset.new-asset')"
|
||||||
:icon="getIconDefinition(newAsset.icon).icon"
|
:icon="getIconDefinition(newAsset.icon).icon"
|
||||||
@submit="addAsset"
|
@submit="addAsset"
|
||||||
>
|
>
|
||||||
|
@ -77,6 +81,7 @@
|
||||||
import { defineComponent, reactive, toRefs, useContext } from "@nuxtjs/composition-api";
|
import { defineComponent, reactive, toRefs, useContext } from "@nuxtjs/composition-api";
|
||||||
import { useStaticRoutes, useUserApi } from "~/composables/api";
|
import { useStaticRoutes, useUserApi } from "~/composables/api";
|
||||||
import { alert } from "~/composables/use-toast";
|
import { alert } from "~/composables/use-toast";
|
||||||
|
import { RecipeAsset } from "~/types/api-types/recipe";
|
||||||
|
|
||||||
const BASE_URL = window.location.origin;
|
const BASE_URL = window.location.origin;
|
||||||
|
|
||||||
|
@ -91,7 +96,7 @@ export default defineComponent({
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
type: Array,
|
type: Array as () => RecipeAsset[],
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
edit: {
|
edit: {
|
||||||
|
|
|
@ -29,7 +29,9 @@
|
||||||
<v-list dense>
|
<v-list dense>
|
||||||
<v-list-item v-for="(item, index) in menuItems" :key="index" @click="contextMenuEventHandler(item.event)">
|
<v-list-item v-for="(item, index) in menuItems" :key="index" @click="contextMenuEventHandler(item.event)">
|
||||||
<v-list-item-icon>
|
<v-list-item-icon>
|
||||||
<v-icon :color="item.color" v-text="item.icon"></v-icon>
|
<v-icon :color="item.color">
|
||||||
|
{{ item.icon }}
|
||||||
|
</v-icon>
|
||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-title>{{ item.title }}</v-list-item-title>
|
<v-list-item-title>{{ item.title }}</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
<v-list dense>
|
<v-list dense>
|
||||||
<v-list-item v-for="(item, index) in menuItems" :key="index" @click="contextMenuEventHandler(item.event)">
|
<v-list-item v-for="(item, index) in menuItems" :key="index" @click="contextMenuEventHandler(item.event)">
|
||||||
<v-list-item-icon>
|
<v-list-item-icon>
|
||||||
<v-icon :color="item.color" v-text="item.icon"></v-icon>
|
<v-icon :color="item.color"> {{ item.icon }} </v-icon>
|
||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-title>{{ item.title }}</v-list-item-title>
|
<v-list-item-title>{{ item.title }}</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
@ -307,7 +307,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: Print is handled as an event in the parent component
|
// Note: Print is handled as an event in the parent component
|
||||||
const eventHandlers: { [key: string]: () => void } = {
|
const eventHandlers: { [key: string]: () => void | Promise<any> } = {
|
||||||
delete: () => {
|
delete: () => {
|
||||||
state.recipeDeleteDialog = true;
|
state.recipeDeleteDialog = true;
|
||||||
},
|
},
|
||||||
|
|
|
@ -32,7 +32,9 @@
|
||||||
<img src="https://i.pravatar.cc/300" alt="John" />
|
<img src="https://i.pravatar.cc/300" alt="John" />
|
||||||
</v-list-item-avatar>
|
</v-list-item-avatar>
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-list-item-title v-text="getMember(item.userId)"></v-list-item-title>
|
<v-list-item-title>
|
||||||
|
{{ getMember(item.userId) }}
|
||||||
|
</v-list-item-title>
|
||||||
</v-list-item-content>
|
</v-list-item-content>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</template>
|
</template>
|
||||||
|
@ -95,31 +97,30 @@ export default defineComponent({
|
||||||
context.emit(INPUT_EVENT, value);
|
context.emit(INPUT_EVENT, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
const show = props.showHeaders;
|
|
||||||
const headers = computed(() => {
|
const headers = computed(() => {
|
||||||
const hdrs = [];
|
const hdrs = [];
|
||||||
|
|
||||||
if (show.id) {
|
if (props.showHeaders.id) {
|
||||||
hdrs.push({ text: "Id", value: "id" });
|
hdrs.push({ text: "Id", value: "id" });
|
||||||
}
|
}
|
||||||
if (show.owner) {
|
if (props.showHeaders.owner) {
|
||||||
hdrs.push({ text: "Owner", value: "userId", align: "center" });
|
hdrs.push({ text: "Owner", value: "userId", align: "center" });
|
||||||
}
|
}
|
||||||
hdrs.push({ text: "Name", value: "name" });
|
hdrs.push({ text: "Name", value: "name" });
|
||||||
if (show.categories) {
|
if (props.showHeaders.categories) {
|
||||||
hdrs.push({ text: "Categories", value: "recipeCategory" });
|
hdrs.push({ text: "Categories", value: "recipeCategory" });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (show.tags) {
|
if (props.showHeaders.tags) {
|
||||||
hdrs.push({ text: "Tags", value: "tags" });
|
hdrs.push({ text: "Tags", value: "tags" });
|
||||||
}
|
}
|
||||||
if (show.tools) {
|
if (props.showHeaders.tools) {
|
||||||
hdrs.push({ text: "Tools", value: "tools" });
|
hdrs.push({ text: "Tools", value: "tools" });
|
||||||
}
|
}
|
||||||
if (show.recipeYield) {
|
if (props.showHeaders.recipeYield) {
|
||||||
hdrs.push({ text: "Yield", value: "recipeYield" });
|
hdrs.push({ text: "Yield", value: "recipeYield" });
|
||||||
}
|
}
|
||||||
if (show.dateAdded) {
|
if (props.showHeaders.dateAdded) {
|
||||||
hdrs.push({ text: "Date Added", value: "dateAdded" });
|
hdrs.push({ text: "Date Added", value: "dateAdded" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,8 +134,6 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const { value } = props;
|
|
||||||
|
|
||||||
// ==================================================
|
// ==================================================
|
||||||
// Foods
|
// Foods
|
||||||
const { foods, workingFoodData, actions: foodActions } = useFoods();
|
const { foods, workingFoodData, actions: foodActions } = useFoods();
|
||||||
|
@ -144,7 +142,7 @@ export default defineComponent({
|
||||||
async function createAssignFood() {
|
async function createAssignFood() {
|
||||||
workingFoodData.name = foodSearch.value;
|
workingFoodData.name = foodSearch.value;
|
||||||
await foodActions.createOne();
|
await foodActions.createOne();
|
||||||
value.food = foods.value?.find((food) => food.name === foodSearch.value);
|
props.value.food = foods.value?.find((food) => food.name === foodSearch.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==================================================
|
// ==================================================
|
||||||
|
@ -155,7 +153,7 @@ export default defineComponent({
|
||||||
async function createAssignUnit() {
|
async function createAssignUnit() {
|
||||||
workingUnitData.name = unitSearch.value;
|
workingUnitData.name = unitSearch.value;
|
||||||
await unitActions.createOne();
|
await unitActions.createOne();
|
||||||
value.unit = units.value?.find((unit) => unit.name === unitSearch.value);
|
props.value.unit = units.value?.find((unit) => unit.name === unitSearch.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
@ -165,7 +163,7 @@ export default defineComponent({
|
||||||
|
|
||||||
function toggleTitle() {
|
function toggleTitle() {
|
||||||
if (state.showTitle) {
|
if (state.showTitle) {
|
||||||
value.title = "";
|
props.value.title = "";
|
||||||
}
|
}
|
||||||
state.showTitle = !state.showTitle;
|
state.showTitle = !state.showTitle;
|
||||||
}
|
}
|
||||||
|
@ -175,13 +173,21 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleUnitEnter() {
|
function handleUnitEnter() {
|
||||||
if (value.unit === undefined || value.unit === null || !value.unit.name.includes(unitSearch.value)) {
|
if (
|
||||||
|
props.value.unit === undefined ||
|
||||||
|
props.value.unit === null ||
|
||||||
|
!props.value.unit.name.includes(unitSearch.value)
|
||||||
|
) {
|
||||||
createAssignUnit();
|
createAssignUnit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleFoodEnter() {
|
function handleFoodEnter() {
|
||||||
if (value.food === undefined || value.food === null || !value.food.name.includes(foodSearch.value)) {
|
if (
|
||||||
|
props.value.food === undefined ||
|
||||||
|
props.value.food === null ||
|
||||||
|
!props.value.food.name.includes(foodSearch.value)
|
||||||
|
) {
|
||||||
createAssignFood();
|
createAssignFood();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,7 +208,7 @@ export default defineComponent({
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (value.originalText) {
|
if (props.value.originalText) {
|
||||||
options.push({
|
options.push({
|
||||||
text: "See Original Text",
|
text: "See Original Text",
|
||||||
event: "toggle-original",
|
event: "toggle-original",
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
@click="toggleCollapseSection(index)"
|
@click="toggleCollapseSection(index)"
|
||||||
>
|
>
|
||||||
<v-toolbar-title v-if="!edit" class="headline">
|
<v-toolbar-title v-if="!edit" class="headline">
|
||||||
<v-app-bar-title v-text="step.title"> </v-app-bar-title>
|
<v-app-bar-title> {{ step.title }} </v-app-bar-title>
|
||||||
</v-toolbar-title>
|
</v-toolbar-title>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-if="edit"
|
v-if="edit"
|
||||||
|
|
|
@ -145,6 +145,8 @@ import { AutoFormItems } from "~/types/auto-forms";
|
||||||
|
|
||||||
const BLUR_EVENT = "blur";
|
const BLUR_EVENT = "blur";
|
||||||
|
|
||||||
|
type ValidatorKey = keyof typeof validators;
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "AutoForm",
|
name: "AutoForm",
|
||||||
props: {
|
props: {
|
||||||
|
@ -178,7 +180,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
setup(props, context) {
|
setup(props, context) {
|
||||||
function rulesByKey(keys?: string[] | null) {
|
function rulesByKey(keys?: ValidatorKey[] | null) {
|
||||||
if (keys === undefined || keys === null) {
|
if (keys === undefined || keys === null) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -193,7 +195,7 @@ export default defineComponent({
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultRules = computed(() => rulesByKey(props.globalRules));
|
const defaultRules = computed(() => rulesByKey(props.globalRules as ValidatorKey[]));
|
||||||
|
|
||||||
function removeByIndex(list: never[], index: number) {
|
function removeByIndex(list: never[], index: number) {
|
||||||
// Removes the item at the index
|
// Removes the item at the index
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
class="text-start v-card--material__heading mb-n6 mt-n10 pa-7"
|
class="text-start v-card--material__heading mb-n6 mt-n10 pa-7"
|
||||||
dark
|
dark
|
||||||
>
|
>
|
||||||
<v-icon v-if="icon" size="40" v-text="icon" />
|
<v-icon v-if="icon" size="40"> {{ icon }} </v-icon>
|
||||||
<div v-if="text" class="headline font-weight-thin" v-text="text" />
|
<div v-if="text" class="headline font-weight-thin" v-text="text" />
|
||||||
</v-sheet>
|
</v-sheet>
|
||||||
</slot>
|
</slot>
|
||||||
|
|
|
@ -2,18 +2,10 @@
|
||||||
<BaseDialog v-model="dialog" :icon="$globals.icons.translate" :title="$tc('language-dialog.choose-language')">
|
<BaseDialog v-model="dialog" :icon="$globals.icons.translate" :title="$tc('language-dialog.choose-language')">
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
{{ $t("language-dialog.select-description") }}
|
{{ $t("language-dialog.select-description") }}
|
||||||
<v-autocomplete
|
<v-autocomplete v-model="locale" :items="locales" item-text="name" class="my-3" hide-details outlined offset>
|
||||||
v-model="locale"
|
|
||||||
:items="locales"
|
|
||||||
item-text="name"
|
|
||||||
class="my-3"
|
|
||||||
hide-details
|
|
||||||
outlined
|
|
||||||
offset
|
|
||||||
>
|
|
||||||
<template #item="{ item }">
|
<template #item="{ item }">
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-list-item-title v-text="item.name"></v-list-item-title>
|
<v-list-item-title> {{ item.name }} </v-list-item-title>
|
||||||
<v-list-item-subtitle> {{ item.progress }}% {{ $tc("language-dialog.translated") }} </v-list-item-subtitle>
|
<v-list-item-subtitle> {{ item.progress }}% {{ $tc("language-dialog.translated") }} </v-list-item-subtitle>
|
||||||
</v-list-item-content>
|
</v-list-item-content>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { AxiosResponse } from "axios";
|
import { AxiosResponse } from "axios";
|
||||||
import { useContext } from "@nuxtjs/composition-api";
|
import { useContext } from "@nuxtjs/composition-api";
|
||||||
import { NuxtAxiosInstance } from "@nuxtjs/axios";
|
import type { NuxtAxiosInstance } from "@nuxtjs/axios";
|
||||||
import { AdminAPI, Api } from "~/api";
|
import { AdminAPI, Api } from "~/api";
|
||||||
import { ApiRequestInstance, RequestResponse } from "~/types/api";
|
import { ApiRequestInstance, RequestResponse } from "~/types/api";
|
||||||
import { PublicApi } from "~/api/public-api";
|
import { PublicApi } from "~/api/public-api";
|
||||||
|
|
|
@ -25,11 +25,17 @@
|
||||||
<v-divider v-if="item.divider" :key="index" class="mx-2"></v-divider>
|
<v-divider v-if="item.divider" :key="index" class="mx-2"></v-divider>
|
||||||
<v-list-item v-else :key="item.title" :to="item.to" exact>
|
<v-list-item v-else :key="item.title" :to="item.to" exact>
|
||||||
<v-list-item-avatar>
|
<v-list-item-avatar>
|
||||||
<v-icon v-text="item.icon"></v-icon>
|
<v-icon>
|
||||||
|
{{ item.icon }}
|
||||||
|
</v-icon>
|
||||||
</v-list-item-avatar>
|
</v-list-item-avatar>
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-list-item-title v-text="item.title"></v-list-item-title>
|
<v-list-item-title>
|
||||||
<v-list-item-subtitle v-text="item.subtitle"></v-list-item-subtitle>
|
{{ item.title }}
|
||||||
|
</v-list-item-title>
|
||||||
|
<v-list-item-subtitle>
|
||||||
|
{{ item.subtitle }}
|
||||||
|
</v-list-item-subtitle>
|
||||||
</v-list-item-content>
|
</v-list-item-content>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
"@nuxtjs/proxy": "^2.1.0",
|
"@nuxtjs/proxy": "^2.1.0",
|
||||||
"@nuxtjs/pwa": "^3.3.5",
|
"@nuxtjs/pwa": "^3.3.5",
|
||||||
"@vue/composition-api": "^1.0.5",
|
"@vue/composition-api": "^1.0.5",
|
||||||
"@vueuse/core": "^6.8.0",
|
"@vueuse/core": "^8.5.0",
|
||||||
"core-js": "^3.15.1",
|
"core-js": "^3.15.1",
|
||||||
"date-fns": "^2.23.0",
|
"date-fns": "^2.23.0",
|
||||||
"fuse.js": "^6.5.3",
|
"fuse.js": "^6.5.3",
|
||||||
|
@ -36,21 +36,22 @@
|
||||||
"@babel/eslint-parser": "^7.14.7",
|
"@babel/eslint-parser": "^7.14.7",
|
||||||
"@nuxt/types": "^2.15.7",
|
"@nuxt/types": "^2.15.7",
|
||||||
"@nuxt/typescript-build": "^2.1.0",
|
"@nuxt/typescript-build": "^2.1.0",
|
||||||
"@nuxtjs/composition-api": "^0.31.0",
|
"@nuxtjs/composition-api": "^0.32.0",
|
||||||
"@nuxtjs/eslint-config-typescript": "^6.0.1",
|
"@nuxtjs/eslint-config-typescript": "^10.0.0",
|
||||||
"@nuxtjs/eslint-module": "^3.0.2",
|
"@nuxtjs/eslint-module": "^3.0.2",
|
||||||
"@nuxtjs/google-fonts": "^1.3.0",
|
"@nuxtjs/google-fonts": "^1.3.0",
|
||||||
"@nuxtjs/vuetify": "^1.12.1",
|
"@nuxtjs/vuetify": "^1.12.1",
|
||||||
"@types/sortablejs": "^1.10.7",
|
"@types/sortablejs": "^1.10.7",
|
||||||
"@vue/runtime-dom": "^3.2.36",
|
"@vue/runtime-dom": "^3.2.36",
|
||||||
"eslint": "^7.29.0",
|
"eslint": "^8.16.0",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"eslint-config-prettier": "^8.3.0",
|
||||||
"eslint-plugin-nuxt": "^3.2.0",
|
"eslint-plugin-nuxt": "^3.2.0",
|
||||||
"eslint-plugin-prettier": "^3.4.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"eslint-plugin-vue": "^7.12.1",
|
"eslint-plugin-vue": "^9.0.1",
|
||||||
"lint-staged": "^10.5.4",
|
"lint-staged": "^12.4.2",
|
||||||
"nuxt-vite": "0.2.3",
|
"nuxt-vite": "0.2.3",
|
||||||
"prettier": "^2.3.2",
|
"prettier": "^2.3.2",
|
||||||
|
"typescript": "^4.7.2",
|
||||||
"vue2-script-setup-transform": "^0.3.5"
|
"vue2-script-setup-transform": "^0.3.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
>
|
>
|
||||||
<template #item="{ item }">
|
<template #item="{ item }">
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-list-item-title v-text="item.name"></v-list-item-title>
|
<v-list-item-title> {{ item.name }} </v-list-item-title>
|
||||||
<v-list-item-subtitle>
|
<v-list-item-subtitle>
|
||||||
{{ item.progress }}% {{ $tc("language-dialog.translated") }}
|
{{ item.progress }}% {{ $tc("language-dialog.translated") }}
|
||||||
</v-list-item-subtitle>
|
</v-list-item-subtitle>
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
>
|
>
|
||||||
<template #item="{ item }">
|
<template #item="{ item }">
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-list-item-title v-text="item.name"></v-list-item-title>
|
<v-list-item-title> {{ item.name }} </v-list-item-title>
|
||||||
<v-list-item-subtitle>
|
<v-list-item-subtitle>
|
||||||
{{ item.progress }}% {{ $tc("language-dialog.translated") }}
|
{{ item.progress }}% {{ $tc("language-dialog.translated") }}
|
||||||
</v-list-item-subtitle>
|
</v-list-item-subtitle>
|
||||||
|
|
|
@ -315,8 +315,10 @@ export default defineComponent({
|
||||||
title: "Tag Recipes",
|
title: "Tag Recipes",
|
||||||
mode: MODES.tag,
|
mode: MODES.tag,
|
||||||
tag: "",
|
tag: "",
|
||||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
callback: () => {
|
||||||
callback: () => {},
|
// Stub function to be overwritten
|
||||||
|
return Promise.resolve();
|
||||||
|
},
|
||||||
icon: $globals.icons.tags,
|
icon: $globals.icons.tags,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
>
|
>
|
||||||
<template #item="{ item }">
|
<template #item="{ item }">
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-list-item-title v-text="item.name"></v-list-item-title>
|
<v-list-item-title> {{ item.name }} </v-list-item-title>
|
||||||
<v-list-item-subtitle>
|
<v-list-item-subtitle>
|
||||||
{{ item.progress }}% {{ $tc("language-dialog.translated") }}
|
{{ item.progress }}% {{ $tc("language-dialog.translated") }}
|
||||||
</v-list-item-subtitle>
|
</v-list-item-subtitle>
|
||||||
|
|
|
@ -216,7 +216,7 @@ export default defineComponent({
|
||||||
if (searchString.value.trim() === "") {
|
if (searchString.value.trim() === "") {
|
||||||
return filteredRecipes.value;
|
return filteredRecipes.value;
|
||||||
}
|
}
|
||||||
const result = fuse.value.search(searchString.value.trim());
|
const result = fuse.value.search(searchString.value.trim() as string);
|
||||||
return result.map((x) => x.item);
|
return result.map((x) => x.item);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
import { Plugin } from "@nuxt/types";
|
import { Plugin } from "@nuxt/types";
|
||||||
import { NuxtAxiosInstance } from "@nuxtjs/axios";
|
import type { NuxtAxiosInstance } from "@nuxtjs/axios";
|
||||||
import { alert } from "~/composables/use-toast";
|
import { alert } from "~/composables/use-toast";
|
||||||
|
|
||||||
const toastPlugin: Plugin = ({ $axios }: { $axios: NuxtAxiosInstance }) => {
|
const toastPlugin: Plugin = ({ $axios }: { $axios: NuxtAxiosInstance }) => {
|
||||||
$axios.onResponse((response) => {
|
$axios.onResponse((response) => {
|
||||||
if (response?.data?.message) {
|
if (response?.data?.message) {
|
||||||
alert.info(response.data.message);
|
alert.info(response.data.message as string);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$axios.onError((error) => {
|
$axios.onError((error) => {
|
||||||
if (error.response?.data?.detail?.message) {
|
if (error.response?.data?.detail?.message) {
|
||||||
alert.error(error.response.data.detail.message);
|
alert.error(error.response.data.detail.message as string);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
1587
frontend/yarn.lock
1587
frontend/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue