Skip to content

Commit

Permalink
feat: Shopping list UI overhaul - add label headings per category (#4235
Browse files Browse the repository at this point in the history
)

Co-authored-by: Kuchenpirat <[email protected]>
  • Loading branch information
Wetzel402 and Kuchenpirat authored Sep 24, 2024
1 parent d1e3b64 commit 04dc593
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion frontend/pages/group/data/labels.vue
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export default defineComponent({
editLabel.value = item;
if (!editLabel.value.color) {
editLabel.value.color = "#E0E0E0";
editLabel.value.color = "#959595";
}
}
Expand Down
12 changes: 4 additions & 8 deletions frontend/pages/shopping-lists/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,11 @@

<!-- View By Label -->
<div v-else>
<div v-for="(value, key, idx) in itemsByLabel" :key="key" class="mb-6">
<div @click="toggleShowChecked()">
<span v-if="idx || key !== $tc('shopping-list.no-label')">
<v-icon :color="getLabelColor(value[0])">
{{ $globals.icons.tags }}
</v-icon>
</span>
{{ key }}
<div v-for="(value, key) in itemsByLabel" :key="key" class="mb-6">
<div class="text-left">
<v-btn :color="getLabelColor(value[0]) ? getLabelColor(value[0]) : '#959595'">{{ key }}</v-btn>
</div>
<v-divider/>
<draggable :value="value" handle=".handle" delay="250" :delay-on-touch-only="true" @start="loadingCounter += 1" @end="loadingCounter -= 1" @input="updateIndexUncheckedByLabel(key, $event)">
<v-lazy v-for="(item, index) in value" :key="item.id" class="ml-2 my-2">
<ShoppingListItem
Expand Down
2 changes: 1 addition & 1 deletion mealie/schema/labels/multi_purpose_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class MultiPurposeLabelCreate(MealieModel):
name: str
color: str = "#E0E0E0"
color: str = "#959595"


class MultiPurposeLabelSave(MultiPurposeLabelCreate):
Expand Down

0 comments on commit 04dc593

Please sign in to comment.