2019-08-09 11:32:14 +02:00
|
|
|
<template>
|
|
|
|
<span>
|
2019-09-20 18:22:03 +02:00
|
|
|
<span v-if="actor.domain === null"
|
2019-08-09 11:32:14 +02:00
|
|
|
:to="{name: 'Profile', params: { name: actor.preferredUsername } }"
|
|
|
|
>
|
|
|
|
<slot></slot>
|
2019-09-20 18:22:03 +02:00
|
|
|
</span>
|
2019-08-09 11:32:14 +02:00
|
|
|
<a v-else :href="actor.url">
|
|
|
|
<slot></slot>
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Prop, Vue } from 'vue-property-decorator';
|
|
|
|
import { IActor } from '@/types/actor';
|
|
|
|
|
|
|
|
@Component
|
|
|
|
export default class ActorLink extends Vue {
|
|
|
|
@Prop() actor!: IActor;
|
|
|
|
}
|
|
|
|
</script>
|