mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-30 16:30:45 +00:00
Update NotificationCard.vue, fix share notifications
This commit is contained in:
parent
844566b9e7
commit
3cb676b18b
1 changed files with 2 additions and 7 deletions
|
@ -40,7 +40,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="n.type == 'share'">
|
<div v-else-if="n.type == 'share'">
|
||||||
<p class="my-0">
|
<p class="my-0">
|
||||||
<a :href="n.account.url" class="font-weight-bold text-dark word-break" :title="n.account.username">{{truncate(n.account.username)}}</a> shared your <a class="font-weight-bold" v-bind:href="n.status.reblog.url">post</a>.
|
<a :href="n.account.url" class="font-weight-bold text-dark word-break" :title="n.account.username">{{truncate(n.account.username)}}</a> shared your <a class="font-weight-bold" v-bind:href="n.status.url">post</a>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="n.type == 'modlog'">
|
<div v-else-if="n.type == 'modlog'">
|
||||||
|
@ -90,12 +90,7 @@
|
||||||
fetchNotifications() {
|
fetchNotifications() {
|
||||||
axios.get('/api/pixelfed/v1/notifications')
|
axios.get('/api/pixelfed/v1/notifications')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
let data = res.data.filter(n => {
|
let data = res.data;
|
||||||
if(n.type == 'share' && !status) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
let ids = res.data.map(n => n.id);
|
let ids = res.data.map(n => n.id);
|
||||||
this.notificationMaxId = Math.min(...ids);
|
this.notificationMaxId = Math.min(...ids);
|
||||||
this.notifications = data;
|
this.notifications = data;
|
||||||
|
|
Loading…
Reference in a new issue