@rmdes/indiekit-endpoint-posts 1.0.0-beta.40 → 1.0.0-beta.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -93,6 +93,11 @@ export const formController = {
93
93
  delete values.layout;
94
94
  }
95
95
 
96
+ // Remove empty pinned/featured flag
97
+ if (!values.pinned) {
98
+ delete values.pinned;
99
+ }
100
+
96
101
  // Remove empty AI usage fields
97
102
  for (const key of ["ai-text-level", "ai-code-level", "ai-tools", "ai-description"]) {
98
103
  if (!values[key]) {
package/locales/en.json CHANGED
@@ -121,6 +121,15 @@
121
121
  "visibility": {
122
122
  "label": "Visibility"
123
123
  },
124
+ "sensitive": {
125
+ "label": "Content warning",
126
+ "hint": "Mark this post as sensitive and add an optional warning text"
127
+ },
128
+ "pinned": {
129
+ "label": "Featured post",
130
+ "no": "No",
131
+ "yes": "Yes — pin to Featured section"
132
+ },
124
133
  "ai-text-level": {
125
134
  "label": "AI text level",
126
135
  "0": "0 — None",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-posts",
3
- "version": "1.0.0-beta.40",
3
+ "version": "1.0.0-beta.42",
4
4
  "description": "Post management endpoint for Indiekit with syndicate form fix. View posts published by your Micropub endpoint and publish new posts to it.",
5
5
  "keywords": [
6
6
  "indiekit",
@@ -40,9 +40,9 @@
40
40
  "url": "https://github.com/rmdes/indiekit-endpoint-posts.git"
41
41
  },
42
42
  "dependencies": {
43
- "@indiekit/endpoint-micropub": "^1.0.0-beta.25",
44
- "@indiekit/error": "^1.0.0-beta.25",
45
- "@indiekit/frontend": "^1.0.0-beta.25",
43
+ "@indiekit/endpoint-micropub": "^1.0.0-beta.27",
44
+ "@indiekit/error": "^1.0.0-beta.27",
45
+ "@indiekit/frontend": "^1.0.0-beta.27",
46
46
  "@indiekit/util": "^1.0.0-beta.25",
47
47
  "@paulrobertlloyd/mf2tojf2": "^3.0.0",
48
48
  "express": "^5.0.0",
@@ -72,6 +72,24 @@
72
72
  }]
73
73
  }) | indent(4) if fields.visibility }}
74
74
 
75
+ {{ checkboxes({
76
+ name: "sensitive",
77
+ values: properties.sensitive,
78
+ fieldset: {
79
+ legend: __("posts.form.sensitive.label")
80
+ },
81
+ items: [{
82
+ label: __("posts.form.sensitive.hint"),
83
+ value: "true",
84
+ conditional: input({
85
+ name: "summary",
86
+ value: properties.summary,
87
+ label: __("posts.form.summary.label"),
88
+ optional: true
89
+ })
90
+ }]
91
+ }) | indent(4) }}
92
+
75
93
  {{ input({
76
94
  classes: "input--width-25",
77
95
  name: "mp-slug",
@@ -97,6 +115,16 @@
97
115
  }) | indent(4) }}
98
116
  {% endif %}
99
117
 
118
+ {{ select({
119
+ name: "pinned",
120
+ label: __("posts.form.pinned.label"),
121
+ optional: true,
122
+ items: [
123
+ { text: __("posts.form.pinned.no"), value: "", selected: not properties.pinned },
124
+ { text: __("posts.form.pinned.yes"), value: "true", selected: properties.pinned === "true" or properties.pinned === true }
125
+ ]
126
+ }) | indent(4) }}
127
+
100
128
  {{ select({
101
129
  name: "ai-text-level",
102
130
  label: __("posts.form.ai-text-level.label"),