mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
implement back to wallet or logout in navbar, remove profile thingy
This commit is contained in:
parent
aa7b46b342
commit
7e5bfcff2b
@ -16,17 +16,43 @@
|
|||||||
>
|
>
|
||||||
| {{ $store.state.openCreations }} offene Schöpfungen
|
| {{ $store.state.openCreations }} offene Schöpfungen
|
||||||
</b-nav-item>
|
</b-nav-item>
|
||||||
<b-nav-item class="mr-auto">Wallet</b-nav-item>
|
<b-nav-item @click="wallet">Wallet</b-nav-item>
|
||||||
<b-nav-item class="mr-auto">Logout</b-nav-item>
|
<b-nav-item @click="logout">Logout</b-nav-item>
|
||||||
<!-- <b-nav-item v-show="open < 1" to="/creation-confirm">| keine offene Schöpfungen</b-nav-item> -->
|
<!-- <b-nav-item v-show="open < 1" to="/creation-confirm">| keine offene Schöpfungen</b-nav-item> -->
|
||||||
</b-navbar-nav>
|
</b-navbar-nav>
|
||||||
</b-collapse>
|
</b-collapse>
|
||||||
<b-navbar-brand href="http://localhost:3000/vue/login">Profilbereich</b-navbar-brand>
|
|
||||||
</b-navbar>
|
</b-navbar>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import CONFIG from '../config'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'navbar',
|
name: 'navbar',
|
||||||
|
methods: {
|
||||||
|
logout() {
|
||||||
|
// TODO
|
||||||
|
// this.$emit('logout')
|
||||||
|
/* this.$apollo
|
||||||
|
.query({
|
||||||
|
query: logout,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.$store.dispatch('logout')
|
||||||
|
this.$router.push('/logout')
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$store.dispatch('logout')
|
||||||
|
if (this.$router.currentRoute.path !== '/logout') this.$router.push('/logout')
|
||||||
|
})
|
||||||
|
*/
|
||||||
|
this.$store.dispatch('logout')
|
||||||
|
this.$router.push('/logout')
|
||||||
|
},
|
||||||
|
wallet() {
|
||||||
|
window.location = CONFIG.WALLET_AUTH_URL.replace('$1',this.$store.state.token)
|
||||||
|
this.$store.dispatch('logout') // logout without redirect
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user