Skip to content

Commit 156dfec

Browse files
author
Marcin Kwiatkowski
committed
feat: added support for @vue-storefront/cache module (#482)
* chore(theme): added nuxt-image * feat(theme): added nuxt-img to category page * feat: added nuxt-img to category pages, added newe configs, and useImage compoosable * feat(theme): added nuxt-img to products carousel, added image enums * feat(theme): added nuxt-img for search results * feat(theme): added nuxt-img to my account wishlist * feat(theme): changed log to use nuxt-img * feat(theme): changed empty cart icon to use nuxt-img * feat(theme): added nuxt-img to instagram feed, updated image names * feat(theme): changed error image on search results to use nuxt-img * feat(theme): update store switcher to use nuxt-img instead of SfImage * feat(theme): added nuxt-img to wishlist sidebar * feat(theme): added nuxt-img to MobileStoreBanner * feat(theme): added nuxt-img to grouoped product selector * feat(theme): added nuxt-img to payment component * docs: added docs for external images providers * build(cloud): updated vuestorefront cloud docker file and added new args * build: updated deploy gh action to add image env vatiables * docs(configuration): updated docs for image providers * build: added missed buildargs * build: fixed dockerfile * build: fixed typo in docker file * build: updated config * test: add unit tests for the useImage composable * chore(theme): added @vue-storefront-cache module * chore(theme): added config for @vue-storefront/cache to nuxt.config.js * feat(theme): added cache tags to home and category page * chore(theme): added redis-cache module, fixed cache tags for category page * feat(theme): added cache tags to product page, added body parser server middleware * build: added config for redis, modified deployment config for tests * build: removed unnecessary redis_password env variable * build: fixed redis env variables names * feat(theme): added cache tags for cms pages * chore(theme): removed console.logs, added comments to nuxt.config.js * build: removed redis-cache module from package.json and addet it to dockerfile * build: updated dockerfile * build(updzted docker file): updated dovkerfile * build: added REDIS__ENABLED env variable * docs: added docs for redis caching * build: reverted test changes in deploy action * fix(theme): removed typo from Category template n * build: fixed GH deploy action
1 parent 60bb27a commit 156dfec

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

docs/.vuepress/config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ module.exports = {
7070
['/guide/configuration', 'Configuration'],
7171
['/guide/override-queries', 'Override queries'],
7272
['/guide/testing', 'Testing'],
73-
['/guide/recaptcha', 'ReCaptcha']
73+
['/guide/recaptcha', 'ReCaptcha'],
74+
['/guide/testing', 'Testing']
7475
]
7576
},
7677
{

packages/theme/pages/Category.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@
253253
</template>
254254
<template #actions>
255255
<SfButton
256-
class="sf-button--text products__product-card-horizontal__add-to-wishlist"
256+
class="sf-button--text desktop-only"
257+
style="margin: 0 0 1rem auto; display: block"
257258
@click="addItemToWishlist(product)"
258259
>
259260
{{ isInWishlist({product}) ? $t('Remove from Wishlist') : $t('Save for later') }}
@@ -646,12 +647,16 @@ export default defineComponent({
646647
647648
const tags = [{ prefix: CacheTagPrefix.View, value: 'category' }];
648649
// eslint-disable-next-line no-underscore-dangle
649-
const productTags = products.value.map((product) => ({ prefix: CacheTagPrefix.Product, value: product.uid }));
650+
const productTags = products.value.map((product) => {
651+
return { prefix: CacheTagPrefix.Product, value: product.uid };
652+
});
650653
651-
const categoriesTags = categoryTree.value.items.map((category) => ({ prefix: CacheTagPrefix.Category, value: category.slug }));
654+
const categoriesTags = categoryTree.value.items.map((category) => {
655+
return { prefix: CacheTagPrefix.Category, value: category.slug };
656+
});
652657
653658
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
654-
addTags([...tags, ...productTags, ...categoriesTags]);
659+
addTags(tags.concat(productTags, categoriesTags));
655660
});
656661
657662
const { getMagentoImage, imageSizes } = useImage();

0 commit comments

Comments
 (0)