Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Image height in home screen mobile format #4088

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions frontend/components/Domain/Recipe/RecipeCardImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<v-img
v-if="!fallBackImage"
:height="height"
min-height="125"
max-height="fill-height"
:src="getImage(recipeId)"
@click="$emit('click')"
@load="fallBackImage = false"
Expand Down Expand Up @@ -52,8 +54,8 @@ export default defineComponent({
default: null,
},
height: {
type: Number,
default: 200,
type: [Number, String],
default: "fill-height",
},
},
setup(props) {
Expand Down
10 changes: 7 additions & 3 deletions frontend/components/Domain/Recipe/RecipeCardMobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
</v-img>
<v-list-item three-line :class="vertical ? 'px-2' : 'px-0'">
<slot v-if="!vertical" name="avatar">
<v-list-item-avatar tile size="125" class="v-mobile-img rounded-sm my-0">
<v-list-item-avatar tile width="125" height="avatarSize" class="v-mobile-img rounded-sm my-0">
<RecipeCardImage
:icon-size="100"
:height="125"
:height="avatarSize"
:slug="slug"
:recipe-id="recipeId"
small
:image-version="image"
small
/>
</v-list-item-avatar>
</slot>
Expand Down Expand Up @@ -135,6 +135,10 @@ export default defineComponent({
type: Boolean,
default: false,
},
avatarSize: {
type: [Number, String],
default: 125,
},
},
setup(props) {
const { $auth } = useContext();
Expand Down
3 changes: 2 additions & 1 deletion frontend/components/Domain/Recipe/RecipeCardSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</v-list>
</v-menu>
<ContextMenu
v-if="!$vuetify.breakpoint.xsOnly"
v-if="!$vuetify.breakpoint.smAndDown"
:items="[
{
title: $tc('general.toggle-view'),
Expand Down Expand Up @@ -104,6 +104,7 @@
:image="recipe.image"
:tags="recipe.tags"
:recipe-id="recipe.id"
avatar-size="fill-height"
/>
</v-lazy>
</v-col>
Expand Down
Loading