0
1
Fork 0

Show catalog zoom images correct resolution and add spinner in preview catalog item

This commit is contained in:
William Buezas 2024-11-27 21:41:00 -03:00
parent af7db23fed
commit 0806f63d8d
3 changed files with 11 additions and 3 deletions

View File

@ -67,6 +67,10 @@ const url = computed(() => {
return `${props.baseURL ?? app.imageUrl}/${props.storage}/${props.size}/${props.id}`; return `${props.baseURL ?? app.imageUrl}/${props.storage}/${props.size}/${props.id}`;
}); });
const zoomUrl = computed(() => {
return `${props.baseURL ?? app.imageUrl}/${props.storage}/${props.zoomSize}/${props.id}`;
});
const rounded = computed(() => { const rounded = computed(() => {
const roundedMap = { const roundedMap = {
none: '', none: '',
@ -114,7 +118,7 @@ const rounded = computed(() => {
<QDialog v-if="props.zoomSize" v-model="showZoom"> <QDialog v-if="props.zoomSize" v-model="showZoom">
<QImg <QImg
:src="url" :src="zoomUrl"
size="full" size="full"
class="img_zoom" class="img_zoom"
v-bind="$attrs" v-bind="$attrs"

View File

@ -27,6 +27,7 @@ const { t } = useI18n();
:id="item.image" :id="item.image"
height="210px" height="210px"
rounded="bottom" rounded="bottom"
zoom-size="1600x900"
/> />
<div <div
class="column" class="column"
@ -117,6 +118,7 @@ const { t } = useI18n();
height="105px" height="105px"
rounded-borders="full" rounded-borders="full"
class="q-mr-md" class="q-mr-md"
zoom-size="1600x900"
/> />
</template> </template>
<template #content> <template #content>

View File

@ -180,7 +180,7 @@
/> />
</div> </div>
<QDialog v-model="showItemDialog" @hide="resetAmounts()"> <QDialog v-model="showItemDialog" @hide="resetAmounts()">
<QCard style="width: 25em" class="column"> <QCard v-if="selectedItem" style="width: 25em" class="column">
<div class="q-pa-md relative-position"> <div class="q-pa-md relative-position">
<div class="q-mb-md" style="display: flex"> <div class="q-mb-md" style="display: flex">
<VnImg <VnImg
@ -282,6 +282,7 @@
</QBtn> </QBtn>
</div> </div>
</QCard> </QCard>
<QSpinner v-else color="primary" size="3em" :thickness="5" />
</QDialog> </QDialog>
</div> </div>
</template> </template>
@ -753,11 +754,11 @@ const getSubcategories = async () => {
const showItem = async item => { const showItem = async item => {
if (checkGuest()) return; if (checkGuest()) return;
showItemDialog.value = true;
const itemLots = await calcItem(item.id); const itemLots = await calcItem(item.id);
const tags = await getItemTags(item.id); const tags = await getItemTags(item.id);
item.lots = itemLots; item.lots = itemLots;
item.tags = tags; item.tags = tags;
showItemDialog.value = true;
selectedItem.value = item; selectedItem.value = item;
}; };
@ -848,6 +849,7 @@ const onAddLotClick = async lot => {
}; };
const resetAmounts = () => { const resetAmounts = () => {
selectedItem.value = null;
addedItemsAmountAcc.value = {}; addedItemsAmountAcc.value = {};
amount.value = 0; amount.value = 0;
}; };