mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-11 14:40:46 +00:00
Update PostComponent.vue
This commit is contained in:
parent
8a32194a0a
commit
ba19fb22a3
1 changed files with 10 additions and 1 deletions
|
@ -299,6 +299,7 @@ export default {
|
||||||
let el = $(v);
|
let el = $(v);
|
||||||
el.val(token);
|
el.val(token);
|
||||||
});
|
});
|
||||||
|
this.loadLikes();
|
||||||
this.fetchData();
|
this.fetchData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -363,7 +364,15 @@ export default {
|
||||||
}
|
}
|
||||||
$('.postPresenterLoader').addClass('d-none');
|
$('.postPresenterLoader').addClass('d-none');
|
||||||
$('.postPresenterContainer').removeClass('d-none');
|
$('.postPresenterContainer').removeClass('d-none');
|
||||||
}
|
},
|
||||||
|
loadLikes() {
|
||||||
|
let likes = ls.get('likes');
|
||||||
|
if(likes.length != 0) {
|
||||||
|
if(likes.indexOf(this.status.id) == 0) {
|
||||||
|
$('.far.fa-heart.text-dark').addClass('fas text-danger').removeClass('far text-dark');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
Reference in a new issue