@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 {
|
|
3
|
+
import { useComProfile as t, useComUpsertProfile as n } from "../../hooks/useComradeCircleApi.js";
|
|
4
|
+
import { useTr as r } from "../../hooks/useTr.js";
|
|
5
5
|
import "../../hooks/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
6
|
+
import { PageLayout as i } from "../../components/PageLayout.js";
|
|
7
|
+
import { Avatar as a } from "../../components/Avatar.js";
|
|
8
|
+
import { describeError as o, notify as s } from "../../lib/toast.js";
|
|
9
|
+
import { formatEnumLabel as c } from "../../utils/formatters.js";
|
|
10
|
+
import { ErrorView as l, LoadingView as u } from "../../components/StateViews.js";
|
|
11
|
+
import { StatusBadge as d } from "../../components/StatusBadge.js";
|
|
12
|
+
import { TagInput as f } from "../../components/TagInput.js";
|
|
13
|
+
import { MiniBar as p } from "../../components/MiniBar.js";
|
|
14
|
+
import { AvatarUploadField as m } from "../../components/AvatarUploadField.js";
|
|
15
|
+
import { useState as h } from "react";
|
|
16
|
+
import { Coins as g, Save as _ } from "lucide-react";
|
|
17
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
18
|
+
import { Button as b, GlassCard as x, Input as S, Label as C, Select as w, SelectContent as T, SelectItem as E, SelectTrigger as ee, SelectValue as D, Switch as O, Textarea as k } from "@burdenoff/fe-libs/ui";
|
|
18
19
|
//#region src/comradecircle/pages/profile/MyProfilePage.tsx
|
|
19
20
|
var A = [
|
|
20
21
|
"ONLINE",
|
|
@@ -23,33 +24,37 @@ var A = [
|
|
|
23
24
|
"OFFLINE"
|
|
24
25
|
];
|
|
25
26
|
function j() {
|
|
26
|
-
let { currentUser:
|
|
27
|
-
return
|
|
28
|
-
title: "My Profile",
|
|
29
|
-
children: /* @__PURE__ */
|
|
30
|
-
}) :
|
|
31
|
-
title: "My Profile",
|
|
32
|
-
children: /* @__PURE__ */
|
|
33
|
-
title: "We couldn't load your profile",
|
|
34
|
-
message: "Something went wrong while fetching your profile. Retry before editing so you don't overwrite saved details.",
|
|
35
|
-
onRetry: () =>
|
|
27
|
+
let n = r(), { currentUser: a, navigateTo: o } = e(), s = a?.id, { data: c, isLoading: d, isError: f, refetch: p } = t(s), m = a?.name ?? a?.email ?? "";
|
|
28
|
+
return d ? /* @__PURE__ */ v(i, {
|
|
29
|
+
title: n("comradecircle.pages.myProfile.title", "My Profile"),
|
|
30
|
+
children: /* @__PURE__ */ v(u, { label: n("comradecircle.pages.myProfile.loadingProfile", "Loading your profile…") })
|
|
31
|
+
}) : f ? /* @__PURE__ */ v(i, {
|
|
32
|
+
title: n("comradecircle.pages.myProfile.title", "My Profile"),
|
|
33
|
+
children: /* @__PURE__ */ v(l, {
|
|
34
|
+
title: n("comradecircle.pages.myProfile.errorTitle", "We couldn't load your profile"),
|
|
35
|
+
message: n("comradecircle.pages.myProfile.errorMessage", "Something went wrong while fetching your profile. Retry before editing so you don't overwrite saved details."),
|
|
36
|
+
onRetry: () => p()
|
|
36
37
|
})
|
|
37
|
-
}) : /* @__PURE__ */
|
|
38
|
-
title: "My Profile",
|
|
39
|
-
description: "Your profile is your identity across every circle — it's how members recognise, find and follow you.",
|
|
40
|
-
actions: /* @__PURE__ */
|
|
38
|
+
}) : /* @__PURE__ */ v(i, {
|
|
39
|
+
title: n("comradecircle.pages.myProfile.title", "My Profile"),
|
|
40
|
+
description: n("comradecircle.pages.myProfile.description", "Your profile is your identity across every circle — it's how members recognise, find and follow you."),
|
|
41
|
+
actions: /* @__PURE__ */ y(b, {
|
|
41
42
|
variant: "outline",
|
|
42
|
-
onClick: () =>
|
|
43
|
-
children: [
|
|
43
|
+
onClick: () => o("monetization"),
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ v(g, { className: "mr-1.5 h-4 w-4" }),
|
|
46
|
+
" ",
|
|
47
|
+
n("comradecircle.pages.myProfile.monetization", "Monetization")
|
|
48
|
+
]
|
|
44
49
|
}),
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
initialProfile:
|
|
47
|
-
identityName:
|
|
48
|
-
},
|
|
50
|
+
children: /* @__PURE__ */ v(P, {
|
|
51
|
+
initialProfile: c ?? null,
|
|
52
|
+
identityName: m
|
|
53
|
+
}, c?.id ?? "new")
|
|
49
54
|
});
|
|
50
55
|
}
|
|
51
56
|
function M({ children: e }) {
|
|
52
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ v("p", {
|
|
53
58
|
className: "text-xs font-semibold uppercase tracking-[0.08em] text-text-tertiary",
|
|
54
59
|
children: e
|
|
55
60
|
});
|
|
@@ -58,7 +63,7 @@ function N(e, t) {
|
|
|
58
63
|
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
59
64
|
}
|
|
60
65
|
function P({ initialProfile: e, identityName: t }) {
|
|
61
|
-
let
|
|
66
|
+
let i = r(), l = n(), u = {
|
|
62
67
|
displayName: e?.displayName ?? t,
|
|
63
68
|
headline: e?.headline ?? "",
|
|
64
69
|
bio: e?.bio ?? "",
|
|
@@ -67,293 +72,293 @@ function P({ initialProfile: e, identityName: t }) {
|
|
|
67
72
|
presence: e?.presence ?? "ONLINE",
|
|
68
73
|
discoverable: e?.discoverable ?? !0,
|
|
69
74
|
avatarFileId: e?.avatar?.id ?? null
|
|
70
|
-
}, [
|
|
75
|
+
}, [g, j] = h(u.displayName), [P, F] = h(u.headline), [I, L] = h(u.bio), [R, z] = h(u.interests), [B, V] = h(u.skills), [H, U] = h(u.presence), [W, G] = h(u.discoverable), [K, q] = h(u.avatarFileId), J = g.trim(), Y = [
|
|
71
76
|
{
|
|
72
|
-
done: !!
|
|
73
|
-
nudge: "Add a profile photo so members recognise you at a glance."
|
|
77
|
+
done: !!K,
|
|
78
|
+
nudge: i("comradecircle.pages.myProfile.nudgeAvatar", "Add a profile photo so members recognise you at a glance.")
|
|
74
79
|
},
|
|
75
80
|
{
|
|
76
|
-
done:
|
|
77
|
-
nudge: "Add a display name so members know who you are."
|
|
81
|
+
done: J.length > 0,
|
|
82
|
+
nudge: i("comradecircle.pages.myProfile.nudgeDisplayName", "Add a display name so members know who you are.")
|
|
78
83
|
},
|
|
79
84
|
{
|
|
80
|
-
done:
|
|
81
|
-
nudge: "Add a headline to sum yourself up in one line."
|
|
85
|
+
done: P.trim().length > 0,
|
|
86
|
+
nudge: i("comradecircle.pages.myProfile.nudgeHeadline", "Add a headline to sum yourself up in one line.")
|
|
82
87
|
},
|
|
83
88
|
{
|
|
84
|
-
done:
|
|
85
|
-
nudge: "Write a short bio to help circles get to know you."
|
|
89
|
+
done: I.trim().length > 0,
|
|
90
|
+
nudge: i("comradecircle.pages.myProfile.nudgeBio", "Write a short bio to help circles get to know you.")
|
|
86
91
|
},
|
|
87
92
|
{
|
|
88
|
-
done:
|
|
89
|
-
nudge: "Add a few interests to help you find your people."
|
|
93
|
+
done: R.length > 0,
|
|
94
|
+
nudge: i("comradecircle.pages.myProfile.nudgeInterests", "Add a few interests to help you find your people.")
|
|
90
95
|
},
|
|
91
96
|
{
|
|
92
|
-
done:
|
|
93
|
-
nudge: "List some skills so circles know what you bring."
|
|
97
|
+
done: B.length > 0,
|
|
98
|
+
nudge: i("comradecircle.pages.myProfile.nudgeSkills", "List some skills so circles know what you bring.")
|
|
94
99
|
}
|
|
95
|
-
],
|
|
96
|
-
return /* @__PURE__ */
|
|
100
|
+
], X = Y.filter((e) => e.done).length, Z = Math.round(X / Y.length * 100), Q = Y.find((e) => !e.done)?.nudge ?? i("comradecircle.pages.myProfile.nudgeComplete", "Your profile is complete — it looks great."), $ = g !== u.displayName || P !== u.headline || I !== u.bio || H !== u.presence || W !== u.discoverable || K !== u.avatarFileId || !N(R, u.interests) || !N(B, u.skills);
|
|
101
|
+
return /* @__PURE__ */ y("div", {
|
|
97
102
|
className: "grid gap-6 lg:grid-cols-[1fr_320px]",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
103
|
+
children: [/* @__PURE__ */ v(x, {
|
|
99
104
|
treatment: "plain",
|
|
100
105
|
className: "order-2 p-5 sm:p-6 lg:order-1",
|
|
101
|
-
children: /* @__PURE__ */
|
|
106
|
+
children: /* @__PURE__ */ y("div", {
|
|
102
107
|
className: "flex flex-col gap-6",
|
|
103
108
|
children: [
|
|
104
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ y("div", {
|
|
105
110
|
className: "grid gap-2 rounded-xl border border-border-seam bg-bg-surface p-4",
|
|
106
111
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ y("div", {
|
|
108
113
|
className: "flex items-baseline justify-between gap-3",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ v(M, { children: i("comradecircle.pages.myProfile.completenessLabel", "Profile completeness") }), /* @__PURE__ */ y("span", {
|
|
110
115
|
className: "text-sm font-semibold tabular-nums text-text-primary",
|
|
111
|
-
children: [
|
|
116
|
+
children: [Z, "%"]
|
|
112
117
|
})]
|
|
113
118
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
value:
|
|
119
|
+
/* @__PURE__ */ v(p, {
|
|
120
|
+
value: Z,
|
|
116
121
|
height: 8,
|
|
117
122
|
barClassName: "bg-gradient-to-r from-accent to-[var(--color-accent-soft)]"
|
|
118
123
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ v("p", {
|
|
120
125
|
className: "text-xs text-text-secondary",
|
|
121
|
-
children:
|
|
126
|
+
children: Q
|
|
122
127
|
})
|
|
123
128
|
]
|
|
124
129
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ y("section", {
|
|
126
131
|
className: "grid gap-4",
|
|
127
132
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ v(M, { children: i("comradecircle.pages.myProfile.identitySection", "Identity") }),
|
|
134
|
+
/* @__PURE__ */ y("div", {
|
|
130
135
|
className: "grid gap-1.5",
|
|
131
|
-
children: [/* @__PURE__ */
|
|
132
|
-
fileId:
|
|
133
|
-
name:
|
|
134
|
-
onUploaded:
|
|
136
|
+
children: [/* @__PURE__ */ v(C, { children: i("comradecircle.pages.myProfile.avatarLabel", "Avatar") }), /* @__PURE__ */ v(m, {
|
|
137
|
+
fileId: K,
|
|
138
|
+
name: J || t,
|
|
139
|
+
onUploaded: q
|
|
135
140
|
})]
|
|
136
141
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ y("div", {
|
|
138
143
|
className: "grid gap-1.5",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ v(C, {
|
|
140
145
|
htmlFor: "profile-name",
|
|
141
|
-
children: "Display name"
|
|
142
|
-
}), /* @__PURE__ */
|
|
146
|
+
children: i("comradecircle.pages.myProfile.displayNameLabel", "Display name")
|
|
147
|
+
}), /* @__PURE__ */ v(S, {
|
|
143
148
|
id: "profile-name",
|
|
144
|
-
value:
|
|
145
|
-
onChange: (e) =>
|
|
146
|
-
placeholder: "How members see you",
|
|
149
|
+
value: g,
|
|
150
|
+
onChange: (e) => j(e.target.value),
|
|
151
|
+
placeholder: i("comradecircle.pages.myProfile.displayNamePlaceholder", "How members see you"),
|
|
147
152
|
required: !0,
|
|
148
153
|
"aria-required": "true"
|
|
149
154
|
})]
|
|
150
155
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ y("div", {
|
|
152
157
|
className: "grid gap-1.5",
|
|
153
|
-
children: [/* @__PURE__ */
|
|
158
|
+
children: [/* @__PURE__ */ v(C, {
|
|
154
159
|
htmlFor: "profile-headline",
|
|
155
|
-
children: "Headline"
|
|
156
|
-
}), /* @__PURE__ */
|
|
160
|
+
children: i("comradecircle.pages.myProfile.headlineLabel", "Headline")
|
|
161
|
+
}), /* @__PURE__ */ v(S, {
|
|
157
162
|
id: "profile-headline",
|
|
158
|
-
value:
|
|
159
|
-
onChange: (e) =>
|
|
160
|
-
placeholder: "e.g. Community organiser · Photographer"
|
|
163
|
+
value: P,
|
|
164
|
+
onChange: (e) => F(e.target.value),
|
|
165
|
+
placeholder: i("comradecircle.pages.myProfile.headlinePlaceholder", "e.g. Community organiser · Photographer")
|
|
161
166
|
})]
|
|
162
167
|
})
|
|
163
168
|
]
|
|
164
169
|
}),
|
|
165
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ y("section", {
|
|
166
171
|
className: "grid gap-4 border-t border-border-seam pt-6",
|
|
167
172
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ v(M, { children: i("comradecircle.pages.myProfile.aboutSection", "About you") }),
|
|
174
|
+
/* @__PURE__ */ y("div", {
|
|
170
175
|
className: "grid gap-1.5",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ v(C, {
|
|
172
177
|
htmlFor: "profile-bio",
|
|
173
|
-
children: "Bio"
|
|
174
|
-
}), /* @__PURE__ */
|
|
178
|
+
children: i("comradecircle.pages.myProfile.bioLabel", "Bio")
|
|
179
|
+
}), /* @__PURE__ */ v(k, {
|
|
175
180
|
id: "profile-bio",
|
|
176
|
-
value:
|
|
177
|
-
onChange: (e) =>
|
|
181
|
+
value: I,
|
|
182
|
+
onChange: (e) => L(e.target.value),
|
|
178
183
|
rows: 4,
|
|
179
|
-
placeholder: "Tell circles a little about yourself."
|
|
184
|
+
placeholder: i("comradecircle.pages.myProfile.bioPlaceholder", "Tell circles a little about yourself.")
|
|
180
185
|
})]
|
|
181
186
|
}),
|
|
182
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ y("div", {
|
|
183
188
|
className: "grid gap-1.5",
|
|
184
|
-
children: [/* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ v(C, {
|
|
185
190
|
htmlFor: "profile-interests",
|
|
186
|
-
children: "Interests"
|
|
187
|
-
}), /* @__PURE__ */
|
|
191
|
+
children: i("comradecircle.pages.myProfile.interestsLabel", "Interests")
|
|
192
|
+
}), /* @__PURE__ */ v(f, {
|
|
188
193
|
id: "profile-interests",
|
|
189
|
-
value:
|
|
190
|
-
onChange:
|
|
191
|
-
placeholder: "Add an interest…"
|
|
194
|
+
value: R,
|
|
195
|
+
onChange: z,
|
|
196
|
+
placeholder: i("comradecircle.pages.myProfile.interestsPlaceholder", "Add an interest…")
|
|
192
197
|
})]
|
|
193
198
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ y("div", {
|
|
195
200
|
className: "grid gap-1.5",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ v(C, {
|
|
197
202
|
htmlFor: "profile-skills",
|
|
198
|
-
children: "Skills"
|
|
199
|
-
}), /* @__PURE__ */
|
|
203
|
+
children: i("comradecircle.pages.myProfile.skillsLabel", "Skills")
|
|
204
|
+
}), /* @__PURE__ */ v(f, {
|
|
200
205
|
id: "profile-skills",
|
|
201
|
-
value:
|
|
202
|
-
onChange:
|
|
203
|
-
placeholder: "Add a skill…"
|
|
206
|
+
value: B,
|
|
207
|
+
onChange: V,
|
|
208
|
+
placeholder: i("comradecircle.pages.myProfile.skillsPlaceholder", "Add a skill…")
|
|
204
209
|
})]
|
|
205
210
|
})
|
|
206
211
|
]
|
|
207
212
|
}),
|
|
208
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ y("section", {
|
|
209
214
|
className: "grid gap-4 border-t border-border-seam pt-6",
|
|
210
215
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ v(M, { children: i("comradecircle.pages.myProfile.visibilitySection", "Visibility") }),
|
|
217
|
+
/* @__PURE__ */ y("div", {
|
|
213
218
|
className: "grid gap-1.5",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
219
|
+
children: [/* @__PURE__ */ v(C, {
|
|
215
220
|
htmlFor: "profile-presence",
|
|
216
|
-
children: "Presence"
|
|
217
|
-
}), /* @__PURE__ */
|
|
218
|
-
value:
|
|
219
|
-
onValueChange: (e) =>
|
|
220
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: i("comradecircle.pages.myProfile.presenceLabel", "Presence")
|
|
222
|
+
}), /* @__PURE__ */ y(w, {
|
|
223
|
+
value: H,
|
|
224
|
+
onValueChange: (e) => U(e),
|
|
225
|
+
children: [/* @__PURE__ */ v(ee, {
|
|
221
226
|
id: "profile-presence",
|
|
222
|
-
children: /* @__PURE__ */
|
|
223
|
-
}), /* @__PURE__ */
|
|
227
|
+
children: /* @__PURE__ */ v(D, {})
|
|
228
|
+
}), /* @__PURE__ */ v(T, { children: A.map((e) => /* @__PURE__ */ v(E, {
|
|
224
229
|
value: e,
|
|
225
|
-
children:
|
|
230
|
+
children: c(e)
|
|
226
231
|
}, e)) })]
|
|
227
232
|
})]
|
|
228
233
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ y("div", {
|
|
230
235
|
className: "flex items-start justify-between gap-4 rounded-xl border border-border-seam bg-bg-surface p-3.5",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ y("div", {
|
|
232
237
|
className: "min-w-0",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ v(C, {
|
|
234
239
|
htmlFor: "profile-discoverable",
|
|
235
|
-
children: "List me in the member directory"
|
|
236
|
-
}), /* @__PURE__ */
|
|
240
|
+
children: i("comradecircle.pages.myProfile.discoverableLabel", "List me in the member directory")
|
|
241
|
+
}), /* @__PURE__ */ v("p", {
|
|
237
242
|
className: "mt-1 text-xs text-text-tertiary",
|
|
238
|
-
children: "When on, your profile appears in the discoverable member directory so others can find and follow you. Turn it off to stay unlisted."
|
|
243
|
+
children: i("comradecircle.pages.myProfile.discoverableDescription", "When on, your profile appears in the discoverable member directory so others can find and follow you. Turn it off to stay unlisted.")
|
|
239
244
|
})]
|
|
240
|
-
}), /* @__PURE__ */
|
|
245
|
+
}), /* @__PURE__ */ v(O, {
|
|
241
246
|
id: "profile-discoverable",
|
|
242
|
-
checked:
|
|
243
|
-
onCheckedChange:
|
|
244
|
-
"aria-label": "List me in the member directory",
|
|
247
|
+
checked: W,
|
|
248
|
+
onCheckedChange: G,
|
|
249
|
+
"aria-label": i("comradecircle.pages.myProfile.discoverableAriaLabel", "List me in the member directory"),
|
|
245
250
|
className: "mt-0.5 shrink-0"
|
|
246
251
|
})]
|
|
247
252
|
})
|
|
248
253
|
]
|
|
249
254
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ y("div", {
|
|
251
256
|
className: "flex flex-wrap items-center justify-end gap-3 border-t border-border-seam pt-5",
|
|
252
|
-
children: [
|
|
257
|
+
children: [!$ && !l.isPending && /* @__PURE__ */ v("span", {
|
|
253
258
|
className: "text-xs text-text-tertiary",
|
|
254
|
-
children: "No changes to save"
|
|
255
|
-
}), /* @__PURE__ */
|
|
259
|
+
children: i("comradecircle.pages.myProfile.noChanges", "No changes to save")
|
|
260
|
+
}), /* @__PURE__ */ y(b, {
|
|
256
261
|
onClick: async () => {
|
|
257
|
-
let e =
|
|
262
|
+
let e = g.trim();
|
|
258
263
|
if (!e) {
|
|
259
|
-
|
|
264
|
+
s.error(i("comradecircle.pages.myProfile.displayNameRequiredTitle", "Display name required"), i("comradecircle.pages.myProfile.displayNameRequiredMessage", "Add a name so members can recognise you."));
|
|
260
265
|
return;
|
|
261
266
|
}
|
|
262
267
|
try {
|
|
263
|
-
await
|
|
268
|
+
await l.mutateAsync({
|
|
264
269
|
displayName: e,
|
|
265
|
-
headline:
|
|
266
|
-
bio:
|
|
267
|
-
avatarFileId:
|
|
268
|
-
interests:
|
|
269
|
-
skills:
|
|
270
|
-
presence:
|
|
271
|
-
discoverable:
|
|
272
|
-
}),
|
|
270
|
+
headline: P.trim() || null,
|
|
271
|
+
bio: I.trim() || null,
|
|
272
|
+
avatarFileId: K,
|
|
273
|
+
interests: R,
|
|
274
|
+
skills: B,
|
|
275
|
+
presence: H,
|
|
276
|
+
discoverable: W
|
|
277
|
+
}), s.success(i("comradecircle.pages.myProfile.profileSaved", "Profile saved"));
|
|
273
278
|
} catch (e) {
|
|
274
|
-
|
|
279
|
+
s.error(i("comradecircle.pages.myProfile.saveErrorTitle", "Could not save profile"), o(e));
|
|
275
280
|
}
|
|
276
281
|
},
|
|
277
|
-
disabled:
|
|
278
|
-
children: [/* @__PURE__ */ _
|
|
282
|
+
disabled: l.isPending || !$,
|
|
283
|
+
children: [/* @__PURE__ */ v(_, { className: "mr-1.5 h-4 w-4" }), l.isPending ? i("comradecircle.pages.myProfile.saving", "Saving…") : i("comradecircle.pages.myProfile.saveProfile", "Save profile")]
|
|
279
284
|
})]
|
|
280
285
|
})
|
|
281
286
|
]
|
|
282
287
|
})
|
|
283
|
-
}), /* @__PURE__ */
|
|
288
|
+
}), /* @__PURE__ */ v("div", {
|
|
284
289
|
className: "order-1 lg:order-2",
|
|
285
|
-
children: /* @__PURE__ */
|
|
290
|
+
children: /* @__PURE__ */ y(x, {
|
|
286
291
|
treatment: "plain",
|
|
287
292
|
className: "overflow-hidden p-0 lg:sticky lg:top-6",
|
|
288
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ y("div", {
|
|
289
294
|
className: "relative h-24 bg-gloss-card",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
295
|
+
children: [/* @__PURE__ */ v("div", {
|
|
291
296
|
className: "absolute inset-0 bg-gradient-to-br from-[var(--color-accent-soft)] via-[var(--color-accent-soft)]/30 to-transparent",
|
|
292
297
|
"aria-hidden": "true"
|
|
293
|
-
}), /* @__PURE__ */
|
|
298
|
+
}), /* @__PURE__ */ v("span", {
|
|
294
299
|
className: "absolute right-3 top-3 rounded-full bg-bg-surface/80 px-2 py-0.5 text-[0.62rem] font-medium uppercase tracking-[0.08em] text-text-tertiary backdrop-blur",
|
|
295
|
-
children: "How members see you"
|
|
300
|
+
children: i("comradecircle.pages.myProfile.previewLabel", "How members see you")
|
|
296
301
|
})]
|
|
297
|
-
}), /* @__PURE__ */
|
|
302
|
+
}), /* @__PURE__ */ y("div", {
|
|
298
303
|
className: "px-5 pb-5",
|
|
299
304
|
children: [
|
|
300
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ y("div", {
|
|
301
306
|
className: "-mt-12 flex flex-col items-center text-center",
|
|
302
307
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
name:
|
|
308
|
+
/* @__PURE__ */ v(a, {
|
|
309
|
+
name: J || t,
|
|
305
310
|
size: "xl",
|
|
306
|
-
presence:
|
|
307
|
-
fileId:
|
|
311
|
+
presence: H,
|
|
312
|
+
fileId: K,
|
|
308
313
|
ring: !0
|
|
309
314
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ v("h3", {
|
|
311
316
|
className: "mt-3 max-w-full truncate text-lg font-semibold text-text-primary",
|
|
312
|
-
children:
|
|
317
|
+
children: J || i("comradecircle.pages.myProfile.previewNameFallback", "Your name")
|
|
313
318
|
}),
|
|
314
|
-
|
|
319
|
+
P.trim() && /* @__PURE__ */ v("p", {
|
|
315
320
|
className: "mt-0.5 max-w-full truncate text-sm text-text-secondary",
|
|
316
|
-
children:
|
|
321
|
+
children: P.trim()
|
|
317
322
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ v("div", {
|
|
319
324
|
className: "mt-2.5",
|
|
320
|
-
children: /* @__PURE__ */
|
|
325
|
+
children: /* @__PURE__ */ v(d, { status: H })
|
|
321
326
|
})
|
|
322
327
|
]
|
|
323
328
|
}),
|
|
324
|
-
|
|
329
|
+
I.trim() && /* @__PURE__ */ v("p", {
|
|
325
330
|
className: "mt-4 whitespace-pre-wrap break-words text-center text-sm text-text-secondary",
|
|
326
|
-
children:
|
|
331
|
+
children: I.trim()
|
|
327
332
|
}),
|
|
328
|
-
|
|
333
|
+
R.length > 0 && /* @__PURE__ */ y("div", {
|
|
329
334
|
className: "mt-5",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
335
|
+
children: [/* @__PURE__ */ v("p", {
|
|
331
336
|
className: "mb-1.5 text-xs font-medium text-text-tertiary",
|
|
332
|
-
children: "Interests"
|
|
333
|
-
}), /* @__PURE__ */
|
|
337
|
+
children: i("comradecircle.pages.memberProfile.interests", "Interests")
|
|
338
|
+
}), /* @__PURE__ */ v("div", {
|
|
334
339
|
className: "flex flex-wrap gap-1.5",
|
|
335
|
-
children:
|
|
340
|
+
children: R.map((e) => /* @__PURE__ */ v("span", {
|
|
336
341
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary",
|
|
337
342
|
children: e
|
|
338
343
|
}, e))
|
|
339
344
|
})]
|
|
340
345
|
}),
|
|
341
|
-
|
|
346
|
+
B.length > 0 && /* @__PURE__ */ y("div", {
|
|
342
347
|
className: "mt-4",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
348
|
+
children: [/* @__PURE__ */ v("p", {
|
|
344
349
|
className: "mb-1.5 text-xs font-medium text-text-tertiary",
|
|
345
|
-
children: "Skills"
|
|
346
|
-
}), /* @__PURE__ */
|
|
350
|
+
children: i("comradecircle.pages.memberProfile.skills", "Skills")
|
|
351
|
+
}), /* @__PURE__ */ v("div", {
|
|
347
352
|
className: "flex flex-wrap gap-1.5",
|
|
348
|
-
children:
|
|
353
|
+
children: B.map((e) => /* @__PURE__ */ v("span", {
|
|
349
354
|
className: "rounded-full bg-[var(--color-accent-soft)] px-2.5 py-0.5 text-xs font-medium text-text-primary",
|
|
350
355
|
children: e
|
|
351
356
|
}, e))
|
|
352
357
|
})]
|
|
353
358
|
}),
|
|
354
|
-
!
|
|
359
|
+
!W && /* @__PURE__ */ v("p", {
|
|
355
360
|
className: "mt-5 text-center text-xs text-text-tertiary",
|
|
356
|
-
children: "Hidden from the member directory."
|
|
361
|
+
children: i("comradecircle.pages.myProfile.hiddenFromDirectory", "Hidden from the member directory.")
|
|
357
362
|
})
|
|
358
363
|
]
|
|
359
364
|
})]
|