aboutsummaryrefslogtreecommitdiff
path: root/viewer
diff options
context:
space:
mode:
authorpacien2020-02-25 16:03:00 +0100
committerNotkea2020-02-25 19:18:00 +0100
commit2766f5f9a491c5f7ebf1eeac1c970daec3656be2 (patch)
tree59e626febb85476a6bc476b94cb28fc186729c34 /viewer
parent9f5b07ccde8f54bb4d1905c8d51e69f762aed057 (diff)
downloadldgallery-2766f5f9a491c5f7ebf1eeac1c970daec3656be2.tar.gz
transverse: combine item tree and gallery-wide properties
GitHub: closes #142
Diffstat (limited to 'viewer')
-rw-r--r--viewer/src/@types/gallery.d.ts7
-rw-r--r--viewer/src/store/galleryStore.ts1
2 files changed, 8 insertions, 0 deletions
diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts
index 03d21fc..d7645b6 100644
--- a/viewer/src/@types/gallery.d.ts
+++ b/viewer/src/@types/gallery.d.ts
@@ -22,6 +22,13 @@ declare namespace Gallery {
22 galleryRoot: string, 22 galleryRoot: string,
23 } 23 }
24 24
25 interface GalleryProperties {
26 // empty for now
27 }
28 interface Index {
29 properties: GalleryProperties,
30 tree: Item
31 }
25 interface Other extends Item { 32 interface Other extends Item {
26 properties: OtherProperties, 33 properties: OtherProperties,
27 } 34 }
diff --git a/viewer/src/store/galleryStore.ts b/viewer/src/store/galleryStore.ts
index d2b28dd..cd09996 100644
--- a/viewer/src/store/galleryStore.ts
+++ b/viewer/src/store/galleryStore.ts
@@ -77,6 +77,7 @@ export default class GalleryStore extends VuexModule {
77 const root = this.config?.galleryRoot ?? ''; 77 const root = this.config?.galleryRoot ?? '';
78 return fetch(`${process.env.VUE_APP_DATA_URL}${root}index.json`, { cache: "no-cache" }) 78 return fetch(`${process.env.VUE_APP_DATA_URL}${root}index.json`, { cache: "no-cache" })
79 .then(response => response.json()) 79 .then(response => response.json())
80 .then(index => index.tree)
80 .then(this.setGalleryItemsRoot) 81 .then(this.setGalleryItemsRoot)
81 .then(this.indexTags); 82 .then(this.indexTags);
82 } 83 }