Skip to content

Commit

Permalink
Adapt card width depending if action menu is hidden or not
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Jan 31, 2025
1 parent a3a4df0 commit f6e8616
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/BrandCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-card :title="brand" prepend-icon="mdi-factory" data-name="brand-card">
<v-card-text>
<v-row>
<v-col cols="11">
<v-col :cols="hideActionMenuButton ? '12' : '11'">
<ProductCountChip :count="productCount" :withLabel="true" />
</v-col>
</v-row>
Expand Down
2 changes: 1 addition & 1 deletion src/components/CategoryCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-card v-if="category" :title="category.name" prepend-icon="mdi-fruit-watermelon" data-name="category-card">
<v-card-text>
<v-row>
<v-col cols="11">
<v-col :cols="hideActionMenuButton ? '12' : '11'">
<ProductCountChip v-if="sourceCategory" :count="productCount" :withLabel="true" />
<PriceCountChip v-else-if="sourceProduct" :count="priceCount" />
<CategoryTagChip v-if="showProductCategoryTag" class="mr-1" :category="category" :readonly="true" />
Expand Down
2 changes: 1 addition & 1 deletion src/components/CurrencyCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-card :title="currency" prepend-icon="mdi-cash" data-name="currency-card">
<v-card-text>
<v-row>
<v-col cols="11">
<v-col :cols="hideActionMenuButton ? '12' : '11'">
<PriceCountChip :count="priceCount" :withLabel="true" />
</v-col>
</v-row>
Expand Down
4 changes: 2 additions & 2 deletions src/components/DateCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-card :title="date" prepend-icon="mdi-calendar-today" data-name="date-card">
<v-card-text>
<v-row>
<v-col cols="11">
<v-col :cols="hideActionMenuButton ? '12' : '11'">
<PriceCountChip :count="priceCount" :withLabel="true" />
<v-chip
v-for="dp in dateParentList"
Expand All @@ -14,7 +14,7 @@
</v-col>
</v-row>

<DateActionMenuButton v-if="hideActionMenuButton" :date="date" />
<DateActionMenuButton v-if="!hideActionMenuButton" :date="date" />
</v-card-text>
</v-card>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/LabelCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-card :title="label" prepend-icon="mdi-sticker-text-outline" data-name="label-card">
<v-card-text>
<v-row>
<v-col cols="11">
<v-col :cols="hideActionMenuButton ? '12' : '11'">
<ProductCountChip :count="productCount" :withLabel="true" />
</v-col>
</v-row>
Expand Down
2 changes: 1 addition & 1 deletion src/components/PriceFooterRow.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<v-row style="margin-top:0;">
<v-col cols="11">
<v-col :cols="hideActionMenuButton ? '12' : '11'">
<ProofChip v-if="price.proof && !hidePriceProof" class="mr-1" :proof="price.proof" />
<LocationChip v-if="!hidePriceLocation" class="mr-1" :location="price.location" :locationId="price.location_id" :readonly="readonly" />
<UserChip v-if="!hidePriceOwner" class="mr-1" :username="price.owner" :readonly="readonly" />
Expand Down
2 changes: 1 addition & 1 deletion src/components/UserCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
>
<v-card-text>
<v-row>
<v-col cols="11">
<v-col :cols="hideActionMenuButton ? '12' : '11'">
<PriceCountChip :count="user.price_count" :withLabel="true" />
<v-chip v-if="user.location_count" label size="small" density="comfortable" class="mr-1">
<v-icon start icon="mdi-map-marker-outline" />
Expand Down

0 comments on commit f6e8616

Please sign in to comment.