From 0734d4b344f8ff98a00890fa1f3c3995837dea11 Mon Sep 17 00:00:00 2001
From: HampusM <hampus@hampusmat.com>
Date: Thu, 3 Jun 2021 12:05:43 +0200
Subject: Created a breadcrumb component & the tree page has a breadcrumb and a
 better font size

---
 src/frontend/views/RepositoryTree.vue | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

(limited to 'src/frontend/views/RepositoryTree.vue')

diff --git a/src/frontend/views/RepositoryTree.vue b/src/frontend/views/RepositoryTree.vue
index 80a5c3b..dc2c067 100644
--- a/src/frontend/views/RepositoryTree.vue
+++ b/src/frontend/views/RepositoryTree.vue
@@ -5,7 +5,15 @@
 			v-model:active="is_loading" :height="24"
 			:width="24" color="#ffffff"
 			:opacity="0" />
-		<div class="col ms-4 ps-4 ps-sm-5 mt-3">
+		<div class="col ms-4 ps-4 ps-sm-5 mt-3 fs-5">
+			<BaseBreadcrumb
+				:items="[{ name: repository, path: '/' + repository + '/tree' }].concat(pathArr.slice(0, -1).map((path_part, index) =>
+				{
+					return {
+						name: path_part,
+						path: '/' + repository + '/tree/' + pathArr.slice(0, index + 1).join('/')
+					}
+				}))" :active-item="pathArr[pathArr.length - 1]" />
 			<RepositoryTreeTree
 				:repository="repository" :path="path"
 				:tree="tree" v-if="type === 'tree'" />
@@ -20,6 +28,7 @@
 import RepositoryNavbar from "../components/RepositoryNavbar";
 import RepositoryTreeTree from "../components/RepositoryTreeTree";
 import RepositoryTreeBlob from "../components/RepositoryTreeBlob";
+import BaseBreadcrumb from "../components/BaseBreadcrumb";
 import Loading from "vue-loading-overlay";
 import 'vue-loading-overlay/dist/vue-loading.css';
 import { ref } from "vue";
@@ -30,7 +39,8 @@ export default {
 		RepositoryNavbar,
 		Loading,
 		RepositoryTreeTree,
-		RepositoryTreeBlob
+		RepositoryTreeBlob,
+		BaseBreadcrumb
 	},
 	props: {
 		repository: {
-- 
cgit v1.2.3-18-g5258

