mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
25 lines
588 B
Vue
25 lines
588 B
Vue
<template lang="pug">
|
|
b-link(
|
|
v-if='group',
|
|
@click.prevent='goToGroup'
|
|
) {{group.name}}
|
|
</template>
|
|
|
|
<script>
|
|
import { TAVERN_ID } from '../../common/script/constants';
|
|
|
|
export default {
|
|
props: ['group'],
|
|
methods: {
|
|
goToGroup () {
|
|
if (this.group.type === 'party') {
|
|
this.$router.push({name: 'party'});
|
|
} else if (this.group._id === TAVERN_ID) {
|
|
this.$router.push({name: 'tavern'});
|
|
} else {
|
|
this.$router.push({name: 'guild', params: {groupId: this.group._id}});
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script> |