feat: allow comments on likes, reposts, and bookmarks

- Show textarea for all compose actions, not just replies
- Add bookmark button to item actions
- Comments will be included in syndication
This commit is contained in:
Ricardo
2026-02-06 20:41:16 +01:00
parent 4819c229cd
commit fabadd8585
4 changed files with 10 additions and 8 deletions

View File

@@ -43,6 +43,8 @@
"compose": {
"title": "Compose",
"content": "What's on your mind?",
"comment": "Add a comment (optional)",
"commentHint": "Your comment will be included when this is syndicated",
"submit": "Post",
"cancel": "Cancel",
"replyTo": "Replying to",

View File

@@ -1,6 +1,6 @@
{
"name": "@rmdes/indiekit-endpoint-microsub",
"version": "1.0.13",
"version": "1.0.14",
"description": "Microsub endpoint for Indiekit. Enables subscribing to feeds and reading content using the Microsub protocol.",
"keywords": [
"indiekit",

View File

@@ -60,18 +60,17 @@
{% set isAction = likeOf or repostOf or bookmarkOf %}
{% if not isAction %}
{{ textarea({
label: __("microsub.compose.content"),
label: __("microsub.compose.content") if not isAction else __("microsub.compose.comment"),
id: "content",
name: "content",
rows: 5,
attributes: { autofocus: true }
rows: 5 if not isAction else 3,
attributes: { autofocus: true },
hint: __("microsub.compose.commentHint") if isAction else false
}) }}
<div class="compose__counter">
<span id="char-count">0</span> characters
</div>
{% endif %}
<div class="button-group">
{{ button({
@@ -84,7 +83,6 @@
</form>
</div>
{% if not isAction %}
<script type="module">
const textarea = document.getElementById('content');
const counter = document.getElementById('char-count');
@@ -94,5 +92,4 @@
});
}
</script>
{% endif %}
{% endblock %}

View File

@@ -9,6 +9,9 @@
<a href="{{ baseUrl }}/compose?repostOf={{ itemUrl | urlencode }}" class="item-actions__button" title="{{ __('microsub.item.repost') }}">
{{ icon("repost") }}
</a>
<a href="{{ baseUrl }}/compose?bookmarkOf={{ itemUrl | urlencode }}" class="item-actions__button" title="{{ __('microsub.item.bookmark') }}">
{{ icon("bookmark") }}
</a>
<a href="{{ itemUrl }}" class="item-actions__button" target="_blank" rel="noopener" title="{{ __('microsub.item.viewOriginal') }}">
{{ icon("public") }}
</a>