Danke, Moin. Ich habe das Theme geforkt und die Datei javascripts/discourse/connectors/topic-list-item/item.gjs bearbeitet.
Ich hoffe, das hilft jemandem weiter.
- Ich habe dies hinzugefügt:
get likeCount() {
return (
this.args.outletArgs.topic.like_count ??
this.args.outletArgs.topic.likeCount ??
0
);
}
Unterhalb von:
@action
share(event) {
event.stopPropagation();
this.modal.show(ShareTopicModal, {
model: { topic: this.args.outletArgs.topic },
});
}
get likeCount() {
return (
this.args.outletArgs.topic.like_count ??
this.args.outletArgs.topic.likeCount ??
0
);
}
<template>
- Dann habe ich dies geändert:
<div class="custom-topic-layout_bottom-bar">
<span class="reply-count">
{{icon "reply"}}
{{@outletArgs.topic.replyCount}}
{{i18n "replies"}}
</span>
In dies:
<div class="custom-topic-layout_bottom-bar">
<span class="like-count">
{{icon "heart"}}
{{this.likeCount}}
Likes
</span>
<span class="reply-count">
{{icon "reply"}}
{{@outletArgs.topic.replyCount}}
{{i18n "replies"}}
</span>