@burdenoff/microfe-conversations 2026.625.1 → 2026.625.3
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/conversations/components/ConversationRow.js +1 -1
- package/dist/conversations/components/ConversationRow.js.map +1 -1
- package/dist/conversations/components/EmptyState.js +15 -9
- package/dist/conversations/components/EmptyState.js.map +1 -1
- package/dist/conversations/components/InboxLayout.js +93 -102
- package/dist/conversations/components/InboxLayout.js.map +1 -1
- package/dist/conversations/pages/AdminConversationsLandingPage.js +109 -61
- package/dist/conversations/pages/AdminConversationsLandingPage.js.map +1 -1
- package/dist/conversations/pages/ConversationAdminPages.js +108 -73
- package/dist/conversations/pages/ConversationAdminPages.js.map +1 -1
- package/dist/conversations/pages/ConversationDetailPage.js +311 -239
- package/dist/conversations/pages/ConversationDetailPage.js.map +1 -1
- package/dist/conversations/pages/ConversationListPage.js +64 -58
- package/dist/conversations/pages/ConversationListPage.js.map +1 -1
- package/dist/conversations/pages/ConversationsSettingsPage.js +64 -56
- package/dist/conversations/pages/ConversationsSettingsPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useTr as e } from "../utils/i18n.js";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { Activity as n, ChevronRight as r, ListChecks as i, MessageCircle as a, Package as o, ShieldCheck as s } from "lucide-react";
|
|
4
|
-
import { Link as c } from "react-router-dom";
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { EmphasisPanel as
|
|
4
|
+
import { Link as c, useNavigate as l } from "react-router-dom";
|
|
5
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
6
|
+
import { EmphasisPanel as f, GlassCard as p, GradientText as m, NextSteps as h, PagePurpose as g } from "@burdenoff/fe-libs/ui";
|
|
7
7
|
//#region src/conversations/pages/AdminConversationsLandingPage.tsx
|
|
8
|
-
var
|
|
8
|
+
var _ = [
|
|
9
9
|
{
|
|
10
10
|
id: "moderation",
|
|
11
11
|
labelKey: "conversations.admin.moderation",
|
|
@@ -13,10 +13,11 @@ var p = [
|
|
|
13
13
|
descriptionKey: "conversations.admin.moderationDescription",
|
|
14
14
|
descriptionFallback: "Reported and flagged messages, moderation actions, and reviewer assignments.",
|
|
15
15
|
path: "moderation",
|
|
16
|
-
icon: /* @__PURE__ */
|
|
16
|
+
icon: /* @__PURE__ */ u(s, {
|
|
17
17
|
className: "size-5",
|
|
18
18
|
"aria-hidden": "true"
|
|
19
|
-
})
|
|
19
|
+
}),
|
|
20
|
+
featured: !0
|
|
20
21
|
},
|
|
21
22
|
{
|
|
22
23
|
id: "bulk",
|
|
@@ -25,7 +26,7 @@ var p = [
|
|
|
25
26
|
descriptionKey: "conversations.admin.bulkOperationsDescription",
|
|
26
27
|
descriptionFallback: "Bulk archive / unarchive, participant edits, and cross-conversation actions.",
|
|
27
28
|
path: "bulk",
|
|
28
|
-
icon: /* @__PURE__ */
|
|
29
|
+
icon: /* @__PURE__ */ u(i, {
|
|
29
30
|
className: "size-5",
|
|
30
31
|
"aria-hidden": "true"
|
|
31
32
|
})
|
|
@@ -37,7 +38,7 @@ var p = [
|
|
|
37
38
|
descriptionKey: "conversations.admin.auditLogDescription",
|
|
38
39
|
descriptionFallback: "Activity stream for admin / moderator actions on workspace conversations.",
|
|
39
40
|
path: "audit",
|
|
40
|
-
icon: /* @__PURE__ */
|
|
41
|
+
icon: /* @__PURE__ */ u(n, {
|
|
41
42
|
className: "size-5",
|
|
42
43
|
"aria-hidden": "true"
|
|
43
44
|
})
|
|
@@ -49,77 +50,124 @@ var p = [
|
|
|
49
50
|
descriptionKey: "conversations.admin.appInstallationsDescription",
|
|
50
51
|
descriptionFallback: "Install, configure, and remove conversation apps and integrations.",
|
|
51
52
|
path: "apps",
|
|
52
|
-
icon: /* @__PURE__ */
|
|
53
|
+
icon: /* @__PURE__ */ u(o, {
|
|
53
54
|
className: "size-5",
|
|
54
55
|
"aria-hidden": "true"
|
|
55
56
|
})
|
|
56
57
|
}
|
|
57
58
|
];
|
|
58
|
-
function
|
|
59
|
-
let
|
|
59
|
+
function v() {
|
|
60
|
+
let o = e(), v = l(), y = t(() => _.map((e) => ({
|
|
60
61
|
...e,
|
|
61
|
-
label:
|
|
62
|
-
description:
|
|
63
|
-
})), [
|
|
64
|
-
|
|
62
|
+
label: o(e.labelKey, e.labelFallback),
|
|
63
|
+
description: o(e.descriptionKey, e.descriptionFallback)
|
|
64
|
+
})), [o]), b = t(() => [
|
|
65
|
+
{
|
|
66
|
+
id: "review-moderation",
|
|
67
|
+
label: o("conversations.admin.nextSteps.moderation.label", "Clear the moderation queue"),
|
|
68
|
+
description: o("conversations.admin.nextSteps.moderation.description", "Review reported messages and apply decisions."),
|
|
69
|
+
icon: /* @__PURE__ */ u(s, {
|
|
70
|
+
className: "size-4",
|
|
71
|
+
"aria-hidden": "true"
|
|
72
|
+
}),
|
|
73
|
+
onClick: () => v("moderation")
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "bulk-cleanup",
|
|
77
|
+
label: o("conversations.admin.nextSteps.bulk.label", "Tidy up conversations in bulk"),
|
|
78
|
+
description: o("conversations.admin.nextSteps.bulk.description", "Archive or remove stale conversations across the workspace."),
|
|
79
|
+
icon: /* @__PURE__ */ u(i, {
|
|
80
|
+
className: "size-4",
|
|
81
|
+
"aria-hidden": "true"
|
|
82
|
+
}),
|
|
83
|
+
onClick: () => v("bulk")
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "check-audit",
|
|
87
|
+
label: o("conversations.admin.nextSteps.audit.label", "Check recent admin activity"),
|
|
88
|
+
description: o("conversations.admin.nextSteps.audit.description", "See what moderators and admins have changed lately."),
|
|
89
|
+
icon: /* @__PURE__ */ u(n, {
|
|
90
|
+
className: "size-4",
|
|
91
|
+
"aria-hidden": "true"
|
|
92
|
+
}),
|
|
93
|
+
onClick: () => v("audit")
|
|
94
|
+
}
|
|
95
|
+
], [v, o]);
|
|
96
|
+
return /* @__PURE__ */ u("div", {
|
|
65
97
|
className: "flex flex-col h-full",
|
|
66
|
-
children: /* @__PURE__ */
|
|
98
|
+
children: /* @__PURE__ */ u("div", {
|
|
67
99
|
className: "flex-1 min-h-0 overflow-auto p-4 sm:p-6",
|
|
68
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ d("div", {
|
|
69
101
|
className: "mx-auto w-full max-w-3xl space-y-6",
|
|
70
|
-
children: [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
children: /* @__PURE__ */ l(a, {
|
|
75
|
-
className: "size-5",
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ u(g, {
|
|
104
|
+
icon: /* @__PURE__ */ u(a, {
|
|
105
|
+
size: 16,
|
|
76
106
|
"aria-hidden": "true"
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
107
|
+
}),
|
|
108
|
+
children: o("conversations.admin.purpose", "Govern every conversation in this workspace from one place — moderate reported messages, run bulk archive or cleanup operations, audit moderator actions, and manage the apps that plug into conversations.")
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ u(f, { children: /* @__PURE__ */ d("div", {
|
|
111
|
+
className: "flex items-start gap-3",
|
|
112
|
+
children: [/* @__PURE__ */ u("div", {
|
|
113
|
+
className: "p-2 rounded-lg bg-gloss-card text-text-secondary border border-border-seam",
|
|
114
|
+
children: /* @__PURE__ */ u(a, {
|
|
115
|
+
className: "size-5",
|
|
116
|
+
"aria-hidden": "true"
|
|
117
|
+
})
|
|
118
|
+
}), /* @__PURE__ */ d("div", {
|
|
119
|
+
className: "min-w-0",
|
|
120
|
+
children: [/* @__PURE__ */ u("h1", {
|
|
121
|
+
className: "text-lg font-semibold text-text-primary",
|
|
122
|
+
children: /* @__PURE__ */ u(m, { children: o("conversations.admin.landingTitle", "Conversations admin") })
|
|
123
|
+
}), /* @__PURE__ */ u("p", {
|
|
124
|
+
className: "mt-1 text-sm text-text-secondary",
|
|
125
|
+
children: o("conversations.admin.landingDescription", "Governance tools for workspace conversations. Select a section below to continue.")
|
|
126
|
+
})]
|
|
86
127
|
})]
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
className: "p-2 rounded-md bg-bg-sunken text-text-secondary group-hover:text-text-primary",
|
|
98
|
-
children: e.icon
|
|
99
|
-
}), /* @__PURE__ */ u("div", {
|
|
100
|
-
className: "flex-1 min-w-0",
|
|
128
|
+
}) }),
|
|
129
|
+
/* @__PURE__ */ u("div", {
|
|
130
|
+
className: "grid gap-3 sm:grid-cols-2",
|
|
131
|
+
children: y.map((e) => /* @__PURE__ */ u(c, {
|
|
132
|
+
to: e.path,
|
|
133
|
+
className: "group rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
134
|
+
children: /* @__PURE__ */ d(p, {
|
|
135
|
+
treatment: "glass",
|
|
136
|
+
glow: e.featured,
|
|
137
|
+
className: "flex items-start gap-3 border-border-seam p-4 shadow-[var(--shadow-pop)]",
|
|
101
138
|
children: [/* @__PURE__ */ u("div", {
|
|
102
|
-
className: "
|
|
103
|
-
children:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
className: "
|
|
108
|
-
|
|
139
|
+
className: "p-2 rounded-md bg-bg-sunken text-text-secondary group-hover:text-text-primary",
|
|
140
|
+
children: e.icon
|
|
141
|
+
}), /* @__PURE__ */ d("div", {
|
|
142
|
+
className: "flex-1 min-w-0",
|
|
143
|
+
children: [/* @__PURE__ */ d("div", {
|
|
144
|
+
className: "flex items-center justify-between gap-2",
|
|
145
|
+
children: [/* @__PURE__ */ u("span", {
|
|
146
|
+
className: "text-sm font-medium text-text-primary",
|
|
147
|
+
children: e.label
|
|
148
|
+
}), /* @__PURE__ */ u(r, {
|
|
149
|
+
className: "size-4 text-text-secondary",
|
|
150
|
+
"aria-hidden": "true"
|
|
151
|
+
})]
|
|
152
|
+
}), /* @__PURE__ */ u("p", {
|
|
153
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
154
|
+
children: e.description
|
|
109
155
|
})]
|
|
110
|
-
}), /* @__PURE__ */ l("p", {
|
|
111
|
-
className: "mt-1 text-xs text-text-secondary",
|
|
112
|
-
children: e.description
|
|
113
156
|
})]
|
|
114
|
-
})
|
|
115
|
-
})
|
|
116
|
-
},
|
|
117
|
-
|
|
157
|
+
})
|
|
158
|
+
}, e.id))
|
|
159
|
+
}),
|
|
160
|
+
/* @__PURE__ */ u(h, {
|
|
161
|
+
storageKey: "conversations-admin-landing",
|
|
162
|
+
title: o("conversations.admin.nextSteps.title", "Recommended next steps"),
|
|
163
|
+
steps: b
|
|
164
|
+
})
|
|
165
|
+
]
|
|
118
166
|
})
|
|
119
167
|
})
|
|
120
168
|
});
|
|
121
169
|
}
|
|
122
170
|
//#endregion
|
|
123
|
-
export {
|
|
171
|
+
export { v as AdminConversationsLandingPage };
|
|
124
172
|
|
|
125
173
|
//# sourceMappingURL=AdminConversationsLandingPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminConversationsLandingPage.js","names":[],"sources":["../../../src/conversations/pages/AdminConversationsLandingPage.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { useMemo } from \"react\";\nimport { Link } from \"react-router-dom\";\nimport {\n MessageCircle,\n ShieldCheck,\n ListChecks,\n Activity,\n Package,\n ChevronRight,\n} from \"lucide-react\";\nimport { GlassCard, EmphasisPanel } from \"@burdenoff/fe-libs/ui\";\nimport { useTr } from \"../utils/i18n\";\n\ninterface AdminSectionDefinition {\n id: string;\n /** i18n key used for the card label */\n labelKey: string;\n /** English fallback rendered when the i18n key is not resolved */\n labelFallback: string;\n /** i18n key used for the card description */\n descriptionKey: string;\n /** English fallback for the description */\n descriptionFallback: string;\n /** Route path relative to the admin basePath */\n path: string;\n icon: ReactNode;\n}\n\n// Module-scoped section catalogue. The icon JSX is stable (purely presentational,\n// no context or dynamic props) so constructing once at parse time avoids rebuilding\n// four lucide nodes on every render. If icons ever need to respond to context\n// (theme, RBAC), move the icon field into the useMemo mapper below.\nconst SECTION_DEFINITIONS: AdminSectionDefinition[] = [\n {\n id: \"moderation\",\n labelKey: \"conversations.admin.moderation\",\n labelFallback: \"Moderation\",\n descriptionKey: \"conversations.admin.moderationDescription\",\n descriptionFallback:\n \"Reported and flagged messages, moderation actions, and reviewer assignments.\",\n path: \"moderation\",\n icon: <ShieldCheck className=\"size-5\" aria-hidden=\"true\" />,\n },\n {\n id: \"bulk\",\n labelKey: \"conversations.admin.bulkOperations\",\n labelFallback: \"Bulk Operations\",\n descriptionKey: \"conversations.admin.bulkOperationsDescription\",\n descriptionFallback:\n \"Bulk archive / unarchive, participant edits, and cross-conversation actions.\",\n path: \"bulk\",\n icon: <ListChecks className=\"size-5\" aria-hidden=\"true\" />,\n },\n {\n id: \"audit\",\n labelKey: \"conversations.admin.auditLog\",\n labelFallback: \"Audit Log\",\n descriptionKey: \"conversations.admin.auditLogDescription\",\n descriptionFallback:\n \"Activity stream for admin / moderator actions on workspace conversations.\",\n path: \"audit\",\n icon: <Activity className=\"size-5\" aria-hidden=\"true\" />,\n },\n {\n id: \"apps\",\n labelKey: \"conversations.admin.appInstallations\",\n labelFallback: \"App Installations\",\n descriptionKey: \"conversations.admin.appInstallationsDescription\",\n descriptionFallback:\n \"Install, configure, and remove conversation apps and integrations.\",\n path: \"apps\",\n icon: <Package className=\"size-5\" aria-hidden=\"true\" />,\n },\n];\n\n/**\n * Admin-facing landing page for the Conversations microfrontend.\n *\n * Lightweight overview + section directory. Each card links to its canonical\n * sub-route (`/moderation`, `/bulk`, `/audit`, `/apps`) for the API-backed\n * admin surfaces.\n */\nexport function AdminConversationsLandingPage() {\n const tr = useTr();\n\n const sections = useMemo(\n () =>\n SECTION_DEFINITIONS.map((section) => ({\n ...section,\n label: tr(section.labelKey, section.labelFallback),\n description: tr(section.descriptionKey, section.descriptionFallback),\n })),\n [tr],\n );\n\n return (\n <div className=\"flex flex-col h-full\">\n <div className=\"flex-1 min-h-0 overflow-auto p-4 sm:p-6\">\n <div className=\"mx-auto w-full max-w-3xl space-y-6\">\n {/* Hero / summary zone — the single emphasis panel on this page. */}\n <EmphasisPanel>\n <div className=\"flex items-start gap-3\">\n <div className=\"p-2 rounded-lg bg-gloss-card text-text-secondary border border-border-seam\">\n <MessageCircle className=\"size-5\" aria-hidden=\"true\" />\n </div>\n <div className=\"min-w-0\">\n <h1 className=\"text-lg font-semibold text-text-primary\">\n {tr(\n \"conversations.admin.landingTitle\",\n \"Conversations admin\",\n )}\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {tr(\n \"conversations.admin.landingDescription\",\n \"Governance tools for workspace conversations. Select a section below to continue.\",\n )}\n </p>\n </div>\n </div>\n </EmphasisPanel>\n\n <div className=\"grid gap-3 sm:grid-cols-2\">\n {sections.map((section) => (\n <Link\n key={section.id}\n to={section.path}\n className=\"group rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n >\n <GlassCard\n treatment=\"glass\"\n className=\"flex items-start gap-3 border-border-seam p-4 shadow-[var(--shadow-pop)]\"\n >\n <div className=\"p-2 rounded-md bg-bg-sunken text-text-secondary group-hover:text-text-primary\">\n {section.icon}\n </div>\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"text-sm font-medium text-text-primary\">\n {section.label}\n </span>\n <ChevronRight\n className=\"size-4 text-text-secondary\"\n aria-hidden=\"true\"\n />\n </div>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {section.description}\n </p>\n </div>\n </GlassCard>\n </Link>\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";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D;OACC,CAAA,CACA;QACF;QACQ,CAAA,EAEhB,kBAAC,OAAD;KAAK,WAAU;eACZ,EAAS,KAAK,MACb,kBAAC,GAAD;MAEE,IAAI,EAAQ;MACZ,WAAU;gBAEV,kBAAC,GAAD;OACE,WAAU;OACV,WAAU;iBAFZ,CAIE,kBAAC,OAAD;QAAK,WAAU;kBACZ,EAAQ;QACL,CAAA,EACN,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,QAAD;UAAM,WAAU;oBACb,EAAQ;UACJ,CAAA,EACP,kBAAC,GAAD;UACE,WAAU;UACV,eAAY;UACZ,CAAA,CACE;YACN,kBAAC,KAAD;SAAG,WAAU;mBACV,EAAQ;SACP,CAAA,CACA;UACI;;MACP,EA1BA,EAAQ,GA0BR,CACP;KACE,CAAA,CACF;;GACF,CAAA;EACF,CAAA"}
|
|
1
|
+
{"version":3,"file":"AdminConversationsLandingPage.js","names":[],"sources":["../../../src/conversations/pages/AdminConversationsLandingPage.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { useMemo } from \"react\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport {\n MessageCircle,\n ShieldCheck,\n ListChecks,\n Activity,\n Package,\n ChevronRight,\n} from \"lucide-react\";\nimport {\n GlassCard,\n EmphasisPanel,\n GradientText,\n NextSteps,\n PagePurpose,\n type NextStep,\n} from \"@burdenoff/fe-libs/ui\";\nimport { useTr } from \"../utils/i18n\";\n\ninterface AdminSectionDefinition {\n id: string;\n /** i18n key used for the card label */\n labelKey: string;\n /** English fallback rendered when the i18n key is not resolved */\n labelFallback: string;\n /** i18n key used for the card description */\n descriptionKey: string;\n /** English fallback for the description */\n descriptionFallback: string;\n /** Route path relative to the admin basePath */\n path: string;\n icon: ReactNode;\n /** The single featured section — gets the glowing glass treatment. */\n featured?: boolean;\n}\n\n// Module-scoped section catalogue. The icon JSX is stable (purely presentational,\n// no context or dynamic props) so constructing once at parse time avoids rebuilding\n// four lucide nodes on every render. If icons ever need to respond to context\n// (theme, RBAC), move the icon field into the useMemo mapper below.\nconst SECTION_DEFINITIONS: AdminSectionDefinition[] = [\n {\n id: \"moderation\",\n labelKey: \"conversations.admin.moderation\",\n labelFallback: \"Moderation\",\n descriptionKey: \"conversations.admin.moderationDescription\",\n descriptionFallback:\n \"Reported and flagged messages, moderation actions, and reviewer assignments.\",\n path: \"moderation\",\n icon: <ShieldCheck className=\"size-5\" aria-hidden=\"true\" />,\n featured: true,\n },\n {\n id: \"bulk\",\n labelKey: \"conversations.admin.bulkOperations\",\n labelFallback: \"Bulk Operations\",\n descriptionKey: \"conversations.admin.bulkOperationsDescription\",\n descriptionFallback:\n \"Bulk archive / unarchive, participant edits, and cross-conversation actions.\",\n path: \"bulk\",\n icon: <ListChecks className=\"size-5\" aria-hidden=\"true\" />,\n },\n {\n id: \"audit\",\n labelKey: \"conversations.admin.auditLog\",\n labelFallback: \"Audit Log\",\n descriptionKey: \"conversations.admin.auditLogDescription\",\n descriptionFallback:\n \"Activity stream for admin / moderator actions on workspace conversations.\",\n path: \"audit\",\n icon: <Activity className=\"size-5\" aria-hidden=\"true\" />,\n },\n {\n id: \"apps\",\n labelKey: \"conversations.admin.appInstallations\",\n labelFallback: \"App Installations\",\n descriptionKey: \"conversations.admin.appInstallationsDescription\",\n descriptionFallback:\n \"Install, configure, and remove conversation apps and integrations.\",\n path: \"apps\",\n icon: <Package className=\"size-5\" aria-hidden=\"true\" />,\n },\n];\n\n/**\n * Admin-facing landing page for the Conversations microfrontend.\n *\n * Lightweight overview + section directory. Each card links to its canonical\n * sub-route (`/moderation`, `/bulk`, `/audit`, `/apps`) for the API-backed\n * admin surfaces.\n */\nexport function AdminConversationsLandingPage() {\n const tr = useTr();\n const navigate = useNavigate();\n\n const sections = useMemo(\n () =>\n SECTION_DEFINITIONS.map((section) => ({\n ...section,\n label: tr(section.labelKey, section.labelFallback),\n description: tr(section.descriptionKey, section.descriptionFallback),\n })),\n [tr],\n );\n\n // Recommended starting points for an admin landing here for the first time.\n // Each routes to a real admin sub-surface.\n const nextSteps = useMemo<NextStep[]>(\n () => [\n {\n id: \"review-moderation\",\n label: tr(\n \"conversations.admin.nextSteps.moderation.label\",\n \"Clear the moderation queue\",\n ),\n description: tr(\n \"conversations.admin.nextSteps.moderation.description\",\n \"Review reported messages and apply decisions.\",\n ),\n icon: <ShieldCheck className=\"size-4\" aria-hidden=\"true\" />,\n onClick: () => navigate(\"moderation\"),\n },\n {\n id: \"bulk-cleanup\",\n label: tr(\n \"conversations.admin.nextSteps.bulk.label\",\n \"Tidy up conversations in bulk\",\n ),\n description: tr(\n \"conversations.admin.nextSteps.bulk.description\",\n \"Archive or remove stale conversations across the workspace.\",\n ),\n icon: <ListChecks className=\"size-4\" aria-hidden=\"true\" />,\n onClick: () => navigate(\"bulk\"),\n },\n {\n id: \"check-audit\",\n label: tr(\n \"conversations.admin.nextSteps.audit.label\",\n \"Check recent admin activity\",\n ),\n description: tr(\n \"conversations.admin.nextSteps.audit.description\",\n \"See what moderators and admins have changed lately.\",\n ),\n icon: <Activity className=\"size-4\" aria-hidden=\"true\" />,\n onClick: () => navigate(\"audit\"),\n },\n ],\n [navigate, tr],\n );\n\n return (\n <div className=\"flex flex-col h-full\">\n <div className=\"flex-1 min-h-0 overflow-auto p-4 sm:p-6\">\n <div className=\"mx-auto w-full max-w-3xl space-y-6\">\n <PagePurpose icon={<MessageCircle size={16} aria-hidden=\"true\" />}>\n {tr(\n \"conversations.admin.purpose\",\n \"Govern every conversation in this workspace from one place — moderate reported messages, run bulk archive or cleanup operations, audit moderator actions, and manage the apps that plug into conversations.\",\n )}\n </PagePurpose>\n\n {/* Hero / summary zone — the single emphasis panel on this page. */}\n <EmphasisPanel>\n <div className=\"flex items-start gap-3\">\n <div className=\"p-2 rounded-lg bg-gloss-card text-text-secondary border border-border-seam\">\n <MessageCircle className=\"size-5\" aria-hidden=\"true\" />\n </div>\n <div className=\"min-w-0\">\n <h1 className=\"text-lg font-semibold text-text-primary\">\n <GradientText>\n {tr(\n \"conversations.admin.landingTitle\",\n \"Conversations admin\",\n )}\n </GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {tr(\n \"conversations.admin.landingDescription\",\n \"Governance tools for workspace conversations. Select a section below to continue.\",\n )}\n </p>\n </div>\n </div>\n </EmphasisPanel>\n\n <div className=\"grid gap-3 sm:grid-cols-2\">\n {sections.map((section) => (\n <Link\n key={section.id}\n to={section.path}\n className=\"group rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n >\n <GlassCard\n treatment=\"glass\"\n glow={section.featured}\n className=\"flex items-start gap-3 border-border-seam p-4 shadow-[var(--shadow-pop)]\"\n >\n <div className=\"p-2 rounded-md bg-bg-sunken text-text-secondary group-hover:text-text-primary\">\n {section.icon}\n </div>\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"text-sm font-medium text-text-primary\">\n {section.label}\n </span>\n <ChevronRight\n className=\"size-4 text-text-secondary\"\n aria-hidden=\"true\"\n />\n </div>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {section.description}\n </p>\n </div>\n </GlassCard>\n </Link>\n ))}\n </div>\n\n <NextSteps\n storageKey=\"conversations-admin-landing\"\n title={tr(\n \"conversations.admin.nextSteps.title\",\n \"Recommended next steps\",\n )}\n steps={nextSteps}\n />\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;AA0CA,IAAM,IAAgD;CACpD;EACE,IAAI;EACJ,UAAU;EACV,eAAe;EACf,gBAAgB;EAChB,qBACE;EACF,MAAM;EACN,MAAM,kBAAC,GAAD;GAAa,WAAU;GAAS,eAAY;GAAS,CAAA;EAC3D,UAAU;EACX;CACD;EACE,IAAI;EACJ,UAAU;EACV,eAAe;EACf,gBAAgB;EAChB,qBACE;EACF,MAAM;EACN,MAAM,kBAAC,GAAD;GAAY,WAAU;GAAS,eAAY;GAA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