diff --git a/public/generated_albums_config.json b/public/generated_albums_config.json
index 395025b..87bb101 100644
--- a/public/generated_albums_config.json
+++ b/public/generated_albums_config.json
@@ -1 +1 @@
-[{"name":"Album 1 name","description":"Album 2 description","protected":false,"coverFileName":"IMG_20200811_060850.jpg","photoDescription":{"IMG_20200811_060850.jpg":"Description 1","IMG_20200811_074445.jpg":"Description 2"},"folderName":"album_1","files":["IMG_20200811_060850.jpg","IMG_20200811_074445.jpg","IMG_20200811_080037.jpg","IMG_20200811_081746.jpg","IMG_20200811_084017.jpg"],"files_360":["photo.jpg"]}]
\ No newline at end of file
+[{"name":"Album 1 name","description":"Album 2 description","protected":false,"coverFileName":"IMG_20200811_060850.jpg","photoDescription":{"IMG_20200811_060850.jpg":"Description 1","IMG_20200811_074445.jpg":"Description 2"},"folderName":"album_1","files":["IMG_20200811_060850.jpg","IMG_20200811_074445.jpg","IMG_20200811_080037.jpg","IMG_20200811_081746.jpg","IMG_20200811_084017.jpg"],"files_360":["360-Video-Featured-StudioBinder-Compressed.jpg","photo.jpg"]}]
\ No newline at end of file
diff --git a/public/pictures/albums/album_1/360_photos/360-Video-Featured-StudioBinder-Compressed.jpg b/public/pictures/albums/album_1/360_photos/360-Video-Featured-StudioBinder-Compressed.jpg
new file mode 100644
index 0000000..031a32a
Binary files /dev/null and b/public/pictures/albums/album_1/360_photos/360-Video-Featured-StudioBinder-Compressed.jpg differ
diff --git a/src/components/Photo.vue b/src/components/Photo.vue
index f297809..152a37a 100644
--- a/src/components/Photo.vue
+++ b/src/components/Photo.vue
@@ -25,6 +25,9 @@ export default class Photo extends Vue {
@Prop({required: true})
public readonly album!: IAlbum;
+ @Prop({default: false})
+ public readonly t360!: boolean;
+
@Ref('element') public readonly element!: HTMLElement;
public height: string = '10px';
@@ -45,8 +48,9 @@ export default class Photo extends Vue {
}
get photoStyle() {
+ const folder = this.t360 ? "360_photos" : "photos";
return {
- 'background-image': `url('/pictures/albums/${this.album.folderName}/photos/${this.file}')`
+ 'background-image': `url('/pictures/albums/${this.album.folderName}/${folder}/${this.file}')`
}
}
@@ -57,7 +61,11 @@ export default class Photo extends Vue {
}
onClick() {
- this.$emit('clickPhoto', this.album.files.indexOf(this.file));
+ if (this.t360) {
+ this.$emit('clickPhoto', this.album.files_360.indexOf(this.file));
+ } else {
+ this.$emit('clickPhoto', this.album.files.indexOf(this.file));
+ }
}
mounted() {
diff --git a/src/types/vuejs-vr.d.ts b/src/types/vuejs-vr.d.ts
new file mode 100644
index 0000000..0745cf9
--- /dev/null
+++ b/src/types/vuejs-vr.d.ts
@@ -0,0 +1 @@
+declare module 'vuejs-vr';
diff --git a/src/views/Album.vue b/src/views/Album.vue
index 51131f8..57ac24a 100644
--- a/src/views/Album.vue
+++ b/src/views/Album.vue
@@ -9,6 +9,11 @@