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:
@@ -43,6 +43,8 @@
|
|||||||
"compose": {
|
"compose": {
|
||||||
"title": "Compose",
|
"title": "Compose",
|
||||||
"content": "What's on your mind?",
|
"content": "What's on your mind?",
|
||||||
|
"comment": "Add a comment (optional)",
|
||||||
|
"commentHint": "Your comment will be included when this is syndicated",
|
||||||
"submit": "Post",
|
"submit": "Post",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"replyTo": "Replying to",
|
"replyTo": "Replying to",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@rmdes/indiekit-endpoint-microsub",
|
"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.",
|
"description": "Microsub endpoint for Indiekit. Enables subscribing to feeds and reading content using the Microsub protocol.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"indiekit",
|
"indiekit",
|
||||||
|
|||||||
+4
-7
@@ -60,18 +60,17 @@
|
|||||||
|
|
||||||
{% set isAction = likeOf or repostOf or bookmarkOf %}
|
{% set isAction = likeOf or repostOf or bookmarkOf %}
|
||||||
|
|
||||||
{% if not isAction %}
|
|
||||||
{{ textarea({
|
{{ textarea({
|
||||||
label: __("microsub.compose.content"),
|
label: __("microsub.compose.content") if not isAction else __("microsub.compose.comment"),
|
||||||
id: "content",
|
id: "content",
|
||||||
name: "content",
|
name: "content",
|
||||||
rows: 5,
|
rows: 5 if not isAction else 3,
|
||||||
attributes: { autofocus: true }
|
attributes: { autofocus: true },
|
||||||
|
hint: __("microsub.compose.commentHint") if isAction else false
|
||||||
}) }}
|
}) }}
|
||||||
<div class="compose__counter">
|
<div class="compose__counter">
|
||||||
<span id="char-count">0</span> characters
|
<span id="char-count">0</span> characters
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
{{ button({
|
{{ button({
|
||||||
@@ -84,7 +83,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if not isAction %}
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
const textarea = document.getElementById('content');
|
const textarea = document.getElementById('content');
|
||||||
const counter = document.getElementById('char-count');
|
const counter = document.getElementById('char-count');
|
||||||
@@ -94,5 +92,4 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
<a href="{{ baseUrl }}/compose?repostOf={{ itemUrl | urlencode }}" class="item-actions__button" title="{{ __('microsub.item.repost') }}">
|
<a href="{{ baseUrl }}/compose?repostOf={{ itemUrl | urlencode }}" class="item-actions__button" title="{{ __('microsub.item.repost') }}">
|
||||||
{{ icon("repost") }}
|
{{ icon("repost") }}
|
||||||
</a>
|
</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') }}">
|
<a href="{{ itemUrl }}" class="item-actions__button" target="_blank" rel="noopener" title="{{ __('microsub.item.viewOriginal') }}">
|
||||||
{{ icon("public") }}
|
{{ icon("public") }}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user