mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-23 06:45:22 -07:00
fix recipe scale tooltip showing also on other parts of the component
This commit is contained in:
parent
4a74993bec
commit
0c6046f829
2 changed files with 34 additions and 15 deletions
|
@ -1,21 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="d-flex justify-space-between align-center pt-2 pb-3">
|
<div class="d-flex justify-space-between align-center pt-2 pb-3">
|
||||||
<v-tooltip
|
|
||||||
v-if="!isEditMode"
|
|
||||||
size="small"
|
|
||||||
top
|
|
||||||
color="secondary-darken-1"
|
|
||||||
>
|
|
||||||
<template #activator="{ props }">
|
|
||||||
<RecipeScaleEditButton
|
<RecipeScaleEditButton
|
||||||
|
v-if="!isEditMode"
|
||||||
v-model.number="scaleValue"
|
v-model.number="scaleValue"
|
||||||
v-bind="props"
|
|
||||||
:recipe-servings="recipeServings"
|
:recipe-servings="recipeServings"
|
||||||
:edit-scale="!recipe.settings.disableAmount && !isEditMode"
|
:edit-scale="!recipe.settings.disableAmount && !isEditMode"
|
||||||
/>
|
/>
|
||||||
</template>
|
|
||||||
<span> {{ $t("recipe.edit-scale") }} </span>
|
|
||||||
</v-tooltip>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,36 @@
|
||||||
:close-on-content-click="false"
|
:close-on-content-click="false"
|
||||||
>
|
>
|
||||||
<template #activator="{ props }">
|
<template #activator="{ props }">
|
||||||
|
<v-tooltip
|
||||||
|
v-if="canEditScale"
|
||||||
|
size="small"
|
||||||
|
top
|
||||||
|
color="secondary-darken-1"
|
||||||
|
>
|
||||||
|
<template #activator="{ props: tooltipProps }">
|
||||||
<v-card
|
<v-card
|
||||||
|
class="pa-1 px-2"
|
||||||
|
dark
|
||||||
|
color="secondary-darken-1"
|
||||||
|
size="small"
|
||||||
|
v-bind="{ ...props, ...tooltipProps }"
|
||||||
|
:style="{ cursor: canEditScale ? '' : 'default' }"
|
||||||
|
>
|
||||||
|
<v-icon
|
||||||
|
v-if="canEditScale"
|
||||||
|
size="small"
|
||||||
|
class="mr-2"
|
||||||
|
>
|
||||||
|
{{ $globals.icons.edit }}
|
||||||
|
</v-icon>
|
||||||
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||||
|
<span v-html="yieldDisplay" />
|
||||||
|
</v-card>
|
||||||
|
</template>
|
||||||
|
<span> {{ $t("recipe.edit-scale") }} </span>
|
||||||
|
</v-tooltip>
|
||||||
|
<v-card
|
||||||
|
v-else
|
||||||
class="pa-1 px-2"
|
class="pa-1 px-2"
|
||||||
dark
|
dark
|
||||||
color="secondary-darken-1"
|
color="secondary-darken-1"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue