@rmdes/indiekit-endpoint-posts 1.0.0-beta.43 → 1.0.0-beta.44
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.
package/lib/controllers/form.js
CHANGED
|
@@ -85,6 +85,15 @@ export const formController = {
|
|
|
85
85
|
delete values.postType;
|
|
86
86
|
delete values["publication-date"];
|
|
87
87
|
|
|
88
|
+
// Map content-warning text to summary when post is marked sensitive
|
|
89
|
+
// and the post type doesn't have its own summary field
|
|
90
|
+
if (values.sensitive && values["content-warning"]) {
|
|
91
|
+
if (!values.summary) {
|
|
92
|
+
values.summary = values["content-warning"];
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
delete values["content-warning"];
|
|
96
|
+
|
|
88
97
|
// Easy MDE appends `image` value to formData for last image uploaded
|
|
89
98
|
delete values.image;
|
|
90
99
|
|
package/lib/controllers/posts.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmdes/indiekit-endpoint-posts",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.44",
|
|
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",
|
package/views/post-form.njk
CHANGED
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
label: __("posts.form.sensitive.hint"),
|
|
83
83
|
value: "true",
|
|
84
84
|
conditional: input({
|
|
85
|
-
name: "
|
|
86
|
-
value: properties
|
|
85
|
+
name: "content-warning",
|
|
86
|
+
value: properties["content-warning"],
|
|
87
87
|
label: __("posts.form.summary.label"),
|
|
88
88
|
optional: true
|
|
89
89
|
})
|