Skip to content

Commit

Permalink
feat: added support for @vue-storefront/cache module (#482)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Frodigo committed Feb 15, 2022
1 parent 60bb27a commit 156dfec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ module.exports = {
['/guide/configuration', 'Configuration'],
['/guide/override-queries', 'Override queries'],
['/guide/testing', 'Testing'],
['/guide/recaptcha', 'ReCaptcha']
['/guide/recaptcha', 'ReCaptcha'],
['/guide/testing', 'Testing']
]
},
{
Expand Down
13 changes: 9 additions & 4 deletions packages/theme/pages/Category.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@
</template>
<template #actions>
<SfButton
class="sf-button--text products__product-card-horizontal__add-to-wishlist"
class="sf-button--text desktop-only"
style="margin: 0 0 1rem auto; display: block"
@click="addItemToWishlist(product)"
>
{{ isInWishlist({product}) ? $t('Remove from Wishlist') : $t('Save for later') }}
Expand Down Expand Up @@ -646,12 +647,16 @@ export default defineComponent({
const tags = [{ prefix: CacheTagPrefix.View, value: 'category' }];
// eslint-disable-next-line no-underscore-dangle
const productTags = products.value.map((product) => ({ prefix: CacheTagPrefix.Product, value: product.uid }));
const productTags = products.value.map((product) => {
return { prefix: CacheTagPrefix.Product, value: product.uid };
});
const categoriesTags = categoryTree.value.items.map((category) => ({ prefix: CacheTagPrefix.Category, value: category.slug }));
const categoriesTags = categoryTree.value.items.map((category) => {
return { prefix: CacheTagPrefix.Category, value: category.slug };
});
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
addTags([...tags, ...productTags, ...categoriesTags]);
addTags(tags.concat(productTags, categoriesTags));
});
const { getMagentoImage, imageSizes } = useImage();
Expand Down

0 comments on commit 156dfec

Please sign in to comment.