Fix bugs
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<template v-if="notification.type == 'reaction'">
|
||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p><mk-reaction-icon :reaction="notification.reaction"/>{{ name }}</p>
|
||||
<p><mk-reaction-icon :reaction="notification.reaction"/>{{ getUserName(notification.user) }}</p>
|
||||
<p class="note-ref">%fa:quote-left%{{ getNoteSummary(notification.note) }}%fa:quote-right%</p>
|
||||
</div>
|
||||
</template>
|
||||
@@ -11,7 +11,7 @@
|
||||
<template v-if="notification.type == 'renote'">
|
||||
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p>%fa:retweet%{{ noteerName }}</p>
|
||||
<p>%fa:retweet%{{ getUserName(notification.note.user) }}</p>
|
||||
<p class="note-ref">%fa:quote-left%{{ getNoteSummary(notification.note.renote) }}%fa:quote-right%</p>
|
||||
</div>
|
||||
</template>
|
||||
@@ -19,7 +19,7 @@
|
||||
<template v-if="notification.type == 'quote'">
|
||||
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p>%fa:quote-left%{{ noteerName }}</p>
|
||||
<p>%fa:quote-left%{{ getUserName(notification.note.user) }}</p>
|
||||
<p class="note-preview">{{ getNoteSummary(notification.note) }}</p>
|
||||
</div>
|
||||
</template>
|
||||
@@ -27,14 +27,14 @@
|
||||
<template v-if="notification.type == 'follow'">
|
||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p>%fa:user-plus%{{ name }}</p>
|
||||
<p>%fa:user-plus%{{ getUserName(notification.user) }}</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="notification.type == 'reply'">
|
||||
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p>%fa:reply%{{ noteerName }}</p>
|
||||
<p>%fa:reply%{{ getUserName(notification.note.user) }}</p>
|
||||
<p class="note-preview">{{ getNoteSummary(notification.note) }}</p>
|
||||
</div>
|
||||
</template>
|
||||
@@ -42,7 +42,7 @@
|
||||
<template v-if="notification.type == 'mention'">
|
||||
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p>%fa:at%{{ noteerName }}</p>
|
||||
<p>%fa:at%{{ getUserName(notification.note.user) }}</p>
|
||||
<p class="note-preview">{{ getNoteSummary(notification.note) }}</p>
|
||||
</div>
|
||||
</template>
|
||||
@@ -50,7 +50,7 @@
|
||||
<template v-if="notification.type == 'poll_vote'">
|
||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<div class="text">
|
||||
<p>%fa:chart-pie%{{ name }}</p>
|
||||
<p>%fa:chart-pie%{{ getUserName(notification.user) }}</p>
|
||||
<p class="note-ref">%fa:quote-left%{{ getNoteSummary(notification.note) }}%fa:quote-right%</p>
|
||||
</div>
|
||||
</template>
|
||||
@@ -64,17 +64,10 @@ import getUserName from '../../../../../renderers/get-user-name';
|
||||
|
||||
export default Vue.extend({
|
||||
props: ['notification'],
|
||||
computed: {
|
||||
name() {
|
||||
return getUserName(this.notification.user);
|
||||
},
|
||||
noteerName() {
|
||||
return getUserName(this.notification.note.user);
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
getNoteSummary
|
||||
getNoteSummary,
|
||||
getUserName
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
<div class="mk-notification">
|
||||
<div class="notification reaction" v-if="notification.type == 'reaction'">
|
||||
<mk-time :time="notification.createdAt"/>
|
||||
<router-link class="avatar-anchor" :to="`/@${acct}`">
|
||||
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`">
|
||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
</router-link>
|
||||
<div class="text">
|
||||
<p>
|
||||
<mk-reaction-icon :reaction="notification.reaction"/>
|
||||
<router-link :to="`/@${acct}`">{{ getUserName(notification.user) }}</router-link>
|
||||
<router-link :to="`/@${getAcct(notification.user)}`">{{ getUserName(notification.user) }}</router-link>
|
||||
</p>
|
||||
<router-link class="note-ref" :to="`/@${acct}/${notification.note.id}`">
|
||||
<router-link class="note-ref" :to="`/@${getAcct(notification.note.user)}/${notification.note.id}`">
|
||||
%fa:quote-left%{{ getNoteSummary(notification.note) }}
|
||||
%fa:quote-right%
|
||||
</router-link>
|
||||
@@ -19,15 +19,15 @@
|
||||
|
||||
<div class="notification renote" v-if="notification.type == 'renote'">
|
||||
<mk-time :time="notification.createdAt"/>
|
||||
<router-link class="avatar-anchor" :to="`/@${acct}`">
|
||||
<img class="avatar" :src="`${notification.note.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`">
|
||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
</router-link>
|
||||
<div class="text">
|
||||
<p>
|
||||
%fa:retweet%
|
||||
<router-link :to="`/@${acct}`">{{ getUserName(notification.note.user) }}</router-link>
|
||||
<router-link :to="`/@${getAcct(notification.user)}`">{{ getUserName(notification.user) }}</router-link>
|
||||
</p>
|
||||
<router-link class="note-ref" :to="`/@${acct}/${notification.note.id}`">
|
||||
<router-link class="note-ref" :to="`/@${getAcct(notification.note.user)}/${notification.note.id}`">
|
||||
%fa:quote-left%{{ getNoteSummary(notification.note.renote) }}%fa:quote-right%
|
||||
</router-link>
|
||||
</div>
|
||||
@@ -39,13 +39,13 @@
|
||||
|
||||
<div class="notification follow" v-if="notification.type == 'follow'">
|
||||
<mk-time :time="notification.createdAt"/>
|
||||
<router-link class="avatar-anchor" :to="`/@${acct}`">
|
||||
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`">
|
||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
</router-link>
|
||||
<div class="text">
|
||||
<p>
|
||||
%fa:user-plus%
|
||||
<router-link :to="`/@${acct}`">{{ getUserName(notification.user) }}</router-link>
|
||||
<router-link :to="`/@${getAcct(notification.user)}`">{{ getUserName(notification.user) }}</router-link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,15 +60,15 @@
|
||||
|
||||
<div class="notification poll_vote" v-if="notification.type == 'poll_vote'">
|
||||
<mk-time :time="notification.createdAt"/>
|
||||
<router-link class="avatar-anchor" :to="`/@${acct}`">
|
||||
<router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`">
|
||||
<img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
</router-link>
|
||||
<div class="text">
|
||||
<p>
|
||||
%fa:chart-pie%
|
||||
<router-link :to="`/@${acct}`">{{ getUserName(notification.user) }}</router-link>
|
||||
<router-link :to="`/@${getAcct(notification.user)}`">{{ getUserName(notification.user) }}</router-link>
|
||||
</p>
|
||||
<router-link class="note-ref" :to="`/@${acct}/${notification.note.id}`">
|
||||
<router-link class="note-ref" :to="`/@${getAcct(notification.note.user)}/${notification.note.id}`">
|
||||
%fa:quote-left%{{ getNoteSummary(notification.note) }}%fa:quote-right%
|
||||
</router-link>
|
||||
</div>
|
||||
@@ -84,20 +84,11 @@ 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);
|
||||
},
|
||||
noteerName() {
|
||||
return getUserName(this.notification.note.user);
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
getNoteSummary
|
||||
getNoteSummary,
|
||||
getAcct,
|
||||
getUserName
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user