diff options
| author | Akihiko Odaki <nekomanma@pixiv.co.jp> | 2018-04-06 01:36:34 +0900 |
|---|---|---|
| committer | Akihiko Odaki <nekomanma@pixiv.co.jp> | 2018-04-06 01:36:34 +0900 |
| commit | f0e8e6392b5ef99488ea0bbecbf9029e30ef0cfa (patch) | |
| tree | 736d3fe581b6b9169d8e676453019e1d2afec876 /src/client/app/mobile/views/components/notification.vue | |
| parent | Merge pull request #1403 from akihikodaki/duplicate (diff) | |
| download | sharkey-f0e8e6392b5ef99488ea0bbecbf9029e30ef0cfa.tar.gz sharkey-f0e8e6392b5ef99488ea0bbecbf9029e30ef0cfa.tar.bz2 sharkey-f0e8e6392b5ef99488ea0bbecbf9029e30ef0cfa.zip | |
Allow name property of user to be null
Diffstat (limited to 'src/client/app/mobile/views/components/notification.vue')
| -rw-r--r-- | src/client/app/mobile/views/components/notification.vue | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/client/app/mobile/views/components/notification.vue b/src/client/app/mobile/views/components/notification.vue index 189d7195fb..62a0e6425e 100644 --- a/src/client/app/mobile/views/components/notification.vue +++ b/src/client/app/mobile/views/components/notification.vue @@ -8,7 +8,7 @@ <div class="text"> <p> <mk-reaction-icon :reaction="notification.reaction"/> - <router-link :to="`/@${acct}`">{{ notification.user.name }}</router-link> + <router-link :to="`/@${acct}`">{{ getUserName(notification.user) }}</router-link> </p> <router-link class="post-ref" :to="`/@${acct}/${notification.post.id}`"> %fa:quote-left%{{ getPostSummary(notification.post) }} @@ -25,7 +25,7 @@ <div class="text"> <p> %fa:retweet% - <router-link :to="`/@${acct}`">{{ notification.post.user.name }}</router-link> + <router-link :to="`/@${acct}`">{{ getUserName(notification.post.user) }}</router-link> </p> <router-link class="post-ref" :to="`/@${acct}/${notification.post.id}`"> %fa:quote-left%{{ getPostSummary(notification.post.repost) }}%fa:quote-right% @@ -45,7 +45,7 @@ <div class="text"> <p> %fa:user-plus% - <router-link :to="`/@${acct}`">{{ notification.user.name }}</router-link> + <router-link :to="`/@${acct}`">{{ getUserName(notification.user) }}</router-link> </p> </div> </div> @@ -66,7 +66,7 @@ <div class="text"> <p> %fa:chart-pie% - <router-link :to="`/@${acct}`">{{ notification.user.name }}</router-link> + <router-link :to="`/@${acct}`">{{ getUserName(notification.user) }}</router-link> </p> <router-link class="post-ref" :to="`/@${acct}/${notification.post.id}`"> %fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right% @@ -80,12 +80,19 @@ import Vue from 'vue'; import getPostSummary from '../../../../../renderers/get-post-summary'; import getAcct from '../../../../../acct/render'; +import getUserName from '../../../../../renderers/get-user-name'; export default Vue.extend({ props: ['notification'], computed: { acct() { return getAcct(this.notification.user); + }, + name() { + return getUserName(this.notification.user); + }, + posterName() { + return getUserName(this.notification.post.user); } }, data() { |