diff options
author | HampusM <hampus@hampusmat.com> | 2021-05-28 17:27:29 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-05-28 17:27:29 +0200 |
commit | 06f028bf5aefba7d93a7a00373ea820f4537bfd3 (patch) | |
tree | ed61bf00c5150d22c76d7226557bfb1e31228c99 /src/frontend/components/RepositoryNavbar.vue | |
parent | bdfc5d2d092fdce8fb4149ae8acb86b63c14c642 (diff) |
Added a clone-dropdown & made multiple small frontend improvements
Diffstat (limited to 'src/frontend/components/RepositoryNavbar.vue')
-rw-r--r-- | src/frontend/components/RepositoryNavbar.vue | 30 |
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}` }; } } |