mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-21 05:53:36 -07:00
remove show label code
This commit is contained in:
parent
c12d5653fa
commit
142079bcd5
2 changed files with 3 additions and 19 deletions
|
@ -27,16 +27,6 @@
|
||||||
</div>
|
</div>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-spacer />
|
<v-spacer />
|
||||||
<v-col
|
|
||||||
v-if="label && showLabel"
|
|
||||||
cols="3"
|
|
||||||
class="text-right"
|
|
||||||
>
|
|
||||||
<MultiPurposeLabel
|
|
||||||
:label="label"
|
|
||||||
size="small"
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
<v-col
|
<v-col
|
||||||
cols="auto"
|
cols="auto"
|
||||||
class="text-right"
|
class="text-right"
|
||||||
|
@ -167,7 +157,6 @@
|
||||||
import { useOnline } from "@vueuse/core";
|
import { useOnline } from "@vueuse/core";
|
||||||
import RecipeIngredientListItem from "../Recipe/RecipeIngredientListItem.vue";
|
import RecipeIngredientListItem from "../Recipe/RecipeIngredientListItem.vue";
|
||||||
import ShoppingListItemEditor from "./ShoppingListItemEditor.vue";
|
import ShoppingListItemEditor from "./ShoppingListItemEditor.vue";
|
||||||
import MultiPurposeLabel from "./MultiPurposeLabel.vue";
|
|
||||||
import type { ShoppingListItemOut } from "~/lib/api/types/household";
|
import type { ShoppingListItemOut } from "~/lib/api/types/household";
|
||||||
import type { MultiPurposeLabelOut, MultiPurposeLabelSummary } from "~/lib/api/types/labels";
|
import type { MultiPurposeLabelOut, MultiPurposeLabelSummary } from "~/lib/api/types/labels";
|
||||||
import type { IngredientFood, IngredientUnit, RecipeSummary } from "~/lib/api/types/recipe";
|
import type { IngredientFood, IngredientUnit, RecipeSummary } from "~/lib/api/types/recipe";
|
||||||
|
@ -179,16 +168,12 @@ interface actions {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineNuxtComponent({
|
export default defineNuxtComponent({
|
||||||
components: { ShoppingListItemEditor, MultiPurposeLabel, RecipeList, RecipeIngredientListItem },
|
components: { ShoppingListItemEditor, RecipeList, RecipeIngredientListItem },
|
||||||
props: {
|
props: {
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: Object as () => ShoppingListItemOut,
|
type: Object as () => ShoppingListItemOut,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
showLabel: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
labels: {
|
labels: {
|
||||||
type: Array as () => MultiPurposeLabelOut[],
|
type: Array as () => MultiPurposeLabelOut[],
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -210,7 +195,7 @@ export default defineNuxtComponent({
|
||||||
setup(props, context) {
|
setup(props, context) {
|
||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
const displayRecipeRefs = ref(false);
|
const displayRecipeRefs = ref(false);
|
||||||
const itemLabelCols = ref<string>(props.modelValue.checked ? "auto" : props.showLabel ? "4" : "6");
|
const itemLabelCols = ref<string>(props.modelValue.checked ? "auto" : "6");
|
||||||
const isOffline = computed(() => useOnline().value === false);
|
const isOffline = computed(() => useOnline().value === false);
|
||||||
|
|
||||||
const contextMenu: actions[] = [
|
const contextMenu: actions[] = [
|
||||||
|
@ -295,7 +280,7 @@ export default defineNuxtComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
listItem.value.recipeReferences.forEach((ref) => {
|
listItem.value.recipeReferences.forEach((ref) => {
|
||||||
const recipe = props.recipes.get(ref.recipeId);
|
const recipe = props.recipes?.get(ref.recipeId);
|
||||||
if (recipe) {
|
if (recipe) {
|
||||||
recipeList.push(recipe);
|
recipeList.push(recipe);
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,6 @@
|
||||||
>
|
>
|
||||||
<ShoppingListItem
|
<ShoppingListItem
|
||||||
v-model="value[index]"
|
v-model="value[index]"
|
||||||
:show-label="false"
|
|
||||||
:labels="allLabels || []"
|
:labels="allLabels || []"
|
||||||
:units="allUnits || []"
|
:units="allUnits || []"
|
||||||
:foods="allFoods || []"
|
:foods="allFoods || []"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue