mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
chore: Get Rid of Warnings (#2599)
* ignore unsafe html warnings * remove unused import * re-order attrs * removed unused vars/imports * removed unused import * refactored v-html * removed more unused things
This commit is contained in:
parent
b86c4e5865
commit
bd79c1db2f
12 changed files with 23 additions and 17 deletions
|
@ -1,9 +1,11 @@
|
|||
<template>
|
||||
<div v-html="markup"></div>
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<div v-html="safeMarkup"></div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from "@nuxtjs/composition-api";
|
||||
import { computed, defineComponent } from "@nuxtjs/composition-api";
|
||||
import { sanitizeIngredientHTML } from "~/composables/recipes/use-recipe-ingredients";
|
||||
export default defineComponent({
|
||||
props: {
|
||||
markup: {
|
||||
|
@ -11,5 +13,11 @@ export default defineComponent({
|
|||
required: true,
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
const safeMarkup = computed(() => sanitizeIngredientHTML(props.markup));
|
||||
return {
|
||||
safeMarkup,
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, toRefs } from "@nuxtjs/composition-api";
|
||||
import { computed, defineComponent } from "@nuxtjs/composition-api";
|
||||
import { RecipeIngredient } from "~/lib/api/types/group";
|
||||
import { useParsedIngredientText } from "~/composables/recipes";
|
||||
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
{{ recipe.name }}
|
||||
</v-list-item-title>
|
||||
<v-list-item-subtitle v-if="showDescription">{{ recipe.description }}</v-list-item-subtitle>
|
||||
<v-list-item-subtitle v-if="listItem && listItemDescriptions[index]" :style="attrs.style.text.subTitle" v-html="listItemDescriptions[index]"/>
|
||||
<v-list-item-subtitle v-if="listItem && listItemDescriptions[index]" :style="attrs.style.text.subTitle">
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<div v-html="listItemDescriptions[index]"></div>
|
||||
</v-list-item-subtitle>
|
||||
</v-list-item-content>
|
||||
<slot :name="'actions-' + recipe.id" :v-bind="{ item: recipe }"> </slot>
|
||||
</v-list-item>
|
||||
|
|
|
@ -87,7 +87,6 @@ import {
|
|||
useRouter,
|
||||
computed,
|
||||
ref,
|
||||
useMeta,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
} from "@nuxtjs/composition-api";
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<v-card
|
||||
hover
|
||||
:to="$listeners.selected || !recipe ? undefined : `/recipe/${recipe.slug}`"
|
||||
@click="$emit('selected')"
|
||||
class="elevation-12"
|
||||
@click="$emit('selected')"
|
||||
>
|
||||
<v-card-title class="background">
|
||||
<v-row>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
content-class="text-caption"
|
||||
>
|
||||
<template #activator="{ on: onBtn, attrs: attrsBtn }">
|
||||
<v-btn small class="ml-2" icon @click="displayRecipeRefs = !displayRecipeRefs" v-bind="attrsBtn" v-on="onBtn">
|
||||
<v-btn small class="ml-2" icon v-bind="attrsBtn" v-on="onBtn" @click="displayRecipeRefs = !displayRecipeRefs">
|
||||
<v-icon>
|
||||
{{ $globals.icons.potSteam }}
|
||||
</v-icon>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue