From 252dd6fc6f53ecd8b28e05a0514429472d53d08e Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 31 Jan 2020 06:46:31 +0100
Subject: viewer: finalized the command buttons. added the 'up to parent'
 command

---
 viewer/src/views/PanelTop.vue | 64 ++++++++-----------------------------------
 1 file changed, 12 insertions(+), 52 deletions(-)

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

diff --git a/viewer/src/views/PanelTop.vue b/viewer/src/views/PanelTop.vue
index e7421f0..3553789 100644
--- a/viewer/src/views/PanelTop.vue
+++ b/viewer/src/views/PanelTop.vue
@@ -19,64 +19,24 @@
 
 <template>
   <div class="flex">
-    <div class="command-btns">
-      <fa-icon icon="tags" size="lg" class="disabled" />
-      <router-link to="/" :class="{disabled: $galleryStore.currentItemPath.length <= 1}">
-        <fa-icon icon="home" size="lg" />
-      </router-link>
-      <div class="link" @click="$router.go(-1)">
-        <fa-icon icon="arrow-left" size="lg" />
-      </div>
-    </div>
-    <ul class="pathBreadcrumb">
-      <li v-for="(item,idx) in $galleryStore.currentItemPath" :key="item.path">
-        <router-link :to="item.path">
-          <fa-icon :icon="getIcon(item)" size="lg" />
-          {{item.title}}
-        </router-link>
-        <fa-icon v-if="(idx+1) < $galleryStore.currentItemPath.length" icon="angle-right" />
-      </li>
-    </ul>
+    <top-command />
+    <top-breadcrumb />
   </div>
 </template>
 
 <script lang="ts">
-import { Component, Vue, Prop, Watch } from "vue-property-decorator";
-import Gallery from "./Gallery.vue";
+import { Component, Vue } from "vue-property-decorator";
+import TopBreadcrumb from "./TopBreadcrumb.vue";
+import TopCommand from "./TopCommand.vue";
 
-@Component
-export default class PanelTop extends Vue {
-  getIcon(item: Gallery.Item) {
-    if (item.path.length <= 1) return "home";
-    switch (item.properties.type) {
-      case "picture":
-        return "image";
-      case "directory":
-        return "folder";
-    }
-  }
-}
+@Component({
+  components: {
+    TopCommand,
+    TopBreadcrumb,
+  },
+})
+export default class PanelTop extends Vue {}
 </script>
 
 <style lang="scss">
-@import "@/assets/scss/theme.scss";
-
-.pathBreadcrumb {
-  display: flex;
-  list-style: none;
-  margin: 5px;
-  a {
-    margin-right: 5px;
-  }
-  li:not(:first-child) {
-    margin-left: 10px;
-  }
-}
-.command-btns {
-  display: flex;
-  justify-content: space-around;
-  vertical-align: middle;
-  align-items: center;
-  width: $layout-left;
-}
 </style>
-- 
cgit v1.2.3


From 170da2d55fec0359cbac780786383710b734eda7 Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 31 Jan 2020 09:17:57 +0100
Subject: viewer: code cleaning, moved some views to components

---
 viewer/src/views/PanelTop.vue | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

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

diff --git a/viewer/src/views/PanelTop.vue b/viewer/src/views/PanelTop.vue
index 3553789..60722cd 100644
--- a/viewer/src/views/PanelTop.vue
+++ b/viewer/src/views/PanelTop.vue
@@ -19,22 +19,15 @@
 
 <template>
   <div class="flex">
-    <top-command />
-    <top-breadcrumb />
+    <ld-command />
+    <ld-breadcrumb />
   </div>
 </template>
 
 <script lang="ts">
 import { Component, Vue } from "vue-property-decorator";
-import TopBreadcrumb from "./TopBreadcrumb.vue";
-import TopCommand from "./TopCommand.vue";
 
-@Component({
-  components: {
-    TopCommand,
-    TopBreadcrumb,
-  },
-})
+@Component
 export default class PanelTop extends Vue {}
 </script>
 
-- 
cgit v1.2.3

