From 57d1b89d314970bf56d3d398c393f6a67a4ed0b5 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Sat, 21 Dec 2019 20:14:33 +0100
Subject: viewer: Isolated the Directory and Image views in their own
 components

---
 viewer/src/views/Gallery.vue | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

(limited to 'viewer/src/views/Gallery.vue')

diff --git a/viewer/src/views/Gallery.vue b/viewer/src/views/Gallery.vue
index 55b93db..10ff323 100644
--- a/viewer/src/views/Gallery.vue
+++ b/viewer/src/views/Gallery.vue
@@ -1,19 +1,18 @@
 <template>
   <div id="test-flex-col">
-    <div v-if="isDirectory">
-      <strong>Directory: {{currentItem.path}}</strong>
-      <div v-for="(item, index) in currentItem.properties.items" :key="item.path">
-        <router-link :to="item.path">Thumbnail: {{index}}-{{item.path}}</router-link>
-      </div>
-    </div>
-    <div v-if="isImage">Image: {{currentItem.path}}</div>
+    <gallery-directory v-if="isDirectory" :directory="currentItem" />
+    <gallery-image v-if="isImage" :image="currentItem" />
   </div>
 </template>
 
 <script lang="ts">
 import { Component, Vue, Prop } from "vue-property-decorator";
+import GalleryDirectory from "./GalleryDirectory.vue";
+import GalleryImage from "./GalleryImage.vue";
 
-@Component
+@Component({
+  components: { GalleryDirectory, GalleryImage },
+})
 export default class Root extends Vue {
   @Prop(String) readonly pathMatch!: string;
 
-- 
cgit v1.2.3

