add links in components Navbar

This commit is contained in:
ogerly 2021-12-08 17:44:16 +01:00
parent 139e537e94
commit adadbf2720
3 changed files with 34 additions and 13 deletions

View File

@ -7,18 +7,30 @@
</router-link>
</div>
<b-nav-text center>{{ balance }} GDD</b-nav-text>
<b-navbar-toggle target="nav-collapse"></b-navbar-toggle>
<b-collapse id="nav-collapse" is-nav>
<b-collapse id="nav-collapse">
<b-navbar-nav class="d-none d-md-flex d-sm-flex">
<b-nav-item to="/overview">{{ $t('overview') }}</b-nav-item>
<b-nav-item to="/send">{{ $t('send') }}</b-nav-item>
<b-nav-item to="/transactions">{{ $t('transactions') }}</b-nav-item>
<b-nav-item to="/profile">{{ $t('site.navbar.my-profil') }}</b-nav-item>
<hr />
<b-nav-item to="/overview" class="mb-3" active>Overview</b-nav-item>
<b-nav-item to="/send" class="mb-3">Link</b-nav-item>
<b-nav-item to="/transactions" class="mb-3">Another Link</b-nav-item>
<b-nav-item to="/profile" class="mb-3" disabled>Disabled</b-nav-item>
<b-nav-item to="/#" class="mb-3" @click="this.$emit('get-elopage-link')" target="_blank">
{{ $t('members_area') }}
<b-badge v-if="!$store.state.hasElopage" pill variant="danger">!</b-badge>
</b-nav-item>
<b-nav-item
v-if="$store.state.isAdmin"
to="/#"
class="mb-3"
@click="this.$emit('admin')"
target="_blank"
>
{{ $t('admin_area') }}
</b-nav-item>
<b-nav-item to="/#" class="mb-3" @click="this.$emit('logout')">
{{ $t('logout') }}
</b-nav-item>
</b-navbar-nav>
<!-- Right aligned nav items -->
@ -43,12 +55,21 @@
</b-nav-item-dropdown>
</b-navbar-nav>
</b-collapse>
<b-navbar-toggle target="nav-collapse"></b-navbar-toggle>
</b-navbar>
</div>
</template>
<script>
export default {
name: 'navbar',
props: {
balance: {
type: Number,
required: true,
},
},
data() {
return {
logo: 'img/brand/green.png',

View File

@ -6,10 +6,10 @@
<p></p>
<div class="mb-6">
<b-nav vertical class="w-200">
<b-nav-item to="/overview" class="mb-3" active>Overview</b-nav-item>
<b-nav-item to="/send" class="mb-3">Link</b-nav-item>
<b-nav-item to="/transactions" class="mb-3">Another Link</b-nav-item>
<b-nav-item to="/profile" class="mb-3" disabled>Disabled</b-nav-item>
<b-nav-item to="/overview" class="mb-3" active>{{ $t('overview') }}</b-nav-item>
<b-nav-item to="/send" class="mb-3">{{ $t('send') }}</b-nav-item>
<b-nav-item to="/transactions" class="mb-3">{{ $t('transactions') }}</b-nav-item>
<b-nav-item to="/profile" class="mb-3" disabled>{{ $t('profile') }}</b-nav-item>
</b-nav>
<hr />
<b-nav vertical class="w-100">

View File

@ -1,9 +1,9 @@
<template>
<div>
<navbar @get-elopage-link="getElopageLink" @admin="admin" />
<navbar :balance="balance" @get-elopage-link="getElopageLink" @admin="admin" @logout="logout"/>
<div style="display: inline-flex">
<div class="d-none d-sm-none d-md-none d-lg-flex shadow-lg" style="width: 300px">
<sidebar @get-elopage-link="getElopageLink" @admin="admin" />
<sidebar @get-elopage-link="getElopageLink" @admin="admin" @logout="logout" />
</div>
<div>