@logora/debate 0.4.64 → 0.4.65
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as o, jsx as
|
|
1
|
+
import { jsxs as o, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import u from "classnames";
|
|
3
3
|
import "react";
|
|
4
4
|
import { useIntl as N } from "react-intl";
|
|
5
5
|
import t from "./ContentHeader.module.scss.js";
|
|
6
|
-
import { useRelativeTime as
|
|
7
|
-
import { useConfig as
|
|
6
|
+
import { useRelativeTime as b } from "../../hooks/use_relative_time/useRelativeTime.js";
|
|
7
|
+
import { useConfig as x } from "../../data/config_provider/useConfig.js";
|
|
8
8
|
import { Icon as g } from "../../icons/icon/Icon.js";
|
|
9
9
|
import { UserBoxSmall as H } from "../../user/user_box_small/UserBoxSmall.js";
|
|
10
10
|
import { AuthorBox as w } from "../../user/author_box/AuthorBox.js";
|
|
@@ -22,11 +22,11 @@ const $ = ({
|
|
|
22
22
|
moderationPolicyUrl: m,
|
|
23
23
|
showModerationFeedback: v = !1
|
|
24
24
|
}) => {
|
|
25
|
-
const M =
|
|
25
|
+
const M = b(new Date(l).getTime()), n = N(), f = x();
|
|
26
26
|
return /* @__PURE__ */ o("div", { className: t.contentHeaderContainer, children: [
|
|
27
27
|
v && /* @__PURE__ */ o("div", { className: t.moderationInfo, children: [
|
|
28
28
|
/* @__PURE__ */ o("div", { className: t.moderationReason, children: [
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ a(
|
|
30
30
|
g,
|
|
31
31
|
{
|
|
32
32
|
name: "announcement",
|
|
@@ -35,17 +35,17 @@ const $ = ({
|
|
|
35
35
|
className: t.warningIcon
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
|
-
|
|
39
|
-
id: "user_content.content_header.
|
|
38
|
+
n.formatMessage({
|
|
39
|
+
id: "user_content.content_header.moderation_reason_label",
|
|
40
40
|
defaultMessage: "Content rejected by moderation."
|
|
41
41
|
}),
|
|
42
42
|
" ",
|
|
43
|
-
s &&
|
|
43
|
+
s && n.messages[`user_content.content_header.moderation_reason.${s.toLowerCase()}`] ? n.formatMessage({
|
|
44
44
|
id: `user_content.content_header.moderation_reason.${s.toLowerCase()}`,
|
|
45
45
|
defaultMessage: ""
|
|
46
46
|
}) : null
|
|
47
47
|
] }),
|
|
48
|
-
c && /* @__PURE__ */
|
|
48
|
+
c && /* @__PURE__ */ a("div", { children: n.formatMessage(
|
|
49
49
|
{
|
|
50
50
|
id: "user_content.content_header.moderation_notes",
|
|
51
51
|
defaultMessage: "Moderation Notes: {notes}"
|
|
@@ -53,19 +53,19 @@ const $ = ({
|
|
|
53
53
|
{ notes: c }
|
|
54
54
|
) }),
|
|
55
55
|
m && /* @__PURE__ */ o("div", { children: [
|
|
56
|
-
|
|
56
|
+
n.formatMessage({
|
|
57
57
|
id: "user_content.content_header.moderationPolicyUrl",
|
|
58
58
|
defaultMessage: "Please keep contributions respectful. See rules:"
|
|
59
59
|
}),
|
|
60
60
|
" ",
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ a(
|
|
62
62
|
"a",
|
|
63
63
|
{
|
|
64
64
|
href: m,
|
|
65
65
|
target: "_blank",
|
|
66
66
|
rel: "noopener noreferrer",
|
|
67
67
|
className: t.moderationLink,
|
|
68
|
-
children:
|
|
68
|
+
children: n.formatMessage({
|
|
69
69
|
id: "user_content.content_header.moderation_policy_link",
|
|
70
70
|
defaultMessage: "moderation policy"
|
|
71
71
|
})
|
|
@@ -74,21 +74,21 @@ const $ = ({
|
|
|
74
74
|
] })
|
|
75
75
|
] }),
|
|
76
76
|
p && !d && /* @__PURE__ */ o("div", { className: t.selectedContent, children: [
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
77
|
+
/* @__PURE__ */ a(g, { name: "expertBadge", width: 18, height: 18 }),
|
|
78
|
+
n.formatMessage({
|
|
79
79
|
id: "user_content.content_header.selected",
|
|
80
80
|
defaultMessage: "Selected by editor"
|
|
81
81
|
})
|
|
82
82
|
] }),
|
|
83
83
|
/* @__PURE__ */ o("div", { className: t.contentHeader, children: [
|
|
84
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ a("div", { className: t.contentHeaderAuthorBox, children: i === !0 ? /* @__PURE__ */ a(
|
|
85
85
|
H,
|
|
86
86
|
{
|
|
87
87
|
userName: e.full_name,
|
|
88
88
|
avatarUrl: e.image_url,
|
|
89
89
|
userSlug: e.hash_id
|
|
90
90
|
}
|
|
91
|
-
) : /* @__PURE__ */
|
|
91
|
+
) : /* @__PURE__ */ a(
|
|
92
92
|
w,
|
|
93
93
|
{
|
|
94
94
|
fullName: e.full_name,
|
|
@@ -106,13 +106,13 @@ const $ = ({
|
|
|
106
106
|
}
|
|
107
107
|
) }),
|
|
108
108
|
/* @__PURE__ */ o("div", { className: t.contentHeaderRight, children: [
|
|
109
|
-
r && /* @__PURE__ */
|
|
110
|
-
!l || i ? null : /* @__PURE__ */
|
|
109
|
+
r && /* @__PURE__ */ a("div", { className: u(t.contentHeaderTagBox, _), children: /* @__PURE__ */ a("div", { className: t.contentHeaderTag, title: r, children: r }) }),
|
|
110
|
+
!l || i ? null : /* @__PURE__ */ a(
|
|
111
111
|
"div",
|
|
112
112
|
{
|
|
113
113
|
"data-testid": "content-header-date",
|
|
114
114
|
className: u(t.contentHeaderDate),
|
|
115
|
-
"aria-label":
|
|
115
|
+
"aria-label": n.formatMessage({
|
|
116
116
|
id: "user_content.content_header.date",
|
|
117
117
|
defaultMessage: "Publication date"
|
|
118
118
|
}),
|