aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components/LdBreadcrumb.vue
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/components/LdBreadcrumb.vue')
-rw-r--r--viewer/src/components/LdBreadcrumb.vue17
1 files changed, 11 insertions, 6 deletions
diff --git a/viewer/src/components/LdBreadcrumb.vue b/viewer/src/components/LdBreadcrumb.vue
index 7f7ef7d..643bfb6 100644
--- a/viewer/src/components/LdBreadcrumb.vue
+++ b/viewer/src/components/LdBreadcrumb.vue
@@ -29,24 +29,29 @@
29 > 29 >
30 <div v-show="overflowMask" class="ld-breadcrumb-overflow-mask"></div> 30 <div v-show="overflowMask" class="ld-breadcrumb-overflow-mask"></div>
31 <ul class="ld-breadcrumb"> 31 <ul class="ld-breadcrumb">
32 <li v-for="(item,idx) in $galleryStore.currentItemPath" :key="item.path"> 32 <li v-for="(item,idx) in currentItemPath" :key="item.path">
33 <fa-icon v-if="idx > 0" icon="angle-right" class="disabled" /> 33 <fa-icon v-if="idx > 0" icon="angle-right" class="disabled" />
34 <router-link :to="item.path" class="link"> 34 <router-link :to="item.path" class="link">
35 <fa-icon :icon="getIcon(item)" size="lg" /> 35 <fa-icon :icon="getIcon(item)" size="lg" />
36 {{item.title}} 36 {{item.title}}
37 </router-link> 37 </router-link>
38 </li> 38 </li>
39 <li v-if="searchMode">
40 <fa-icon icon="search" size="lg" class="disabled" />
41 </li>
39 </ul> 42 </ul>
40 </div> 43 </div>
41</template> 44</template>
42 45
43<script lang="ts"> 46<script lang="ts">
44import { Component, Vue, Ref, Watch } from "vue-property-decorator"; 47import { Component, Vue, Ref, Watch, Prop } from "vue-property-decorator";
45import DragScrollClickFix from "@/dragscrollclickfix"; 48import DragScrollClickFix from "@/services/dragscrollclickfix";
46import Tools from "@/tools"; 49import Navigation from "@/services/navigation";
47 50
48@Component 51@Component
49export default class LdBreadcrumb extends Vue { 52export default class LdBreadcrumb extends Vue {
53 @Prop({ required: true }) readonly currentItemPath!: Gallery.Item[];
54 @Prop(Boolean) readonly searchMode!: boolean;
50 @Ref() readonly breadcrumb!: HTMLUListElement; 55 @Ref() readonly breadcrumb!: HTMLUListElement;
51 56
52 readonly dragScrollClickFix = new DragScrollClickFix(); 57 readonly dragScrollClickFix = new DragScrollClickFix();
@@ -66,7 +71,7 @@ export default class LdBreadcrumb extends Vue {
66 this.overflowMask = this.breadcrumb.scrollLeft > 1; 71 this.overflowMask = this.breadcrumb.scrollLeft > 1;
67 } 72 }
68 73
69 @Watch("$galleryStore.currentItemPath") 74 @Watch("currentItemPath")
70 changedCurrentItemPath() { 75 changedCurrentItemPath() {
71 this.$nextTick(() => { 76 this.$nextTick(() => {
72 this.breadcrumb.scrollLeft = this.breadcrumb.scrollWidth; 77 this.breadcrumb.scrollLeft = this.breadcrumb.scrollWidth;
@@ -75,7 +80,7 @@ export default class LdBreadcrumb extends Vue {
75 } 80 }
76 81
77 getIcon(item: Gallery.Item) { 82 getIcon(item: Gallery.Item) {
78 return Tools.getIcon(item); 83 return Navigation.getIcon(item);
79 } 84 }
80} 85}
81</script> 86</script>