Skip to content

Commit

Permalink
fix: remove edit scale icon when not scalable (#4849)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuchenpirat authored Jan 7, 2025
1 parent d3c6106 commit 688d07a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions frontend/components/Domain/Recipe/RecipeScaleEditButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
<div>
<v-menu v-model="menu" :disabled="!canEditScale" offset-y top nudge-top="6" :close-on-content-click="false">
<template #activator="{ on, attrs }">
<v-card class="pa-1 px-2" dark color="secondary darken-1" small v-bind="attrs" v-on="on">
<v-icon small class="mr-2">{{ $globals.icons.edit }}</v-icon>
<v-card
class="pa-1 px-2"
dark
color="secondary darken-1"
small
v-bind="attrs"
:style="{ cursor: canEditScale ? '' : 'default' }"
v-on="on"
>
<v-icon v-if="canEditScale" small class="mr-2">{{ $globals.icons.edit }}</v-icon>
<!-- eslint-disable-next-line vue/no-v-html -->
<span v-html="yieldDisplay"></span>

</v-card>
</template>
<v-card min-width="300px">
Expand Down

0 comments on commit 688d07a

Please sign in to comment.