summaryrefslogtreecommitdiff
path: root/iridescence/src/components/Navbar.vue
diff options
context:
space:
mode:
Diffstat (limited to 'iridescence/src/components/Navbar.vue')
-rw-r--r--iridescence/src/components/Navbar.vue27
1 files changed, 18 insertions, 9 deletions
diff --git a/iridescence/src/components/Navbar.vue b/iridescence/src/components/Navbar.vue
index 551ce5a..16415bb 100644
--- a/iridescence/src/components/Navbar.vue
+++ b/iridescence/src/components/Navbar.vue
@@ -25,7 +25,13 @@
About
</router-link>
</div>
- <div class="navbar-end">
+
+ <div class="navbar-end" v-if="routeName == 'Administration'">
+ <div class="navbar-item">
+ <NewProduct></NewProduct>
+ </div>
+ </div>
+ <div class="navbar-end" v-else>
<div
class="navbar-item has-dropdown is-active"
v-for="category in categories.keys()"
@@ -45,14 +51,7 @@
</div>
<div class="navbar-item">
- <div class="buttons">
- <button class="button">
- Cart (5)
- </button>
- <button class="button is-info">
- Checkout
- </button>
- </div>
+ <CartCheckout></CartCheckout>
</div>
</div>
</div>
@@ -61,8 +60,15 @@
</template>
<script>
+import CartCheckout from "@/components/CartCheckout.vue";
+import NewProduct from "@/components/admin/NewProduct.vue";
+
export default {
name: "Navbar",
+ components: {
+ CartCheckout,
+ NewProduct
+ },
data() {
return {
isMenuActive: false
@@ -80,6 +86,9 @@ export default {
const products = this.$store.getters.products;
console.log(products.map(item => item.categories));
return [];
+ },
+ routeName() {
+ return this.$route.name;
}
},
methods: {