diff options
Diffstat (limited to 'packages/client/src/components/RepositoryNavbar.vue')
-rw-r--r-- | packages/client/src/components/RepositoryNavbar.vue | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/packages/client/src/components/RepositoryNavbar.vue b/packages/client/src/components/RepositoryNavbar.vue index c69762f..f709976 100644 --- a/packages/client/src/components/RepositoryNavbar.vue +++ b/packages/client/src/components/RepositoryNavbar.vue @@ -6,7 +6,7 @@ <div class="collapse navbar-collapse"> <ul class="navbar-nav align-items-center flex-fill"> <li - v-for="(item, index) in ['log', 'refs', 'tree']" :key="index" + v-for="(item, index) in nav_items" :key="index" class="nav-item"> <router-link class="nav-link fs-4" :class="{ active: activePage === item }" @@ -38,10 +38,25 @@ export default { activePage: { type: String, required: true + }, + hasReadme: { + type: Boolean, + required: true } }, components: { RepositoryCloneDropdown + }, + data() { + return { + nav_items: [ "log", "refs", "tree" ] + }; + }, + watch: { + hasReadme() { + console.log("HEEEJ"); + this.nav_items = [ "about" ].concat(this.nav_items); + } } }; </script> |