aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/components/RepositoryNavbar.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/components/RepositoryNavbar.vue')
-rw-r--r--src/frontend/components/RepositoryNavbar.vue30
1 files changed, 25 insertions, 5 deletions
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}`
};
}
}