Make tags clickable again

fixes #1158
This commit is contained in:
Marcel Klehr 2020-08-13 11:41:32 +02:00
parent f564075ad7
commit b9bc12331e
1 changed files with 16 additions and 1 deletions

View File

@ -1,11 +1,17 @@
<template>
<div class="tagline">
<div v-for="tag in tags" :key="tag" class="tagline__tag">
<div v-for="tag in tags"
:key="tag"
class="tagline__tag"
role="button"
@click="clickTag(tag)">
{{ tag }}
</div>
</div>
</template>
<script>
import { privateRoutes, publicRoutes } from '../router'
export default {
name: 'TagLine',
components: {},
@ -18,8 +24,16 @@ export default {
data() {
return {}
},
computed: {
routes() {
return this.$store.state.public ? publicRoutes : privateRoutes
},
},
created() {},
methods: {
clickTag(tag) {
this.$router.push({ name: this.routes.TAGS, params: { tags: tag } })
},
},
}
</script>
@ -40,6 +54,7 @@ export default {
padding: 5px 10px;
margin-right: 3px;
background-color: var(--color-main-background);
cursor: pointer;
}
.tagline__tag:hover {