Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/gallery image offline #2557

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Unit tests of cart module written in jest - @lukeromanowicz (#2305)

### Fixed
-
- Gallery low quality image in offline mode when high quality already cached - @patzick (#2557)

### Changed / Improved
- The `core/helpers` parsing URL methods exchanged to `query-string` package - @pkarw (#2446)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"all": "cross-env NODE_ENV=development node ./core/scripts/all",
"cache": "node ./core/scripts/cache",
"dev": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" ts-node ./core/scripts/entry.ts",
"dev:sw": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" yarn build:sw && ts-node ./core/scripts/entry",
"dev:sw": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" yarn build:sw && yarn dev",
"dev:inspect": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" node --inspect -r ts-node/register ./core/scripts/entry",
"build:sw": "cross-env NODE_ENV=production TS_NODE_PROJECT=\"tsconfig-build.json\" webpack --config ./core/build/webpack.prod.sw.config.ts --mode production --progress --hide-modules",
"build:client": "cross-env NODE_ENV=production TS_NODE_PROJECT=\"tsconfig-build.json\" webpack --config ./core/build/webpack.prod.client.config.ts --mode production --progress --hide-modules",
Expand Down
10 changes: 1 addition & 9 deletions src/themes/default/components/core/ProductGallery.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<template>
<div class="media-gallery" :class="{'media-gallery--loaded': carouselLoaded}">
<div v-show="OfflineOnly">
<img class="offline-image" v-lazy="offline" :src="offline.src" ref="offline" alt="">
</div>
<div v-show="OnlineOnly" class="relative">
<div class="relative">
<product-gallery-overlay
v-if="isZoomOpen"
:current-slide="currentSlide"
Expand All @@ -30,7 +27,6 @@ import { ProductGallery } from '@vue-storefront/core/modules/catalog/components/
import ProductGalleryOverlay from './ProductGalleryOverlay'
import onEscapePress from '@vue-storefront/core/mixins/onEscapePress'
import NoSSR from 'vue-no-ssr'
import VueOfflineMixin from 'vue-offline/mixin'
const ProductGalleryCarousel = () => import(/* webpackChunkName: "vsf-product-gallery-carousel" */ './ProductGalleryCarousel.vue')

export default {
Expand All @@ -41,7 +37,6 @@ export default {
},
mixins: [
ProductGallery,
VueOfflineMixin,
onEscapePress
],
watch: {
Expand Down Expand Up @@ -97,7 +92,4 @@ export default {
background-image: none;
}
}
.offline-image {
width: 100%;
}
</style>
1 change: 0 additions & 1 deletion src/themes/default/pages/Product.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<div class="col-xs-12 col-md-6 center-xs middle-xs image">
<product-gallery
:gallery="gallery"
:offline="offlineImage"
:configuration="configuration"
:product="product"
/>
Expand Down