From 139568f85e2d9e19bee51d7830aea0ff50d55802 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Fri, 7 Sep 2018 15:13:10 +0200 Subject: [PATCH] Fix slider component as well to use local images --- flatisfy/web/js_src/components/slider.vue | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/flatisfy/web/js_src/components/slider.vue b/flatisfy/web/js_src/components/slider.vue index d5f476e..76fa6eb 100644 --- a/flatisfy/web/js_src/components/slider.vue +++ b/flatisfy/web/js_src/components/slider.vue @@ -1,15 +1,15 @@ @@ -27,6 +27,17 @@ export default { isotope }, + computed: { + photosURLOrLocal() { + return this.photos.map(photo => { + if (photo.local) { + return `/data/img/${photo.local}`; + } + return photo.url; + }); + }, + }, + created () { window.addEventListener('keydown', event => { if (!this.isModalOpen) {