@scalemule/news-publication 0.0.32 → 0.0.33
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/dist/story-review.cjs +4 -4
- package/dist/story-review.js +4 -4
- package/package.json +1 -1
- package/story-review.css +13 -10
package/dist/story-review.cjs
CHANGED
|
@@ -452,7 +452,7 @@ function StoryReview({
|
|
|
452
452
|
}
|
|
453
453
|
setPanel("share");
|
|
454
454
|
}
|
|
455
|
-
async function send(action, success) {
|
|
455
|
+
async function send(action, success, consumeDraft = true) {
|
|
456
456
|
if (!review || busy) return;
|
|
457
457
|
if (action.action === "APPROVE" && file) {
|
|
458
458
|
setNotice("Your photo is not uploaded yet. Upload it or remove the selection before approving.");
|
|
@@ -464,7 +464,7 @@ function StoryReview({
|
|
|
464
464
|
setNotice("");
|
|
465
465
|
try {
|
|
466
466
|
const actionPanel = { ANSWER_QUESTIONS: "questions", REQUEST_CHANGES: "changes", COMMENT: "comment", PROPOSE_EDITS: "edits", EDIT_MEDIA_METADATA: "metadata", APPROVE: "approve", DECLINE: "decline" }[String(action.action)];
|
|
467
|
-
const receipt = actionPanel ? await drafts.receipt(actionPanel) : void 0;
|
|
467
|
+
const receipt = consumeDraft && actionPanel ? await drafts.receipt(actionPanel) : void 0;
|
|
468
468
|
const sent = await request("", { revision_id: review.revision.id, ...action, ...receipt ? { draft: receipt } : {} });
|
|
469
469
|
if (sent.cleared_draft) drafts.consumed(sent.cleared_draft);
|
|
470
470
|
try {
|
|
@@ -800,7 +800,7 @@ function StoryReview({
|
|
|
800
800
|
className: `sm-review-actions${celebration ? " sm-review-concierge-actions" : ""}${panel !== "article" ? " sm-review-actions-editing" : ""}`,
|
|
801
801
|
"aria-label": "Review actions",
|
|
802
802
|
children: [
|
|
803
|
-
!can("APPROVE") && can("COMMENT") && (review.identity_required || review.participant) && /* @__PURE__ */ jsxRuntime.jsx("button", { disabled: busy, onClick: () => setPanel("feedback"), children: "Looks
|
|
803
|
+
!can("APPROVE") && can("COMMENT") && (review.identity_required || review.participant) && /* @__PURE__ */ jsxRuntime.jsx("button", { className: "sm-review-primary", disabled: busy, onClick: () => setPanel("feedback"), children: "Looks Good \u2014 Send Feedback" }),
|
|
804
804
|
can("APPROVE") && !review.published && /* @__PURE__ */ jsxRuntime.jsx(
|
|
805
805
|
"button",
|
|
806
806
|
{
|
|
@@ -921,7 +921,7 @@ function StoryReview({
|
|
|
921
921
|
review.reviewer,
|
|
922
922
|
". The newsroom will request approval from the designated family reviewer separately. This will not publish the story."
|
|
923
923
|
] }),
|
|
924
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { disabled: busy, onClick: () => void send({ action: "COMMENT", message: "This draft looks good to me.", target: { kind: "STORY" } }, "Thank you. Your feedback has been sent to the newsroom. The story is still private."), children: "Send my feedback" }),
|
|
924
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { className: "sm-review-primary", disabled: busy, onClick: () => void send({ action: "COMMENT", message: "This draft looks good to me.", target: { kind: "STORY" } }, "Thank you. Your feedback has been sent to the newsroom. The story is still private.", false), children: "Send my feedback" }),
|
|
925
925
|
/* @__PURE__ */ jsxRuntime.jsx("button", { disabled: busy, onClick: () => setPanel("article"), children: "Back to the story" })
|
|
926
926
|
] }),
|
|
927
927
|
!["article", "identity", "share", "feedback"].includes(panel) && /* @__PURE__ */ jsxRuntime.jsxs(
|
package/dist/story-review.js
CHANGED
|
@@ -450,7 +450,7 @@ function StoryReview({
|
|
|
450
450
|
}
|
|
451
451
|
setPanel("share");
|
|
452
452
|
}
|
|
453
|
-
async function send(action, success) {
|
|
453
|
+
async function send(action, success, consumeDraft = true) {
|
|
454
454
|
if (!review || busy) return;
|
|
455
455
|
if (action.action === "APPROVE" && file) {
|
|
456
456
|
setNotice("Your photo is not uploaded yet. Upload it or remove the selection before approving.");
|
|
@@ -462,7 +462,7 @@ function StoryReview({
|
|
|
462
462
|
setNotice("");
|
|
463
463
|
try {
|
|
464
464
|
const actionPanel = { ANSWER_QUESTIONS: "questions", REQUEST_CHANGES: "changes", COMMENT: "comment", PROPOSE_EDITS: "edits", EDIT_MEDIA_METADATA: "metadata", APPROVE: "approve", DECLINE: "decline" }[String(action.action)];
|
|
465
|
-
const receipt = actionPanel ? await drafts.receipt(actionPanel) : void 0;
|
|
465
|
+
const receipt = consumeDraft && actionPanel ? await drafts.receipt(actionPanel) : void 0;
|
|
466
466
|
const sent = await request("", { revision_id: review.revision.id, ...action, ...receipt ? { draft: receipt } : {} });
|
|
467
467
|
if (sent.cleared_draft) drafts.consumed(sent.cleared_draft);
|
|
468
468
|
try {
|
|
@@ -798,7 +798,7 @@ function StoryReview({
|
|
|
798
798
|
className: `sm-review-actions${celebration ? " sm-review-concierge-actions" : ""}${panel !== "article" ? " sm-review-actions-editing" : ""}`,
|
|
799
799
|
"aria-label": "Review actions",
|
|
800
800
|
children: [
|
|
801
|
-
!can("APPROVE") && can("COMMENT") && (review.identity_required || review.participant) && /* @__PURE__ */ jsx("button", { disabled: busy, onClick: () => setPanel("feedback"), children: "Looks
|
|
801
|
+
!can("APPROVE") && can("COMMENT") && (review.identity_required || review.participant) && /* @__PURE__ */ jsx("button", { className: "sm-review-primary", disabled: busy, onClick: () => setPanel("feedback"), children: "Looks Good \u2014 Send Feedback" }),
|
|
802
802
|
can("APPROVE") && !review.published && /* @__PURE__ */ jsx(
|
|
803
803
|
"button",
|
|
804
804
|
{
|
|
@@ -919,7 +919,7 @@ function StoryReview({
|
|
|
919
919
|
review.reviewer,
|
|
920
920
|
". The newsroom will request approval from the designated family reviewer separately. This will not publish the story."
|
|
921
921
|
] }),
|
|
922
|
-
/* @__PURE__ */ jsx("button", { disabled: busy, onClick: () => void send({ action: "COMMENT", message: "This draft looks good to me.", target: { kind: "STORY" } }, "Thank you. Your feedback has been sent to the newsroom. The story is still private."), children: "Send my feedback" }),
|
|
922
|
+
/* @__PURE__ */ jsx("button", { className: "sm-review-primary", disabled: busy, onClick: () => void send({ action: "COMMENT", message: "This draft looks good to me.", target: { kind: "STORY" } }, "Thank you. Your feedback has been sent to the newsroom. The story is still private.", false), children: "Send my feedback" }),
|
|
923
923
|
/* @__PURE__ */ jsx("button", { disabled: busy, onClick: () => setPanel("article"), children: "Back to the story" })
|
|
924
924
|
] }),
|
|
925
925
|
!["article", "identity", "share", "feedback"].includes(panel) && /* @__PURE__ */ jsxs(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalemule/news-publication",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"description": "Shared server framework for ScaleMule local news publications. Walnut Creek Times is the broadsheet default; each paper supplies its own identity and feature flags.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
package/story-review.css
CHANGED
|
@@ -15,10 +15,15 @@
|
|
|
15
15
|
margin: auto;
|
|
16
16
|
padding-inline: 32px;
|
|
17
17
|
}
|
|
18
|
-
.sm-review-
|
|
19
|
-
width:
|
|
18
|
+
.sm-review-frame .sm-review-banner-wrap {
|
|
19
|
+
width: 100%;
|
|
20
20
|
max-width: none;
|
|
21
|
-
padding-inline:
|
|
21
|
+
padding-inline: max(16px, calc((100% - 976px) / 2));
|
|
22
|
+
background: #fff3c4;
|
|
23
|
+
border-bottom: 2px solid #d5ac30;
|
|
24
|
+
}
|
|
25
|
+
.sm-review-publication-frame .sm-review-banner-wrap {
|
|
26
|
+
padding-inline: max(var(--pub-gutter, 16px), calc((100% - var(--pub-width, 1240px)) / 2));
|
|
22
27
|
}
|
|
23
28
|
.sm-review-publication-frame {
|
|
24
29
|
padding-bottom: 100px;
|
|
@@ -31,11 +36,10 @@
|
|
|
31
36
|
max-width: none;
|
|
32
37
|
}
|
|
33
38
|
.sm-review-publication-frame .sm-review-private {
|
|
34
|
-
color:
|
|
35
|
-
border-color: var(--pub-rule, #d7dcd7);
|
|
39
|
+
color: #5b4816;
|
|
36
40
|
}
|
|
37
41
|
.sm-review-publication-frame .sm-review-private strong {
|
|
38
|
-
color:
|
|
42
|
+
color: #382700;
|
|
39
43
|
}
|
|
40
44
|
.sm-story-review {
|
|
41
45
|
color-scheme: light;
|
|
@@ -51,8 +55,7 @@
|
|
|
51
55
|
}
|
|
52
56
|
.sm-review-private {
|
|
53
57
|
padding: 14px 0;
|
|
54
|
-
|
|
55
|
-
color: var(--pub-muted, #545c55);
|
|
58
|
+
color: #5b4816;
|
|
56
59
|
font:
|
|
57
60
|
13px/1.5 var(--font-inter),
|
|
58
61
|
Arial,
|
|
@@ -63,9 +66,9 @@
|
|
|
63
66
|
flex-wrap: wrap;
|
|
64
67
|
}
|
|
65
68
|
.sm-review-private strong {
|
|
66
|
-
color:
|
|
69
|
+
color: #382700;
|
|
67
70
|
text-transform: uppercase;
|
|
68
|
-
font-size:
|
|
71
|
+
font-size: 13px;
|
|
69
72
|
letter-spacing: 0.08em;
|
|
70
73
|
}
|
|
71
74
|
.sm-review-masthead {
|