fix: correct macro API for textarea, file-input, and tag-input in compose UI

- label is a string, not { text: "..." }
- EasyMDE editor enabled via field.attributes (editor, editor-endpoint, editor-id, editor-image-upload)
- file-input endpoint goes in field.attributes.endpoint
- tag-input uses flat opts (label string, hint string)
- Bump to 3.11.1
This commit is contained in:
Ricardo
2026-03-29 16:14:02 +02:00
parent 7c9318fa08
commit 2e7024886b
3 changed files with 27 additions and 15 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "@rmdes/indiekit-endpoint-activitypub", "name": "@rmdes/indiekit-endpoint-activitypub",
"version": "3.11.0", "version": "3.11.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@rmdes/indiekit-endpoint-activitypub", "name": "@rmdes/indiekit-endpoint-activitypub",
"version": "3.11.0", "version": "3.11.1",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@fedify/debugger": "^2.1.0", "@fedify/debugger": "^2.1.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@rmdes/indiekit-endpoint-activitypub", "name": "@rmdes/indiekit-endpoint-activitypub",
"version": "3.11.0", "version": "3.11.1",
"description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.", "description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.",
"keywords": [ "keywords": [
"indiekit", "indiekit",
+24 -12
View File
@@ -45,33 +45,45 @@
{# Rich content editor (EasyMDE with media browser) #} {# Rich content editor (EasyMDE with media browser) #}
<div class="ap-compose__editor"> <div class="ap-compose__editor">
{{ textarea({ {{ textarea({
id: "content",
name: "content", name: "content",
label: { text: __("activitypub.compose.contentLabel") if __("activitypub.compose.contentLabel") else "Content" }, label: "Content",
attributes: { rows: 8,
rows: "8", field: {
required: "true" attributes: {
}, editor: true,
endpoint: mediaEndpoint "editor-endpoint": mediaEndpoint,
"editor-id": "ap-compose-content",
"editor-locale": application.locale if application else "en",
"editor-image-upload": true
}
}
}) }} }) }}
</div> </div>
{# Featured image #} {# Featured image #}
<div class="ap-compose__media"> <div class="ap-compose__media">
{{ fileInput({ {{ fileInput({
id: "photo",
name: "photo", name: "photo",
label: { text: __("activitypub.compose.photoLabel") if __("activitypub.compose.photoLabel") else "Photo" }, label: "Photo",
endpoint: mediaEndpoint field: {
attributes: {
endpoint: mediaEndpoint
}
},
accept: "image/*",
attributes: {
placeholder: "https://"
}
}) }} }) }}
</div> </div>
{# Tags / categories #} {# Tags / categories #}
<div class="ap-compose__tags"> <div class="ap-compose__tags">
{{ tagInput({ {{ tagInput({
id: "category",
name: "category", name: "category",
label: { text: __("activitypub.compose.tagsLabel") if __("activitypub.compose.tagsLabel") else "Tags" } label: "Tags",
optional: true,
hint: "Separate with commas"
}) }} }) }}
</div> </div>