@burdenoff/microfe-comradecircle 2026.819.1 → 2026.830.1
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/comradecircle/components/AvatarUploadField.js +8 -8
- package/dist/comradecircle/components/CircleCard.js +4 -4
- package/dist/comradecircle/components/CommentThread.d.ts.map +1 -1
- package/dist/comradecircle/components/CommentThread.js +66 -61
- package/dist/comradecircle/components/CommentThread.js.map +1 -1
- package/dist/comradecircle/components/CreateCircleDialog.d.ts.map +1 -1
- package/dist/comradecircle/components/CreateCircleDialog.js +89 -88
- package/dist/comradecircle/components/CreateCircleDialog.js.map +1 -1
- package/dist/comradecircle/components/CreateEventDialog.d.ts.map +1 -1
- package/dist/comradecircle/components/CreateEventDialog.js +28 -27
- package/dist/comradecircle/components/CreateEventDialog.js.map +1 -1
- package/dist/comradecircle/components/DraftsPanel.d.ts +32 -0
- package/dist/comradecircle/components/DraftsPanel.d.ts.map +1 -0
- package/dist/comradecircle/components/DraftsPanel.js +176 -0
- package/dist/comradecircle/components/DraftsPanel.js.map +1 -0
- package/dist/comradecircle/components/EventCard.js +5 -5
- package/dist/comradecircle/components/FileImage.js +5 -5
- package/dist/comradecircle/components/ImageAttachments.js +21 -21
- package/dist/comradecircle/components/MemberIdentity.js +4 -4
- package/dist/comradecircle/components/MobileBottomNav.d.ts.map +1 -1
- package/dist/comradecircle/components/MobileBottomNav.js +37 -30
- package/dist/comradecircle/components/MobileBottomNav.js.map +1 -1
- package/dist/comradecircle/components/Pagination.d.ts.map +1 -1
- package/dist/comradecircle/components/Pagination.js +37 -28
- package/dist/comradecircle/components/Pagination.js.map +1 -1
- package/dist/comradecircle/components/PollCard.js +13 -13
- package/dist/comradecircle/components/PostCard.d.ts.map +1 -1
- package/dist/comradecircle/components/PostCard.js +102 -89
- package/dist/comradecircle/components/PostCard.js.map +1 -1
- package/dist/comradecircle/components/PostComposer.d.ts +11 -5
- package/dist/comradecircle/components/PostComposer.d.ts.map +1 -1
- package/dist/comradecircle/components/PostComposer.js +60 -48
- package/dist/comradecircle/components/PostComposer.js.map +1 -1
- package/dist/comradecircle/components/ReactionBar.d.ts.map +1 -1
- package/dist/comradecircle/components/ReactionBar.js +65 -55
- package/dist/comradecircle/components/ReactionBar.js.map +1 -1
- package/dist/comradecircle/components/StateViews.d.ts.map +1 -1
- package/dist/comradecircle/components/StateViews.js +38 -30
- package/dist/comradecircle/components/StateViews.js.map +1 -1
- package/dist/comradecircle/components/UpcomingEvents.d.ts +26 -0
- package/dist/comradecircle/components/UpcomingEvents.d.ts.map +1 -0
- package/dist/comradecircle/components/UpcomingEvents.js +126 -0
- package/dist/comradecircle/components/UpcomingEvents.js.map +1 -0
- package/dist/comradecircle/components/index.d.ts +2 -0
- package/dist/comradecircle/components/index.d.ts.map +1 -1
- package/dist/comradecircle/hooks/index.d.ts +1 -0
- package/dist/comradecircle/hooks/index.d.ts.map +1 -1
- package/dist/comradecircle/hooks/index.js +1 -0
- package/dist/comradecircle/hooks/useTr.d.ts +18 -0
- package/dist/comradecircle/hooks/useTr.d.ts.map +1 -0
- package/dist/comradecircle/hooks/useTr.js +12 -0
- package/dist/comradecircle/hooks/useTr.js.map +1 -0
- package/dist/comradecircle/pages/FeedPage.d.ts +5 -0
- package/dist/comradecircle/pages/FeedPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/FeedPage.js +76 -62
- package/dist/comradecircle/pages/FeedPage.js.map +1 -1
- package/dist/comradecircle/pages/circles/CircleDetailPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/circles/CircleDetailPage.js +454 -409
- package/dist/comradecircle/pages/circles/CircleDetailPage.js.map +1 -1
- package/dist/comradecircle/pages/circles/CirclesPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/circles/CirclesPage.js +124 -117
- package/dist/comradecircle/pages/circles/CirclesPage.js.map +1 -1
- package/dist/comradecircle/pages/events/EventDetailPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/events/EventDetailPage.js +182 -153
- package/dist/comradecircle/pages/events/EventDetailPage.js.map +1 -1
- package/dist/comradecircle/pages/events/EventsPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/events/EventsPage.js +100 -91
- package/dist/comradecircle/pages/events/EventsPage.js.map +1 -1
- package/dist/comradecircle/pages/members/MemberProfilePage.d.ts.map +1 -1
- package/dist/comradecircle/pages/members/MemberProfilePage.js +172 -159
- package/dist/comradecircle/pages/members/MemberProfilePage.js.map +1 -1
- package/dist/comradecircle/pages/members/MembersPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/members/MembersPage.js +103 -104
- package/dist/comradecircle/pages/members/MembersPage.js.map +1 -1
- package/dist/comradecircle/pages/monetization/MonetizationPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/monetization/MonetizationPage.js +319 -297
- package/dist/comradecircle/pages/monetization/MonetizationPage.js.map +1 -1
- package/dist/comradecircle/pages/posts/PostThreadPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/posts/PostThreadPage.js +37 -32
- package/dist/comradecircle/pages/posts/PostThreadPage.js.map +1 -1
- package/dist/comradecircle/pages/profile/MyProfilePage.d.ts.map +1 -1
- package/dist/comradecircle/pages/profile/MyProfilePage.js +182 -177
- package/dist/comradecircle/pages/profile/MyProfilePage.js.map +1 -1
- package/dist/comradecircle/utils/i18n.js +15 -0
- package/dist/comradecircle/utils/i18n.js.map +1 -0
- package/dist/comradecircle/utils/pageContext.d.ts.map +1 -1
- package/dist/comradecircle/utils/pageContext.js +3 -1
- package/dist/comradecircle/utils/pageContext.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { useComradeCircle as e } from "../../context/ComradeCircleContext.js";
|
|
2
2
|
import "../../context/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useComFollow as r, useComListDigitalProducts as i, useComListMembershipTiers as a, useComListPaidEvents as o, useComMyFollows as s, useComProfile as c, useComUnfollow as l } from "../../hooks/useComradeCircleApi.js";
|
|
3
|
+
import { useComFollow as t, useComListDigitalProducts as n, useComListMembershipTiers as r, useComListPaidEvents as i, useComMyFollows as a, useComProfile as o, useComUnfollow as s } from "../../hooks/useComradeCircleApi.js";
|
|
4
|
+
import { useTr as c } from "../../hooks/useTr.js";
|
|
6
5
|
import "../../hooks/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
6
|
+
import { cn as l } from "../../utils/cn.js";
|
|
7
|
+
import { PageLayout as u } from "../../components/PageLayout.js";
|
|
8
|
+
import { Avatar as d } from "../../components/Avatar.js";
|
|
9
|
+
import { describeError as f, notify as p } from "../../lib/toast.js";
|
|
10
|
+
import { EmptyState as m } from "../../components/EmptyState.js";
|
|
11
|
+
import { ErrorView as h } from "../../components/StateViews.js";
|
|
12
|
+
import { StatusBadge as g } from "../../components/StatusBadge.js";
|
|
13
|
+
import { ArrowLeft as _, Coins as v, Gift as y, Package as b, Pencil as x, Ticket as S, UserCheck as C, UserMinus as w, UserPlus as T, UserX as E } from "lucide-react";
|
|
14
|
+
import { useParams as D } from "react-router";
|
|
15
|
+
import { jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
16
|
+
import { AuroraBackground as A, Button as j, GlassCard as M, GradientText as N, Skeleton as P } from "@burdenoff/fe-libs/ui";
|
|
16
17
|
//#region src/comradecircle/pages/members/MemberProfilePage.tsx
|
|
17
|
-
function
|
|
18
|
+
function F(e, t) {
|
|
18
19
|
try {
|
|
19
20
|
return new Intl.NumberFormat(void 0, {
|
|
20
21
|
style: "currency",
|
|
@@ -24,107 +25,107 @@ function P(e, t) {
|
|
|
24
25
|
return `${t} ${e.toFixed(2)}`;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
let t =
|
|
29
|
-
return
|
|
28
|
+
function I({ creatorId: e }) {
|
|
29
|
+
let t = c(), a = r(e), o = i(e), s = n(e), l = a.data?.items ?? [], u = o.data?.items ?? [], d = s.data?.items ?? [], f = a.isLoading || o.isLoading || s.isLoading, p = l.length > 0 || u.length > 0 || d.length > 0;
|
|
30
|
+
return f || !p ? null : /* @__PURE__ */ k(M, {
|
|
30
31
|
treatment: "plain",
|
|
31
32
|
className: "flex flex-col gap-5 p-5 sm:p-6",
|
|
32
33
|
children: [
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ k("div", {
|
|
34
35
|
className: "flex items-center gap-2",
|
|
35
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ O(v, { className: "h-4 w-4 text-accent" }), /* @__PURE__ */ O("h3", {
|
|
36
37
|
className: "text-base font-semibold text-text-primary",
|
|
37
|
-
children: "Support this creator"
|
|
38
|
+
children: t("comradecircle.pages.memberProfile.supportCreator", "Support this creator")
|
|
38
39
|
})]
|
|
39
40
|
}),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ k("div", {
|
|
41
42
|
className: "flex items-start gap-2 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle px-3 py-2 text-xs text-status-warning-text",
|
|
42
|
-
children: [/* @__PURE__ */
|
|
43
|
+
children: [/* @__PURE__ */ O(y, { className: "mt-0.5 h-3.5 w-3.5 shrink-0" }), t("comradecircle.pages.memberProfile.paymentPending", "Payment integration pending — these are catalog listings, not a live checkout yet.")]
|
|
43
44
|
}),
|
|
44
|
-
|
|
45
|
+
l.length > 0 && /* @__PURE__ */ k("div", {
|
|
45
46
|
className: "grid gap-2",
|
|
46
|
-
children: [/* @__PURE__ */
|
|
47
|
+
children: [/* @__PURE__ */ O("p", {
|
|
47
48
|
className: "text-xs font-medium text-text-tertiary",
|
|
48
|
-
children: "Membership tiers"
|
|
49
|
-
}),
|
|
49
|
+
children: t("comradecircle.pages.memberProfile.membershipTiers", "Membership tiers")
|
|
50
|
+
}), l.map((e) => /* @__PURE__ */ k("div", {
|
|
50
51
|
className: "flex items-center justify-between gap-3 rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
52
|
+
children: [/* @__PURE__ */ k("div", {
|
|
52
53
|
className: "min-w-0",
|
|
53
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [/* @__PURE__ */ O("p", {
|
|
54
55
|
className: "truncate text-sm font-medium text-text-primary",
|
|
55
56
|
children: e.name
|
|
56
|
-
}), e.description && /* @__PURE__ */
|
|
57
|
+
}), e.description && /* @__PURE__ */ O("p", {
|
|
57
58
|
className: "truncate text-xs text-text-secondary",
|
|
58
59
|
children: e.description
|
|
59
60
|
})]
|
|
60
|
-
}), /* @__PURE__ */
|
|
61
|
+
}), /* @__PURE__ */ k("div", {
|
|
61
62
|
className: "flex shrink-0 items-center gap-2",
|
|
62
|
-
children: [/* @__PURE__ */
|
|
63
|
+
children: [/* @__PURE__ */ k("span", {
|
|
63
64
|
className: "text-sm font-semibold tabular-nums text-text-primary",
|
|
64
65
|
children: [
|
|
65
|
-
|
|
66
|
+
F(e.priceAmount, e.currency),
|
|
66
67
|
"/",
|
|
67
68
|
e.billingInterval === "YEARLY" ? "yr" : "mo"
|
|
68
69
|
]
|
|
69
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ O(j, {
|
|
70
71
|
size: "sm",
|
|
71
72
|
disabled: !0,
|
|
72
|
-
title: "Payment integration pending",
|
|
73
|
-
children: "Support"
|
|
73
|
+
title: t("comradecircle.pages.memberProfile.paymentPending", "Payment integration pending"),
|
|
74
|
+
children: t("comradecircle.pages.memberProfile.support", "Support")
|
|
74
75
|
})]
|
|
75
76
|
})]
|
|
76
77
|
}, e.id))]
|
|
77
78
|
}),
|
|
78
|
-
|
|
79
|
+
u.length > 0 && /* @__PURE__ */ k("div", {
|
|
79
80
|
className: "grid gap-2",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ O("p", {
|
|
81
82
|
className: "text-xs font-medium text-text-tertiary",
|
|
82
|
-
children: "Paid events"
|
|
83
|
-
}),
|
|
83
|
+
children: t("comradecircle.pages.memberProfile.paidEvents", "Paid events")
|
|
84
|
+
}), u.map((e) => /* @__PURE__ */ k("div", {
|
|
84
85
|
className: "flex items-center justify-between gap-3 rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
85
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ k("div", {
|
|
86
87
|
className: "flex min-w-0 items-center gap-2",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
88
|
+
children: [/* @__PURE__ */ O(S, { className: "h-4 w-4 shrink-0 text-text-tertiary" }), /* @__PURE__ */ O("p", {
|
|
88
89
|
className: "truncate text-sm font-medium text-text-primary",
|
|
89
90
|
children: e.title
|
|
90
91
|
})]
|
|
91
|
-
}), /* @__PURE__ */
|
|
92
|
+
}), /* @__PURE__ */ k("div", {
|
|
92
93
|
className: "flex shrink-0 items-center gap-2",
|
|
93
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ O("span", {
|
|
94
95
|
className: "text-sm font-semibold tabular-nums text-text-primary",
|
|
95
|
-
children:
|
|
96
|
-
}), /* @__PURE__ */
|
|
96
|
+
children: F(e.priceAmount, e.currency)
|
|
97
|
+
}), /* @__PURE__ */ O(j, {
|
|
97
98
|
size: "sm",
|
|
98
99
|
disabled: !0,
|
|
99
|
-
title: "Payment integration pending",
|
|
100
|
-
children: "Get ticket"
|
|
100
|
+
title: t("comradecircle.pages.memberProfile.paymentPending", "Payment integration pending"),
|
|
101
|
+
children: t("comradecircle.pages.memberProfile.getTicket", "Get ticket")
|
|
101
102
|
})]
|
|
102
103
|
})]
|
|
103
104
|
}, e.id))]
|
|
104
105
|
}),
|
|
105
|
-
|
|
106
|
+
d.length > 0 && /* @__PURE__ */ k("div", {
|
|
106
107
|
className: "grid gap-2",
|
|
107
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ O("p", {
|
|
108
109
|
className: "text-xs font-medium text-text-tertiary",
|
|
109
|
-
children: "Digital products"
|
|
110
|
-
}),
|
|
110
|
+
children: t("comradecircle.pages.memberProfile.digitalProducts", "Digital products")
|
|
111
|
+
}), d.map((e) => /* @__PURE__ */ k("div", {
|
|
111
112
|
className: "flex items-center justify-between gap-3 rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ k("div", {
|
|
113
114
|
className: "flex min-w-0 items-center gap-2",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
115
|
+
children: [/* @__PURE__ */ O(b, { className: "h-4 w-4 shrink-0 text-text-tertiary" }), /* @__PURE__ */ O("p", {
|
|
115
116
|
className: "truncate text-sm font-medium text-text-primary",
|
|
116
117
|
children: e.title
|
|
117
118
|
})]
|
|
118
|
-
}), /* @__PURE__ */
|
|
119
|
+
}), /* @__PURE__ */ k("div", {
|
|
119
120
|
className: "flex shrink-0 items-center gap-2",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
121
|
+
children: [/* @__PURE__ */ O("span", {
|
|
121
122
|
className: "text-sm font-semibold tabular-nums text-text-primary",
|
|
122
|
-
children:
|
|
123
|
-
}), /* @__PURE__ */
|
|
123
|
+
children: F(e.priceAmount, e.currency)
|
|
124
|
+
}), /* @__PURE__ */ O(j, {
|
|
124
125
|
size: "sm",
|
|
125
126
|
disabled: !0,
|
|
126
|
-
title: "Payment integration pending",
|
|
127
|
-
children: "Buy"
|
|
127
|
+
title: t("comradecircle.pages.memberProfile.paymentPending", "Payment integration pending"),
|
|
128
|
+
children: t("comradecircle.pages.memberProfile.buy", "Buy")
|
|
128
129
|
})]
|
|
129
130
|
})]
|
|
130
131
|
}, e.id))]
|
|
@@ -132,201 +133,213 @@ function F({ creatorId: e }) {
|
|
|
132
133
|
]
|
|
133
134
|
});
|
|
134
135
|
}
|
|
135
|
-
function
|
|
136
|
-
return /* @__PURE__ */
|
|
136
|
+
function L({ items: e, variant: t }) {
|
|
137
|
+
return /* @__PURE__ */ O("ul", {
|
|
137
138
|
className: "flex flex-wrap gap-2",
|
|
138
|
-
children: e.map((e) => /* @__PURE__ */
|
|
139
|
-
className:
|
|
139
|
+
children: e.map((e) => /* @__PURE__ */ O("li", {
|
|
140
|
+
className: l("rounded-full px-3 py-1 text-xs font-medium motion-safe:transition-transform motion-safe:duration-150 motion-safe:hover:-translate-y-0.5", t === "interest" ? "bg-[var(--color-accent-soft)] text-accent" : "border border-border-seam text-text-primary hover:border-border-strong"),
|
|
140
141
|
children: e
|
|
141
142
|
}, e))
|
|
142
143
|
});
|
|
143
144
|
}
|
|
144
|
-
function
|
|
145
|
-
return /* @__PURE__ */
|
|
145
|
+
function R() {
|
|
146
|
+
return /* @__PURE__ */ k("div", {
|
|
146
147
|
className: "mx-auto flex max-w-2xl flex-col gap-6",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
148
|
+
children: [/* @__PURE__ */ k(M, {
|
|
148
149
|
treatment: "plain",
|
|
149
150
|
className: "overflow-hidden p-0",
|
|
150
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ O(P, { className: "h-24 w-full rounded-none sm:h-28" }), /* @__PURE__ */ k("div", {
|
|
151
152
|
className: "px-5 pb-5 sm:px-6 sm:pb-6",
|
|
152
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ k("div", {
|
|
153
154
|
className: "flex flex-col items-center gap-4 sm:flex-row sm:items-end",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ O(P, { className: "-mt-16 h-28 w-28 rounded-full sm:-mt-20" }), /* @__PURE__ */ k("div", {
|
|
155
156
|
className: "w-full space-y-2 pb-1 text-center sm:text-left",
|
|
156
157
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ O(P, { className: "mx-auto h-7 w-44 sm:mx-0" }),
|
|
159
|
+
/* @__PURE__ */ O(P, { className: "mx-auto h-4 w-56 sm:mx-0" }),
|
|
160
|
+
/* @__PURE__ */ O(P, { className: "mx-auto h-5 w-20 rounded-full sm:mx-0" })
|
|
160
161
|
]
|
|
161
162
|
})]
|
|
162
|
-
}), /* @__PURE__ */
|
|
163
|
+
}), /* @__PURE__ */ k("div", {
|
|
163
164
|
className: "mt-5 space-y-2",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ O(P, { className: "h-4 w-full" }), /* @__PURE__ */ O(P, { className: "h-4 w-3/4" })]
|
|
165
166
|
})]
|
|
166
167
|
})]
|
|
167
|
-
}), /* @__PURE__ */
|
|
168
|
+
}), /* @__PURE__ */ O(M, {
|
|
168
169
|
treatment: "plain",
|
|
169
170
|
className: "flex flex-col gap-6 p-5 sm:p-6",
|
|
170
|
-
children: [0, 1].map((e) => /* @__PURE__ */
|
|
171
|
+
children: [0, 1].map((e) => /* @__PURE__ */ k("div", {
|
|
171
172
|
className: "space-y-3",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ O(P, { className: "h-4 w-24" }), /* @__PURE__ */ O("div", {
|
|
173
174
|
className: "flex flex-wrap gap-2",
|
|
174
175
|
children: [
|
|
175
176
|
0,
|
|
176
177
|
1,
|
|
177
178
|
2,
|
|
178
179
|
3
|
|
179
|
-
].map((e) => /* @__PURE__ */
|
|
180
|
+
].map((e) => /* @__PURE__ */ O(P, { className: "h-6 w-20 rounded-full" }, e))
|
|
180
181
|
})]
|
|
181
182
|
}, e))
|
|
182
183
|
})]
|
|
183
184
|
});
|
|
184
185
|
}
|
|
185
|
-
function
|
|
186
|
-
let { memberId:
|
|
186
|
+
function z() {
|
|
187
|
+
let n = c(), { memberId: r } = D(), { navigateTo: i, currentUser: l } = e(), { data: v, isLoading: y, isError: b, refetch: S } = o(r), P = a("MEMBER"), F = t(), z = s(), B = /* @__PURE__ */ k(j, {
|
|
187
188
|
variant: "ghost",
|
|
188
189
|
size: "sm",
|
|
189
190
|
onClick: () => i("members"),
|
|
190
|
-
children: [
|
|
191
|
+
children: [
|
|
192
|
+
/* @__PURE__ */ O(_, { className: "mr-1.5 h-4 w-4" }),
|
|
193
|
+
" ",
|
|
194
|
+
n("common.back", "Back")
|
|
195
|
+
]
|
|
191
196
|
});
|
|
192
|
-
if (
|
|
193
|
-
title: "Profile",
|
|
194
|
-
actions:
|
|
195
|
-
children: /* @__PURE__ */
|
|
197
|
+
if (y) return /* @__PURE__ */ O(u, {
|
|
198
|
+
title: n("comradecircle.pages.memberProfile.title", "Profile"),
|
|
199
|
+
actions: B,
|
|
200
|
+
children: /* @__PURE__ */ O(R, {})
|
|
196
201
|
});
|
|
197
|
-
if (
|
|
198
|
-
title: "Profile",
|
|
199
|
-
actions:
|
|
200
|
-
children: /* @__PURE__ */
|
|
201
|
-
message: "We couldn't load this member's profile.",
|
|
202
|
-
onRetry: () =>
|
|
202
|
+
if (b) return /* @__PURE__ */ O(u, {
|
|
203
|
+
title: n("comradecircle.pages.memberProfile.title", "Profile"),
|
|
204
|
+
actions: B,
|
|
205
|
+
children: /* @__PURE__ */ O(h, {
|
|
206
|
+
message: n("comradecircle.pages.memberProfile.errorMessage", "We couldn't load this member's profile."),
|
|
207
|
+
onRetry: () => S()
|
|
203
208
|
})
|
|
204
209
|
});
|
|
205
|
-
if (!
|
|
206
|
-
title: "Profile",
|
|
207
|
-
actions:
|
|
208
|
-
children: /* @__PURE__ */
|
|
209
|
-
icon: /* @__PURE__ */
|
|
210
|
-
title: "No profile",
|
|
211
|
-
description: "This member hasn't set up a ComradeCircle profile yet."
|
|
210
|
+
if (!v) return /* @__PURE__ */ O(u, {
|
|
211
|
+
title: n("comradecircle.pages.memberProfile.title", "Profile"),
|
|
212
|
+
actions: B,
|
|
213
|
+
children: /* @__PURE__ */ O(m, {
|
|
214
|
+
icon: /* @__PURE__ */ O(E, { className: "h-10 w-10" }),
|
|
215
|
+
title: n("comradecircle.pages.memberProfile.noProfileTitle", "No profile"),
|
|
216
|
+
description: n("comradecircle.pages.memberProfile.noProfileDescription", "This member hasn't set up a ComradeCircle profile yet.")
|
|
212
217
|
})
|
|
213
218
|
});
|
|
214
|
-
let
|
|
215
|
-
if (
|
|
216
|
-
|
|
217
|
-
targetId:
|
|
219
|
+
let V = !!(r && l?.id === r), H = (P.data ?? []).some((e) => e.targetId === r && e.targetType === "MEMBER"), U = F.isPending || z.isPending, W = async () => {
|
|
220
|
+
if (r) try {
|
|
221
|
+
H ? (await z.mutateAsync({
|
|
222
|
+
targetId: r,
|
|
218
223
|
targetType: "MEMBER"
|
|
219
|
-
}),
|
|
220
|
-
targetId:
|
|
224
|
+
}), p.success(n("comradecircle.pages.memberProfile.unfollowed", "Unfollowed"), v.displayName)) : (await F.mutateAsync({
|
|
225
|
+
targetId: r,
|
|
221
226
|
targetType: "MEMBER"
|
|
222
|
-
}),
|
|
227
|
+
}), p.success(n("comradecircle.pages.memberProfile.following", "Following"), v.displayName));
|
|
223
228
|
} catch (e) {
|
|
224
|
-
|
|
229
|
+
p.error(n("comradecircle.pages.memberProfile.followError", "Could not update follow"), f(e));
|
|
225
230
|
}
|
|
226
|
-
},
|
|
231
|
+
}, G = V ? /* @__PURE__ */ k(j, {
|
|
227
232
|
variant: "outline",
|
|
228
233
|
onClick: () => i("profile"),
|
|
229
|
-
children: [
|
|
230
|
-
|
|
234
|
+
children: [
|
|
235
|
+
/* @__PURE__ */ O(x, { className: "mr-1.5 h-4 w-4" }),
|
|
236
|
+
" ",
|
|
237
|
+
n("comradecircle.pages.memberProfile.editProfile", "Edit profile")
|
|
238
|
+
]
|
|
239
|
+
}) : H ? /* @__PURE__ */ k(j, {
|
|
231
240
|
variant: "outline",
|
|
232
|
-
onClick:
|
|
233
|
-
disabled:
|
|
234
|
-
"aria-label":
|
|
241
|
+
onClick: W,
|
|
242
|
+
disabled: U,
|
|
243
|
+
"aria-label": n("comradecircle.pages.memberProfile.followingAriaLabel", "Following {{name}}. Activate to unfollow.", { name: v.displayName }),
|
|
235
244
|
className: "group/follow min-w-[8rem] justify-center motion-safe:transition-colors hover:border-status-error-border hover:bg-status-error-subtle hover:text-status-error-text",
|
|
236
245
|
children: [
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ O(C, { className: "mr-1.5 h-4 w-4 group-hover/follow:hidden" }),
|
|
247
|
+
/* @__PURE__ */ O(w, { className: "mr-1.5 hidden h-4 w-4 group-hover/follow:inline" }),
|
|
248
|
+
/* @__PURE__ */ O("span", {
|
|
240
249
|
className: "group-hover/follow:hidden",
|
|
241
|
-
children: "Following"
|
|
250
|
+
children: n("comradecircle.pages.memberProfile.following", "Following")
|
|
242
251
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ O("span", {
|
|
244
253
|
className: "hidden group-hover/follow:inline",
|
|
245
|
-
children: "Unfollow"
|
|
254
|
+
children: n("comradecircle.pages.memberProfile.unfollow", "Unfollow")
|
|
246
255
|
})
|
|
247
256
|
]
|
|
248
|
-
}) : /* @__PURE__ */
|
|
249
|
-
onClick:
|
|
250
|
-
disabled:
|
|
251
|
-
children: [
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
+
}) : /* @__PURE__ */ k(j, {
|
|
258
|
+
onClick: W,
|
|
259
|
+
disabled: U,
|
|
260
|
+
children: [
|
|
261
|
+
/* @__PURE__ */ O(T, { className: "mr-1.5 h-4 w-4" }),
|
|
262
|
+
" ",
|
|
263
|
+
n("comradecircle.pages.memberProfile.follow", "Follow")
|
|
264
|
+
]
|
|
265
|
+
}), K = v.interests.length > 0 || v.skills.length > 0;
|
|
266
|
+
return /* @__PURE__ */ O(u, {
|
|
267
|
+
title: n("comradecircle.pages.memberProfile.title", "Profile"),
|
|
268
|
+
actions: B,
|
|
269
|
+
children: /* @__PURE__ */ k("div", {
|
|
257
270
|
className: "mx-auto flex max-w-2xl flex-col gap-6",
|
|
258
271
|
children: [
|
|
259
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ k(M, {
|
|
260
273
|
treatment: "plain",
|
|
261
274
|
className: "overflow-hidden p-0",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
275
|
+
children: [/* @__PURE__ */ O("div", {
|
|
263
276
|
className: "relative h-24 overflow-hidden bg-gloss-card sm:h-28",
|
|
264
|
-
children: /* @__PURE__ */
|
|
265
|
-
}), /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ O(A, { intensity: "subtle" })
|
|
278
|
+
}), /* @__PURE__ */ k("div", {
|
|
266
279
|
className: "px-5 pb-5 sm:px-6 sm:pb-6",
|
|
267
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ k("div", {
|
|
268
281
|
className: "flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between",
|
|
269
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ k("div", {
|
|
270
283
|
className: "flex flex-col items-center gap-4 sm:flex-row sm:items-end",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
272
|
-
name:
|
|
273
|
-
presence:
|
|
284
|
+
children: [/* @__PURE__ */ O(d, {
|
|
285
|
+
name: v.displayName,
|
|
286
|
+
presence: v.presence,
|
|
274
287
|
size: "2xl",
|
|
275
|
-
seed:
|
|
276
|
-
fileId:
|
|
288
|
+
seed: v.memberId,
|
|
289
|
+
fileId: v.avatar?.id,
|
|
277
290
|
ring: !0,
|
|
278
291
|
className: "-mt-16 sm:-mt-20"
|
|
279
|
-
}), /* @__PURE__ */
|
|
292
|
+
}), /* @__PURE__ */ k("div", {
|
|
280
293
|
className: "min-w-0 pb-1 text-center sm:text-left",
|
|
281
294
|
children: [
|
|
282
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ O(N, {
|
|
283
296
|
as: "h2",
|
|
284
297
|
className: "text-2xl font-semibold sm:text-[1.75rem]",
|
|
285
|
-
children:
|
|
298
|
+
children: v.displayName
|
|
286
299
|
}),
|
|
287
|
-
|
|
300
|
+
v.headline && /* @__PURE__ */ O("p", {
|
|
288
301
|
className: "mt-1 text-sm text-text-secondary",
|
|
289
|
-
children:
|
|
302
|
+
children: v.headline
|
|
290
303
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ O("div", {
|
|
292
305
|
className: "mt-3 flex justify-center sm:justify-start",
|
|
293
|
-
children: /* @__PURE__ */
|
|
306
|
+
children: /* @__PURE__ */ O(g, { status: v.presence })
|
|
294
307
|
})
|
|
295
308
|
]
|
|
296
309
|
})]
|
|
297
|
-
}), /* @__PURE__ */
|
|
310
|
+
}), /* @__PURE__ */ O("div", {
|
|
298
311
|
className: "flex shrink-0 justify-center pb-1 sm:justify-end",
|
|
299
|
-
children:
|
|
312
|
+
children: G
|
|
300
313
|
})]
|
|
301
|
-
}),
|
|
314
|
+
}), v.bio && /* @__PURE__ */ O("p", {
|
|
302
315
|
className: "mt-5 whitespace-pre-wrap text-sm leading-relaxed text-text-secondary",
|
|
303
|
-
children:
|
|
316
|
+
children: v.bio
|
|
304
317
|
})]
|
|
305
318
|
})]
|
|
306
319
|
}),
|
|
307
|
-
|
|
320
|
+
K && /* @__PURE__ */ k(M, {
|
|
308
321
|
treatment: "plain",
|
|
309
322
|
className: "flex flex-col gap-6 p-5 sm:p-6",
|
|
310
|
-
children: [
|
|
323
|
+
children: [v.interests.length > 0 && /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h3", {
|
|
311
324
|
className: "mb-3 text-base font-semibold text-text-primary",
|
|
312
|
-
children: "Interests"
|
|
313
|
-
}), /* @__PURE__ */
|
|
314
|
-
items:
|
|
325
|
+
children: n("comradecircle.pages.memberProfile.interests", "Interests")
|
|
326
|
+
}), /* @__PURE__ */ O(L, {
|
|
327
|
+
items: v.interests,
|
|
315
328
|
variant: "interest"
|
|
316
|
-
})] }),
|
|
329
|
+
})] }), v.skills.length > 0 && /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h3", {
|
|
317
330
|
className: "mb-3 text-base font-semibold text-text-primary",
|
|
318
|
-
children: "Skills"
|
|
319
|
-
}), /* @__PURE__ */
|
|
320
|
-
items:
|
|
331
|
+
children: n("comradecircle.pages.memberProfile.skills", "Skills")
|
|
332
|
+
}), /* @__PURE__ */ O(L, {
|
|
333
|
+
items: v.skills,
|
|
321
334
|
variant: "skill"
|
|
322
335
|
})] })]
|
|
323
336
|
}),
|
|
324
|
-
|
|
337
|
+
r && /* @__PURE__ */ O(I, { creatorId: r })
|
|
325
338
|
]
|
|
326
339
|
})
|
|
327
340
|
});
|
|
328
341
|
}
|
|
329
342
|
//#endregion
|
|
330
|
-
export {
|
|
343
|
+
export { z as MemberProfilePage };
|
|
331
344
|
|
|
332
345
|
//# sourceMappingURL=MemberProfilePage.js.map
|