From 1b6bb39c3e2febf02afee2346415faefd0bd6002 Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 28 Nov 2024 09:23:25 +0100 Subject: [PATCH] feat: refs #8004 enhance FetchedTags component with column support and styling updates --- src/components/ui/FetchedTags.vue | 39 +++++++++++--- src/css/app.scss | 2 + src/pages/Item/ItemFixedPrice.vue | 2 +- src/pages/Item/ItemList.vue | 54 ++++++------------- .../Item/ItemType/Card/ItemTypeDescriptor.vue | 12 ++--- .../ItemType/Card/ItemTypeDescriptorProxy.vue | 17 ++++++ src/pages/Item/locale/en.yml | 2 +- src/pages/Item/locale/es.yml | 2 +- 8 files changed, 74 insertions(+), 56 deletions(-) create mode 100644 src/pages/Item/ItemType/Card/ItemTypeDescriptorProxy.vue diff --git a/src/components/ui/FetchedTags.vue b/src/components/ui/FetchedTags.vue index a0edf85f8..481e3a475 100644 --- a/src/components/ui/FetchedTags.vue +++ b/src/components/ui/FetchedTags.vue @@ -16,7 +16,13 @@ const $props = defineProps({ required: false, default: 'value', }, + columns: { + type: Number, + required: false, + default: null, + }, }); + const tags = computed(() => { return Object.keys($props.item) .filter((i) => i.startsWith(`${$props.tag}`)) @@ -28,10 +34,21 @@ const tags = computed(() => { return acc; }, {}); }); + +const columnStyle = computed(() => { + if ($props.columns) { + return { + 'grid-template-columns': `repeat(${$props.columns}, 1fr)`, + 'max-width': `${$props.columns * 4}rem`, + }; + } + return {}; +}); + -