init
This commit is contained in:
commit
44f31f8b9f
402 changed files with 47865 additions and 0 deletions
71
components/Navbar.vue
Normal file
71
components/Navbar.vue
Normal file
|
@ -0,0 +1,71 @@
|
|||
<template>
|
||||
<b-navbar wrapper-class="container" class="header">
|
||||
<template slot="brand">
|
||||
<b-navbar-item tag="router-link" to="/" active-class="">
|
||||
<Logo />
|
||||
</b-navbar-item>
|
||||
</template>
|
||||
<template slot="start">
|
||||
<b-navbar-item
|
||||
v-if="isEnabledGovernance"
|
||||
tag="router-link"
|
||||
to="/governance"
|
||||
:active="$route.path.includes('governance')"
|
||||
class="has-tag"
|
||||
>
|
||||
{{ $t('governance') }} <span v-if="hasActiveProposals" class="navbar-item--tag"></span>
|
||||
</b-navbar-item>
|
||||
<b-navbar-item tag="router-link" to="/compliance">
|
||||
{{ $t('compliance') }}
|
||||
</b-navbar-item>
|
||||
<b-navbar-item href="http://docs.tornado.cash" target="_blank" rel="noreferrer" class="has-tag">
|
||||
<b-icon icon="open-book" size="is-small" class="mr-1" />
|
||||
<span>{{ $t('docs') }}</span>
|
||||
</b-navbar-item>
|
||||
</template>
|
||||
<template slot="end">
|
||||
<b-navbar-item tag="div">
|
||||
<div class="buttons">
|
||||
<network-navbar-icon />
|
||||
<metamask-navbar-icon />
|
||||
<indicator />
|
||||
<b-button icon-left="settings" type="is-primary" outlined @mousedown.prevent @click="onAccount">
|
||||
{{ $t('settings') }}
|
||||
</b-button>
|
||||
</div>
|
||||
</b-navbar-item>
|
||||
</template>
|
||||
</b-navbar>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapGetters } from 'vuex'
|
||||
import Logo from '@/components/Logo'
|
||||
import { Indicator } from '@/modules/account'
|
||||
import MetamaskNavbarIcon from '@/components/MetamaskNavbarIcon'
|
||||
import NetworkNavbarIcon from '@/components/NetworkNavbarIcon'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Logo,
|
||||
Indicator,
|
||||
NetworkNavbarIcon,
|
||||
MetamaskNavbarIcon
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isActive: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('metamask', ['netId', 'isLoggedIn']),
|
||||
...mapGetters('governance/gov', ['isEnabledGovernance']),
|
||||
...mapState('governance/gov', ['hasActiveProposals'])
|
||||
},
|
||||
methods: {
|
||||
onAccount() {
|
||||
this.$router.push('/account')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue