Implement remote account resolution

This commit is contained in:
Akihiko Odaki
2018-03-27 16:51:12 +09:00
parent bee892d446
commit 68ce6d5748
73 changed files with 735 additions and 334 deletions

View File

@@ -1,12 +1,12 @@
<template>
<div class="mk-user-preview">
<router-link class="avatar-anchor" :to="`/@${user.username}`">
<router-link class="avatar-anchor" :to="`/@${acct}`">
<img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<div class="main">
<header>
<router-link class="name" :to="`/@${user.username}`">{{ user.name }}</router-link>
<span class="username">@{{ user.username }}</span>
<router-link class="name" :to="`/@${acct}`">{{ user.name }}</router-link>
<span class="username">@{{ acct }}</span>
</header>
<div class="body">
<div class="description">{{ user.description }}</div>
@@ -17,8 +17,15 @@
<script lang="ts">
import Vue from 'vue';
import getAcct from '../../../../../common/user/get-acct';
export default Vue.extend({
props: ['user']
props: ['user'],
computed: {
acct() {
return getAcct(this.user);
}
}
});
</script>