c00a1d74f9
* - Use `router-link` in `groupLink` to make links that can be followed in a new tab * - Add back the missing `if` statement that was removed in error
39 lines
597 B
Vue
39 lines
597 B
Vue
<template>
|
|
<router-link
|
|
v-if="group"
|
|
:to="toPath"
|
|
>
|
|
{{ group.name }}
|
|
</router-link>
|
|
</template>
|
|
|
|
<script>
|
|
import { TAVERN_ID } from '@/../../common/script/constants';
|
|
|
|
export default {
|
|
props: ['group'],
|
|
computed: {
|
|
toPath () {
|
|
if (this.group._id === TAVERN_ID) {
|
|
return {
|
|
name: 'tavern',
|
|
};
|
|
}
|
|
|
|
if (this.group.type === 'party') {
|
|
return {
|
|
name: 'party',
|
|
};
|
|
}
|
|
|
|
return {
|
|
name: 'guild',
|
|
params: {
|
|
groupId: this.group._id,
|
|
},
|
|
};
|
|
},
|
|
},
|
|
};
|
|
</script>
|