From 06f028bf5aefba7d93a7a00373ea820f4537bfd3 Mon Sep 17 00:00:00 2001
From: HampusM <hampus@hampusmat.com>
Date: Fri, 28 May 2021 17:27:29 +0200
Subject: Added a clone-dropdown & made multiple small frontend improvements

---
 src/frontend/components/RepositoryNavbar.vue | 30 +++++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 5 deletions(-)

(limited to 'src/frontend/components/RepositoryNavbar.vue')

diff --git a/src/frontend/components/RepositoryNavbar.vue b/src/frontend/components/RepositoryNavbar.vue
index a1e1002..87a32d6 100644
--- a/src/frontend/components/RepositoryNavbar.vue
+++ b/src/frontend/components/RepositoryNavbar.vue
@@ -4,9 +4,16 @@
 			<nav class="navbar navbar-expand navbar-dark">
 				<div class="container-fluid px-0">
 					<div class="collapse navbar-collapse">
-						<ul class="navbar-nav">
-							<li v-for="(item, index) in nav_items" v-bind:key="index" class="nav-item">
-								<a class="nav-link fs-4" :class="{ active: activePage === item }" :aria-current="(activePage === item) ? 'page' : ''" :href="item">{{ item }}</a>
+						<ul class="navbar-nav align-items-center flex-fill">
+							<li
+								v-for="(item, index) in nav_items" :key="index"
+								class="nav-item">
+								<a
+									class="nav-link fs-4" :class="{ active: activePage === item }"
+									:aria-current="(activePage === item) ? 'page' : ''" :href="item">{{ item }}</a>
+							</li>
+							<li class="nav-item ms-auto me-4">
+								<RepositoryCloneDropdown :repository="repository" class="d-block" />
 							</li>
 						</ul>
 					</div>
@@ -17,15 +24,28 @@
 </template>
 
 <script>
+import RepositoryCloneDropdown from "./RepositoryCloneDropdown";
+
 export default {
 	name: "RepositoryNavbar",
 	props: {
-		activePage: String
+		activePage: {
+			type: String,
+			required: true
+		},
+		repository: {
+			type: String,
+			required: true
+		}
+	},
+	components: {
+		RepositoryCloneDropdown
 	},
 	data()
 	{
 		return {
-			nav_items: ["log", "refs", "tree"]
+			nav_items: [ "log", "refs", "tree" ],
+			url: `${window.location.protocol}//${window.location.host}/${this.repository}`
 		};
 	}
 }
-- 
cgit v1.2.3-18-g5258

