@openpeepshq/react 0.10.0 → 0.11.0
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/components/RelationCapabilitiesEditor.js +3 -3
- package/dist/components/RoleCapabilityMatrix.js +2 -2
- package/dist/components/accounts/SignUpLoginModal.js +1 -1
- package/dist/components/configuration/ConfigurationList.js +2 -2
- package/dist/components/conversations/ConversationMessageBubble.js +8 -1
- package/dist/components/conversations/CreateNewConversation.js +34 -17
- package/dist/components/form/ImageEditModal.js +2 -2
- package/dist/components/groups/ChangeGroupRolesModal.js +1 -1
- package/dist/components/groups/ConfirmGroupExitModal.js +1 -1
- package/dist/components/groups/ConfirmMemberRemovalModal.js +1 -1
- package/dist/components/groups/DeleteGroupModal.js +1 -1
- package/dist/components/groups/GroupForm.js +2 -2
- package/dist/components/groups/GroupNotificationSettingsModal.js +2 -2
- package/dist/components/jams/JamCallParticipant.js +4 -3
- package/dist/components/jams/JamGuestForm.js +1 -1
- package/dist/components/jams/jamEventActions.d.ts +10 -0
- package/dist/components/jams/jamEventActions.js +13 -0
- package/dist/components/navigation/ContentHeader.js +1 -1
- package/dist/components/navigation/FooterMobile.js +1 -1
- package/dist/components/navigation/SideBar.js +1 -1
- package/dist/components/post/FullPostLayout.js +1 -1
- package/dist/components/post/index.d.ts +1 -0
- package/dist/components/post/index.js +1 -0
- package/dist/components/post/pieces/EventRsvpList.js +1 -1
- package/dist/components/post/pieces/EventRsvpScopeDialog.js +2 -2
- package/dist/components/post/pieces/EventWaitlistJoinDialog.js +1 -1
- package/dist/components/post/pieces/GalleryModal.js +1 -1
- package/dist/components/post/pieces/modals/DeletePostModal.js +2 -2
- package/dist/components/post/post-form/ComposeAttachments.d.ts +2 -0
- package/dist/components/post/post-form/ComposeAttachments.js +8 -0
- package/dist/components/post/post-form/DescriptionEditModal.js +1 -1
- package/dist/components/post/post-form/EditPostModal.js +2 -2
- package/dist/components/post/post-form/EventForm.js +4 -26
- package/dist/components/post/post-form/PostAudienceSelector.js +2 -2
- package/dist/components/post/post-form/ReplyModal.js +1 -1
- package/dist/components/post/types/event/FullEvent.js +3 -3
- package/dist/components/post/types/resource/FullResource.js +2 -1
- package/dist/components/preview-link/RemotePreviewLink.js +32 -4
- package/dist/components/preview-link/RemotePreviewLink.test.d.ts +1 -0
- package/dist/components/preview-link/RemotePreviewLink.test.js +118 -0
- package/dist/components/profile/ProfileActivitySummary.js +4 -4
- package/dist/components/profile/ProfileBadge.js +1 -1
- package/dist/components/profile/ProfilePageAction.js +1 -1
- package/dist/components/profile/ProfilePostsAndReplies.js +1 -1
- package/dist/components/profile/ProfileSelector.js +1 -1
- package/dist/components/profile/ReportProfileOrPostModal.js +4 -2
- package/dist/components/resources/CategoryPathPicker.js +1 -1
- package/dist/components/resources/ResourceCard.js +5 -3
- package/dist/components/resources/ResourceLibrary.js +61 -8
- package/dist/components/resources/ResourceLibrary.test.d.ts +1 -0
- package/dist/components/resources/ResourceLibrary.test.js +122 -0
- package/dist/components/server-data/context.d.ts +24 -16
- package/dist/contexts/openpeeps/hooks/admin.d.ts +2 -2
- package/dist/contexts/openpeeps/hooks/auth.d.ts +1 -1
- package/dist/contexts/router/index.d.ts +8 -0
- package/dist/contexts/router/index.js +27 -2
- package/dist/hooks/conversations/dmMessage.d.ts +15 -0
- package/dist/hooks/conversations/dmMessage.js +12 -0
- package/dist/hooks/conversations/useCreateConversation.d.ts +40 -0
- package/dist/hooks/conversations/useCreateConversation.js +6 -0
- package/dist/hooks/events/useEventForm.d.ts +3 -0
- package/dist/hooks/events/useEventForm.js +31 -2
- package/dist/hooks/events/useEventForm.test.d.ts +1 -0
- package/dist/hooks/events/useEventForm.test.js +107 -0
- package/dist/hooks/index.d.ts +3 -1
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/posts/useFeedPostActions.js +4 -15
- package/dist/hooks/posts/usePostReactionToggle.d.ts +14 -0
- package/dist/hooks/posts/usePostReactionToggle.js +46 -0
- package/dist/hooks/resources/useResourceLibrary.d.ts +8 -1
- package/dist/hooks/resources/useResourceLibrary.js +5 -5
- package/dist/hooks/settings/useAccessTokens.d.ts +3 -3
- package/dist/hooks/settings/useAccessTokens.js +1 -0
- package/dist/lib/downloadUrl.d.ts +6 -0
- package/dist/lib/downloadUrl.js +6 -0
- package/dist/navigation/menuItems.js +4 -4
- package/dist/pages/Explore.js +1 -1
- package/dist/pages/admin/ApiKeys.js +3 -3
- package/dist/pages/admin/ConfigEditor.js +1 -1
- package/dist/pages/admin/ConfigurationCommunityFeed.js +2 -2
- package/dist/pages/admin/ConfigurationCommunityLanguage.js +2 -2
- package/dist/pages/admin/ConfigurationCommunityTimezone.js +2 -2
- package/dist/pages/admin/ConfigurationEmail.js +2 -2
- package/dist/pages/admin/ConfigurationI18n.js +1 -1
- package/dist/pages/admin/ConfigurationSso.js +1 -1
- package/dist/pages/admin/ConfigurationSsoNew.js +1 -1
- package/dist/pages/admin/Dashboard.js +1 -1
- package/dist/pages/admin/Db.js +4 -4
- package/dist/pages/admin/DiagnosticsEmail.js +3 -3
- package/dist/pages/admin/DiagnosticsJob.js +2 -2
- package/dist/pages/admin/DiagnosticsLivekit.js +1 -1
- package/dist/pages/admin/DiagnosticsLogs.js +2 -2
- package/dist/pages/admin/DiagnosticsPerformance.js +1 -1
- package/dist/pages/admin/GroupMembers.js +5 -5
- package/dist/pages/admin/Groups.js +2 -2
- package/dist/pages/admin/Invites.js +3 -3
- package/dist/pages/admin/Media.js +2 -2
- package/dist/pages/admin/MemberDetail.js +7 -7
- package/dist/pages/admin/Members.js +2 -2
- package/dist/pages/admin/analytics/AnalyticsLayout.js +3 -1
- package/dist/pages/admin/analytics/Content.js +1 -1
- package/dist/pages/admin/analytics/Engagement.js +1 -1
- package/dist/pages/admin/analytics/Groups.js +1 -1
- package/dist/pages/admin/analytics/ReportSettings.js +1 -1
- package/dist/pages/admin/community/CommunityAccess.js +1 -1
- package/dist/pages/admin/community/CommunityFavicons.js +1 -1
- package/dist/pages/admin/community/CommunityForbiddenUsernames.js +2 -2
- package/dist/pages/admin/community/CommunityInfo.js +1 -1
- package/dist/pages/admin/community/CommunityLinks.js +1 -1
- package/dist/pages/admin/community/CommunityMarkdownPage.js +1 -1
- package/dist/pages/admin/community/CommunityProfileFields.js +2 -2
- package/dist/pages/admin/community/CommunityRoles.js +7 -7
- package/dist/pages/admin/community/CommunityTheme.js +3 -2
- package/dist/pages/admin/community/ThemeColorPreview.d.ts +8 -0
- package/dist/pages/admin/community/ThemeColorPreview.js +46 -0
- package/dist/pages/admin/community/ThemeColorPreview.test.d.ts +1 -0
- package/dist/pages/admin/community/ThemeColorPreview.test.js +49 -0
- package/dist/pages/admin/components/AdminGroupCard.js +1 -1
- package/dist/pages/admin/components/EditInviteLinkModal.js +1 -1
- package/dist/pages/admin/components/InviteWithEmailModal.js +2 -2
- package/dist/pages/admin/components/InviteWithLinkModal.js +3 -3
- package/dist/pages/admin/components/ProfileRowActions.js +4 -4
- package/dist/pages/admin/components/RestoreBackupModal.js +2 -2
- package/dist/pages/admin/components/RestoreTestBackupModal.js +1 -1
- package/dist/pages/auth/Login.js +1 -1
- package/dist/pages/auth/Register.js +3 -3
- package/dist/pages/auth/RequestResetPassword.js +1 -1
- package/dist/pages/conversations/Info.js +1 -1
- package/dist/pages/conversations/Show.js +45 -15
- package/dist/pages/events/Index.js +1 -1
- package/dist/pages/feeds/Bookmarks.js +1 -1
- package/dist/pages/groups/EditInfo.js +1 -1
- package/dist/pages/groups/EditRoles.js +1 -1
- package/dist/pages/groups/Index.js +1 -1
- package/dist/pages/groups/Members.js +2 -2
- package/dist/pages/groups/New.js +1 -1
- package/dist/pages/groups/Show.js +2 -2
- package/dist/pages/settings/AccessTokens.js +4 -4
- package/dist/pages/settings/Account.js +1 -1
- package/dist/pages/settings/Feed.js +1 -1
- package/dist/pages/settings/Language.js +1 -1
- package/dist/pages/settings/PublicProfile.js +3 -3
- package/dist/pages/settings/PushEnabledDevices.js +1 -1
- package/dist/pages/settings/Theme.js +1 -1
- package/dist/pages/settings/Timezone.js +1 -1
- package/dist/react-native.d.ts +1 -1
- package/dist/react-native.js +1 -1
- package/package.json +9 -9
- package/src/components/RelationCapabilitiesEditor.tsx +3 -3
- package/src/components/RoleCapabilityMatrix.tsx +2 -2
- package/src/components/accounts/SignUpLoginModal.tsx +1 -1
- package/src/components/configuration/ConfigurationList.tsx +2 -2
- package/src/components/conversations/ConversationMessageBubble.tsx +24 -0
- package/src/components/conversations/CreateNewConversation.tsx +114 -78
- package/src/components/form/ImageEditModal.tsx +2 -2
- package/src/components/groups/ChangeGroupRolesModal.tsx +1 -1
- package/src/components/groups/ConfirmGroupExitModal.tsx +1 -1
- package/src/components/groups/ConfirmMemberRemovalModal.tsx +2 -2
- package/src/components/groups/DeleteGroupModal.tsx +2 -2
- package/src/components/groups/GroupForm.tsx +2 -2
- package/src/components/groups/GroupNotificationSettingsModal.tsx +2 -2
- package/src/components/jams/JamCallParticipant.tsx +4 -3
- package/src/components/jams/JamGuestForm.tsx +1 -1
- package/src/components/jams/jamEventActions.ts +21 -0
- package/src/components/navigation/ContentHeader.tsx +3 -3
- package/src/components/navigation/FooterMobile.tsx +1 -1
- package/src/components/navigation/SideBar.tsx +3 -3
- package/src/components/post/FullPostLayout.tsx +1 -1
- package/src/components/post/index.ts +1 -0
- package/src/components/post/pieces/EventRsvpList.tsx +1 -1
- package/src/components/post/pieces/EventRsvpScopeDialog.tsx +2 -2
- package/src/components/post/pieces/EventWaitlistJoinDialog.tsx +1 -1
- package/src/components/post/pieces/GalleryModal.tsx +1 -1
- package/src/components/post/pieces/modals/DeletePostModal.tsx +2 -2
- package/src/components/post/post-form/ComposeAttachments.tsx +10 -0
- package/src/components/post/post-form/DescriptionEditModal.tsx +1 -1
- package/src/components/post/post-form/EditPostModal.tsx +2 -2
- package/src/components/post/post-form/EventForm.tsx +8 -26
- package/src/components/post/post-form/PostAudienceSelector.tsx +2 -2
- package/src/components/post/post-form/ReplyModal.tsx +1 -1
- package/src/components/post/types/event/FullEvent.tsx +3 -3
- package/src/components/post/types/resource/FullResource.tsx +2 -1
- package/src/components/preview-link/RemotePreviewLink.tsx +92 -25
- package/src/components/profile/ProfileActivitySummary.tsx +4 -4
- package/src/components/profile/ProfileBadge.tsx +1 -1
- package/src/components/profile/ProfilePageAction.tsx +1 -1
- package/src/components/profile/ProfilePostsAndReplies.tsx +2 -2
- package/src/components/profile/ProfileSelector.tsx +1 -1
- package/src/components/profile/ReportProfileOrPostModal.tsx +4 -2
- package/src/components/resources/CategoryPathPicker.tsx +1 -1
- package/src/components/resources/ResourceCard.tsx +5 -3
- package/src/components/resources/ResourceLibrary.tsx +79 -4
- package/src/contexts/router/index.tsx +40 -1
- package/src/hooks/conversations/dmMessage.ts +26 -0
- package/src/hooks/conversations/useCreateConversation.ts +7 -0
- package/src/hooks/events/useEventForm.ts +32 -1
- package/src/hooks/index.ts +10 -1
- package/src/hooks/posts/useFeedPostActions.ts +4 -18
- package/src/hooks/posts/usePostReactionToggle.ts +60 -0
- package/src/hooks/resources/useResourceLibrary.ts +20 -5
- package/src/hooks/settings/useAccessTokens.ts +1 -0
- package/src/lib/downloadUrl.ts +7 -0
- package/src/navigation/menuItems.ts +4 -4
- package/src/pages/Explore.tsx +4 -4
- package/src/pages/admin/ApiKeys.tsx +4 -4
- package/src/pages/admin/ConfigEditor.tsx +1 -1
- package/src/pages/admin/ConfigurationCommunityFeed.tsx +2 -2
- package/src/pages/admin/ConfigurationCommunityLanguage.tsx +2 -2
- package/src/pages/admin/ConfigurationCommunityTimezone.tsx +2 -2
- package/src/pages/admin/ConfigurationEmail.tsx +2 -2
- package/src/pages/admin/ConfigurationI18n.tsx +1 -1
- package/src/pages/admin/ConfigurationSso.tsx +1 -1
- package/src/pages/admin/ConfigurationSsoNew.tsx +1 -1
- package/src/pages/admin/Dashboard.tsx +1 -1
- package/src/pages/admin/Db.tsx +6 -6
- package/src/pages/admin/DiagnosticsEmail.tsx +5 -5
- package/src/pages/admin/DiagnosticsJob.tsx +2 -2
- package/src/pages/admin/DiagnosticsLivekit.tsx +3 -3
- package/src/pages/admin/DiagnosticsLogs.tsx +4 -4
- package/src/pages/admin/DiagnosticsPerformance.tsx +1 -1
- package/src/pages/admin/GroupMembers.tsx +6 -6
- package/src/pages/admin/Groups.tsx +2 -2
- package/src/pages/admin/Invites.tsx +4 -4
- package/src/pages/admin/Media.tsx +2 -2
- package/src/pages/admin/MemberDetail.tsx +7 -7
- package/src/pages/admin/Members.tsx +2 -2
- package/src/pages/admin/analytics/AnalyticsLayout.tsx +5 -1
- package/src/pages/admin/analytics/Content.tsx +1 -1
- package/src/pages/admin/analytics/Engagement.tsx +1 -1
- package/src/pages/admin/analytics/Groups.tsx +1 -1
- package/src/pages/admin/analytics/ReportSettings.tsx +1 -1
- package/src/pages/admin/community/CommunityAccess.tsx +1 -1
- package/src/pages/admin/community/CommunityFavicons.tsx +1 -1
- package/src/pages/admin/community/CommunityForbiddenUsernames.tsx +2 -2
- package/src/pages/admin/community/CommunityInfo.tsx +1 -1
- package/src/pages/admin/community/CommunityLinks.tsx +1 -1
- package/src/pages/admin/community/CommunityMarkdownPage.tsx +1 -1
- package/src/pages/admin/community/CommunityProfileFields.tsx +5 -5
- package/src/pages/admin/community/CommunityRoles.tsx +9 -9
- package/src/pages/admin/community/CommunityTheme.tsx +26 -23
- package/src/pages/admin/community/ThemeColorPreview.tsx +141 -0
- package/src/pages/admin/components/AdminGroupCard.tsx +2 -2
- package/src/pages/admin/components/EditInviteLinkModal.tsx +2 -2
- package/src/pages/admin/components/InviteWithEmailModal.tsx +2 -2
- package/src/pages/admin/components/InviteWithLinkModal.tsx +3 -3
- package/src/pages/admin/components/ProfileRowActions.tsx +6 -6
- package/src/pages/admin/components/RestoreBackupModal.tsx +2 -2
- package/src/pages/admin/components/RestoreTestBackupModal.tsx +1 -1
- package/src/pages/auth/Login.tsx +1 -1
- package/src/pages/auth/Register.tsx +3 -3
- package/src/pages/auth/RequestResetPassword.tsx +1 -1
- package/src/pages/conversations/Info.tsx +1 -1
- package/src/pages/conversations/Show.tsx +94 -33
- package/src/pages/events/Index.tsx +1 -1
- package/src/pages/feeds/Bookmarks.tsx +3 -1
- package/src/pages/groups/EditInfo.tsx +1 -1
- package/src/pages/groups/EditRoles.tsx +1 -1
- package/src/pages/groups/Index.tsx +1 -1
- package/src/pages/groups/Members.tsx +2 -2
- package/src/pages/groups/New.tsx +1 -1
- package/src/pages/groups/Show.tsx +4 -4
- package/src/pages/settings/AccessTokens.tsx +4 -4
- package/src/pages/settings/Account.tsx +1 -1
- package/src/pages/settings/Feed.tsx +1 -1
- package/src/pages/settings/Language.tsx +1 -1
- package/src/pages/settings/PublicProfile.tsx +3 -3
- package/src/pages/settings/PushEnabledDevices.tsx +3 -6
- package/src/pages/settings/Theme.tsx +1 -1
- package/src/pages/settings/Timezone.tsx +1 -1
- package/src/react-native.ts +1 -0
|
@@ -124,13 +124,13 @@ export function RelationCapabilitiesEditor() {
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
if (configQuery.isLoading || !draft) {
|
|
127
|
-
return (_jsx("div", { className: "text-muted-foreground flex h-32 items-center justify-center text-sm", children: t('common.
|
|
127
|
+
return (_jsx("div", { className: "text-muted-foreground flex h-32 items-center justify-center text-sm", children: t('common.states.loading', { defaultValue: 'Loading…' }) }));
|
|
128
128
|
}
|
|
129
129
|
return (_jsxs("div", { className: "flex flex-col gap-6", children: [relationObjects.map((obj) => (_jsxs("div", { className: "space-y-2", children: [_jsx("h3", { className: "text-lg font-semibold", children: t(obj.titleI18n) }), _jsx(CapabilityMatrix, { editorKeys: [...obj.editorKeys], columns: objectColumns(obj), value: (draft[obj.key] ?? {}), onChange: (next) => updateObject(obj.key, next), i18nPrefix: "capabilities.relations", stateI18nPrefix: "groups.capabilities.state", everyoneColumn: "none", compact: true, defaultCapabilities: (defaults?.[obj.key] ?? {}) }), _jsx("p", { className: "text-muted-foreground text-xs", children: t(obj.descriptionI18n, {
|
|
130
130
|
defaultValue: 'Choose what each relationship can do for this object type.',
|
|
131
|
-
}) })] }, obj.key))), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Button, { variant: "default", action: handleSave, disabled: saving || !canUpdateConfig || !diffPatch, loadingContent: t('common.saving', { defaultValue: 'Saving…' }), title: t('common.save', { defaultValue: 'Save' }), children: saving
|
|
131
|
+
}) })] }, obj.key))), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Button, { variant: "default", action: handleSave, disabled: saving || !canUpdateConfig || !diffPatch, loadingContent: t('common.saving', { defaultValue: 'Saving…' }), title: t('common.actions.save', { defaultValue: 'Save' }), children: saving
|
|
132
132
|
? t('common.saving', { defaultValue: 'Saving…' })
|
|
133
|
-
: t('common.save', { defaultValue: 'Save' }) }), canUpdateConfig && diffPatch ? (_jsx(Button, { variant: "outline", action: handleRestoreDefaults, title: t('common.restoreDefaults', {
|
|
133
|
+
: t('common.actions.save', { defaultValue: 'Save' }) }), canUpdateConfig && diffPatch ? (_jsx(Button, { variant: "outline", action: handleRestoreDefaults, title: t('common.restoreDefaults', {
|
|
134
134
|
defaultValue: 'Restore defaults',
|
|
135
135
|
}), children: t('common.restoreDefaults', { defaultValue: 'Restore defaults' }) })) : null, !canUpdateConfig ? (_jsx("span", { className: "text-muted-foreground text-xs", children: t('capabilities.relations.noUpdateCapability', {
|
|
136
136
|
defaultValue: 'You can view but not edit relationship capabilities without core-config-update.',
|
|
@@ -90,9 +90,9 @@ export function RoleCapabilityMatrix({ roles }) {
|
|
|
90
90
|
defaultValue: 'Filter roles…',
|
|
91
91
|
}), onChange: (e) => setFilter(e.target.value) })] }), visibleCount === 0 ? (_jsx("p", { className: "text-muted-foreground px-1 text-sm", children: t('capabilities.roles.noRolesMatch', {
|
|
92
92
|
defaultValue: 'No roles match the filter.',
|
|
93
|
-
}) })) : (_jsx(CapabilityMatrix, { editorKeys: [...roleCapabilityEditorKeys], columns: columns, value: draft, onChange: setDraft, i18nPrefix: "capabilities.roles", stateI18nPrefix: "groups.capabilities.state", everyoneColumn: undefined, defaultCapabilities: loadedDraft })), _jsxs("div", { className: "flex items-center gap-3 px-1", children: [_jsx(Button, { variant: "default", action: handleSave, disabled: saving || !canUpdateRoles || changedRoleIds.length === 0, loadingContent: t('common.saving', { defaultValue: 'Saving…' }), title: t('common.save', { defaultValue: 'Save' }), children: saving
|
|
93
|
+
}) })) : (_jsx(CapabilityMatrix, { editorKeys: [...roleCapabilityEditorKeys], columns: columns, value: draft, onChange: setDraft, i18nPrefix: "capabilities.roles", stateI18nPrefix: "groups.capabilities.state", everyoneColumn: undefined, defaultCapabilities: loadedDraft })), _jsxs("div", { className: "flex items-center gap-3 px-1", children: [_jsx(Button, { variant: "default", action: handleSave, disabled: saving || !canUpdateRoles || changedRoleIds.length === 0, loadingContent: t('common.saving', { defaultValue: 'Saving…' }), title: t('common.actions.save', { defaultValue: 'Save' }), children: saving
|
|
94
94
|
? t('common.saving', { defaultValue: 'Saving…' })
|
|
95
|
-
: t('common.save', { defaultValue: 'Save' }) }), canUpdateRoles && deviatesFromDefaults ? (_jsx(Button, { variant: "outline", action: () => setDraft(roleDefaults), title: t('common.restoreDefaults', {
|
|
95
|
+
: t('common.actions.save', { defaultValue: 'Save' }) }), canUpdateRoles && deviatesFromDefaults ? (_jsx(Button, { variant: "outline", action: () => setDraft(roleDefaults), title: t('common.restoreDefaults', {
|
|
96
96
|
defaultValue: 'Restore defaults',
|
|
97
97
|
}), children: t('common.restoreDefaults', { defaultValue: 'Restore defaults' }) })) : null, !canUpdateRoles ? (_jsx("span", { className: "text-muted-foreground text-xs", children: t('capabilities.roles.noUpdateCapability', {
|
|
98
98
|
defaultValue: 'You can view but not edit role capabilities without core-roles-update.',
|
|
@@ -12,7 +12,7 @@ export function SignUpLoginModal({ onClose }) {
|
|
|
12
12
|
const router = useRouter();
|
|
13
13
|
return (_jsx(Dialog, { open: true, onOpenChange: (open) => !open && onClose(), children: _jsxs(DialogContent, { className: "max-w-md", showCloseButton: false, children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: t('accounts.login.title', { defaultValue: 'Login' }) }), _jsx(DialogDescription, { children: t('accounts.login.description', {
|
|
14
14
|
defaultValue: 'Login to your account',
|
|
15
|
-
}) })] }), _jsx(DialogActions, { cancelLabel: t('common.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: t('accounts.login.loginButton', {
|
|
15
|
+
}) })] }), _jsx(DialogActions, { cancelLabel: t('common.actions.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: t('accounts.login.loginButton', {
|
|
16
16
|
defaultValue: 'Log In',
|
|
17
17
|
}), onAction: () => {
|
|
18
18
|
router.navigate({ type: 'auth', mode: 'login' });
|
|
@@ -27,7 +27,7 @@ export function ConfigurationList({ schema, config, path = [], value: valueProp,
|
|
|
27
27
|
const next = [...value];
|
|
28
28
|
next[index] = entry;
|
|
29
29
|
setAndNotify(next);
|
|
30
|
-
}, disabled: disabled })), _jsx("button", { type: "button", title: t('common.
|
|
30
|
+
}, disabled: disabled })), _jsx("button", { type: "button", title: t('common.actions.remove', {
|
|
31
31
|
defaultValue: 'Remove',
|
|
32
|
-
}), onClick: () => setAndNotify(value.toSpliced(index, 1)), children: _jsx(Minus, { className: "h-4 w-4" }) })] }, index))), _jsx("button", { type: "button", title: t('common.
|
|
32
|
+
}), onClick: () => setAndNotify(value.toSpliced(index, 1)), children: _jsx(Minus, { className: "h-4 w-4" }) })] }, index))), _jsx("button", { type: "button", title: t('common.actions.add', { defaultValue: 'Add' }), onClick: () => setAndNotify([...value, structuredClone(defaults)]), children: _jsx(Plus, { className: "h-4 w-4" }) })] }));
|
|
33
33
|
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ThumbsUp } from 'lucide-react';
|
|
3
|
+
import { Button } from '@openpeepshq/react-ui';
|
|
4
|
+
import { useT } from '../../i18n/index.js';
|
|
5
|
+
import { usePostReactionToggle } from '../../hooks/posts/usePostReactionToggle.js';
|
|
2
6
|
import { useCurrentProfile } from '../layout/IdentityContext.js';
|
|
3
7
|
import { FeedPostContent } from '../post/FeedPostContent.js';
|
|
4
8
|
import { UnreadPostIndicator } from '../post/pieces/UnreadPostIndicator.js';
|
|
5
9
|
export function ConversationMessageBubble({ message, unread = false, }) {
|
|
6
10
|
const me = useCurrentProfile();
|
|
11
|
+
const t = useT();
|
|
7
12
|
const mine = message.profile.id === me?.id;
|
|
8
|
-
|
|
13
|
+
const { iReacted, canReact, toggleReaction } = usePostReactionToggle(message);
|
|
14
|
+
const reactionCount = message.reactions?.length ?? 0;
|
|
15
|
+
return (_jsxs("div", { className: `mt-4 flex w-full items-center gap-2 ${mine ? 'justify-end' : 'justify-start'}`, children: [_jsxs("div", { className: `w-[80%] rounded-t-xl p-3 ${mine ? 'bg-primary/10 rounded-bl-xl' : 'bg-surface-2 rounded-br-xl'}`, children: [_jsx(FeedPostContent, { post: message }), me && canReact ? (_jsx("div", { className: mine ? 'mt-2 flex justify-end' : 'mt-2 flex', children: _jsxs(Button, { variant: "unstyled", className: `items-center gap-1 rounded-button p-1 text-xs ${iReacted ? 'text-primary' : 'text-muted-foreground'}`, title: t('posts.actions.react', { defaultValue: 'React' }), "aria-label": t('posts.actions.react'), action: toggleReaction, spinnerOnlyOnLoading: true, children: [_jsx(ThumbsUp, { className: "h-4 w-4" }), reactionCount > 0 ? reactionCount : null] }) })) : null] }), !mine ? (_jsx(UnreadPostIndicator, { show: unread, className: "relative inset-auto shrink-0 translate-y-0" })) : null] }));
|
|
9
16
|
}
|
|
@@ -1,32 +1,49 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Image } from 'lucide-react';
|
|
2
3
|
import { blockedPairIds } from '@openpeepshq/common/lib';
|
|
3
4
|
import { Button, Dialog, DialogActions, DialogContent, DialogFooter, DialogHeader, DialogTitle, } from '@openpeepshq/react-ui';
|
|
4
5
|
import { useT } from '../../i18n/index.js';
|
|
5
6
|
import { useCreateConversation } from '../../hooks/conversations/useCreateConversation.js';
|
|
6
|
-
import {
|
|
7
|
+
import { canSendDmMessage, DM_MAX_ATTACHMENTS, } from '../../hooks/conversations/dmMessage.js';
|
|
8
|
+
import { OpenpeepsMarkdownInput, useComposeAttachments } from '../post/index.js';
|
|
7
9
|
import { ProfilesInput } from '../profile/index.js';
|
|
8
10
|
const MAX_MESSAGE_LENGTH = 500;
|
|
9
11
|
export const CreateNewConversation = ({ profiles: initialProfiles = [], message: initialMessage = '', skipProfileSelection = false, onClose, }) => {
|
|
10
12
|
const t = useT();
|
|
11
|
-
const { me, step, setStep, selectedProfiles, setSelectedProfiles, message, setMessage, submitting, error, send, } = useCreateConversation({
|
|
13
|
+
const { me, step, setStep, selectedProfiles, setSelectedProfiles, message, setMessage, attachments, setAttachments, submitting, error, send, } = useCreateConversation({
|
|
12
14
|
profiles: initialProfiles,
|
|
13
15
|
message: initialMessage,
|
|
14
16
|
skipProfileSelection,
|
|
15
17
|
onClose,
|
|
16
18
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
const compose = useComposeAttachments({
|
|
20
|
+
attachments,
|
|
21
|
+
onChange: setAttachments,
|
|
22
|
+
});
|
|
23
|
+
const canSend = canSendDmMessage({
|
|
24
|
+
sending: submitting,
|
|
25
|
+
uploadsPending: compose.pending,
|
|
26
|
+
text: message,
|
|
27
|
+
attachments,
|
|
28
|
+
});
|
|
29
|
+
const addImageLabel = t('posts.form.addImage', {
|
|
30
|
+
defaultValue: 'Add Media',
|
|
31
|
+
});
|
|
32
|
+
return (_jsxs(_Fragment, { children: [_jsx(Dialog, { open: true, onOpenChange: (open) => !open && onClose(), children: _jsx(DialogContent, { className: "flex max-h-[85vh] max-w-lg flex-col overflow-hidden", children: step === 1 ? (_jsxs(_Fragment, { children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: t('conversations.createNew.title', {
|
|
33
|
+
defaultValue: 'New message',
|
|
34
|
+
}) }) }), _jsx("div", { className: "min-h-0 flex-1 space-y-2 overflow-y-auto", children: _jsx(ProfilesInput, { value: selectedProfiles, onChange: setSelectedProfiles, banlist: me ? [me.id, ...blockedPairIds(me)] : [], placeholder: t('conversations.createNew.searchPlaceholder', {
|
|
35
|
+
defaultValue: 'Search members…',
|
|
36
|
+
}), title: t('conversations.createNew.title', {
|
|
37
|
+
defaultValue: 'New message',
|
|
38
|
+
}) }) }), _jsx(DialogActions, { cancelLabel: t('common.actions.cancel', {
|
|
39
|
+
defaultValue: 'Cancel',
|
|
40
|
+
}), onCancel: onClose, actionLabel: t('common.next', { defaultValue: 'Next' }), onAction: () => setStep(2), disabled: selectedProfiles.length === 0 })] })) : (_jsxs(_Fragment, { children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: t('conversations.createNew.sendMessage', {
|
|
41
|
+
defaultValue: 'Send message',
|
|
42
|
+
}) }) }), _jsxs("div", { className: "min-h-0 flex-1 space-y-2 overflow-y-auto", children: [compose.previews, _jsx(OpenpeepsMarkdownInput, { rows: 5, value: message, onChange: setMessage, maxLength: MAX_MESSAGE_LENGTH, placeholder: t('conversations.createNew.messagePlaceholder', {
|
|
43
|
+
defaultValue: 'Write a message…',
|
|
44
|
+
}) }), _jsx(Button, { compact: true, variant: "ghost", title: addImageLabel, action: compose.openImagePicker, disabled: attachments.length >= DM_MAX_ATTACHMENTS, "data-testid": "conversation-add-image", children: _jsx(Image, { className: "size-5" }) })] }), error ? _jsx("p", { className: "text-error text-sm", children: error }) : null, _jsxs(DialogFooter, { className: "flex-wrap gap-2", children: [!skipProfileSelection ? (_jsx(Button, { variant: "outline", action: () => setStep(1), children: t('common.actions.back', { defaultValue: 'Back' }) })) : (_jsx(Button, { variant: "outline", action: onClose, children: t('common.actions.cancel', { defaultValue: 'Cancel' }) })), _jsx(Button, { variant: "default", disabled: !canSend || selectedProfiles.length === 0, action: send, children: submitting
|
|
45
|
+
? t('common.actions.sending', { defaultValue: 'Sending…' })
|
|
46
|
+
: t('common.actions.send', {
|
|
47
|
+
defaultValue: 'Send',
|
|
48
|
+
}) })] })] })) }) }), compose.inputs] }));
|
|
32
49
|
};
|
|
@@ -67,7 +67,7 @@ export function ImageEditModal({ file, previewUrl, open, onClose, onConfirm, sho
|
|
|
67
67
|
defaultValue: 'Crop ratio',
|
|
68
68
|
}) }), _jsx("div", { className: "flex flex-wrap gap-2", children: ASPECT_RATIOS.map((item, index) => (_jsx("button", { type: "button", title: item.label, onClick: () => setAspectIndex(index), children: _jsx(Badge, { status: item.label, variant: aspectIndex === index ? 'default' : 'outline' }) }, item.label))) })] })) : null, showAltInput ? (_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "alt-text", children: t('common.media.altText', { defaultValue: 'Alt text' }) }), _jsx(Textarea, { id: "alt-text", rows: 3, value: description, onChange: (e) => setDescription(e.target.value), placeholder: t('common.media.altTextDescription', {
|
|
69
69
|
defaultValue: 'Describe the image for accessibility',
|
|
70
|
-
}) })] })) : null] })) : null] }), _jsx(DialogActions, { cancelLabel: t('common.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: submitting
|
|
70
|
+
}) })] })) : null] })) : null] }), _jsx(DialogActions, { cancelLabel: t('common.actions.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: submitting
|
|
71
71
|
? t('common.uploading', { defaultValue: 'Uploading…' })
|
|
72
|
-
: t('common.add', { defaultValue: 'Add' }), onAction: confirm, disabled: submitting })] }) }));
|
|
72
|
+
: t('common.actions.add', { defaultValue: 'Add' }), onAction: confirm, disabled: submitting })] }) }));
|
|
73
73
|
}
|
|
@@ -50,7 +50,7 @@ export function ChangeGroupRolesModal({ group, member, onClose, }) {
|
|
|
50
50
|
return (_jsx(Dialog, { open: true, onOpenChange: (open) => !open && onClose(), children: _jsxs(DialogContent, { className: "max-w-sm", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: t('groups.changeRoles.title', { defaultValue: 'Change roles' }) }) }), _jsx("p", { className: "px-1 text-sm", children: t('groups.changeRoles.description', {
|
|
51
51
|
defaultValue: 'Update roles for @{{handle}}',
|
|
52
52
|
handle: member.profile.handle,
|
|
53
|
-
}) }), _jsx("div", { className: "space-y-3 px-1", children: visibleRoles.map((role) => (_jsxs("div", { className: "flex items-center justify-between gap-4", children: [_jsx(Label, { htmlFor: `role-${role}`, classes: "text-base font-medium", children: t(`groups.roles.${role}`, { defaultValue: role }) }), _jsx("input", { id: `role-${role}`, type: "checkbox", checked: roles.has(role), onChange: (e) => toggleRole(role, e.target.checked), className: "size-4" })] }, role))) }), error ? (_jsx("p", { className: "border-error/40 text-error rounded-md border p-2 text-sm", children: error })) : null, _jsx(DialogActions, { cancelLabel: t('common.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: t('groups.changeRoles.confirm', {
|
|
53
|
+
}) }), _jsx("div", { className: "space-y-3 px-1", children: visibleRoles.map((role) => (_jsxs("div", { className: "flex items-center justify-between gap-4", children: [_jsx(Label, { htmlFor: `role-${role}`, classes: "text-base font-medium", children: t(`groups.roles.${role}`, { defaultValue: role }) }), _jsx("input", { id: `role-${role}`, type: "checkbox", checked: roles.has(role), onChange: (e) => toggleRole(role, e.target.checked), className: "size-4" })] }, role))) }), error ? (_jsx("p", { className: "border-error/40 text-error rounded-md border p-2 text-sm", children: error })) : null, _jsx(DialogActions, { cancelLabel: t('common.actions.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: t('groups.changeRoles.confirm', {
|
|
54
54
|
defaultValue: 'Save roles',
|
|
55
55
|
}), onAction: submit, disabled: submitting })] }) }));
|
|
56
56
|
}
|
|
@@ -31,7 +31,7 @@ export function ConfirmGroupExitModal({ group, onClose, }) {
|
|
|
31
31
|
}) }) }), _jsx("p", { className: "px-1 text-sm", children: t('groups.modals.confirmExit.body', {
|
|
32
32
|
defaultValue: 'Leave @{{handle}}?',
|
|
33
33
|
handle: group.handle,
|
|
34
|
-
}) }), error ? (_jsx("p", { className: "border-error/40 text-error rounded-md border p-2 text-sm", children: error })) : null, _jsx(DialogActions, { cancelLabel: t('common.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: t('groups.modals.confirmExit.leave', {
|
|
34
|
+
}) }), error ? (_jsx("p", { className: "border-error/40 text-error rounded-md border p-2 text-sm", children: error })) : null, _jsx(DialogActions, { cancelLabel: t('common.actions.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: t('groups.modals.confirmExit.leave', {
|
|
35
35
|
defaultValue: 'Leave',
|
|
36
36
|
}), onAction: submit, actionVariant: "destructive", disabled: submitting })] }) }));
|
|
37
37
|
}
|
|
@@ -29,7 +29,7 @@ export function ConfirmMemberRemovalModal({ group, profile, onClose, }) {
|
|
|
29
29
|
return (_jsx(Dialog, { open: true, onOpenChange: (open) => !open && onClose(), children: _jsxs(DialogContent, { className: "max-w-sm", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: t('groups.removeMember.title', { defaultValue: 'Remove member' }) }) }), _jsx("p", { className: "px-1 text-sm", children: t('groups.removeMember.description', {
|
|
30
30
|
defaultValue: 'Remove @{{handle}} from this group?',
|
|
31
31
|
handle: profile.handle,
|
|
32
|
-
}) }), error ? (_jsx("p", { className: "border-error/40 text-error rounded-md border p-2 text-sm", children: error })) : null, _jsx(DialogActions, { cancelLabel: t('common.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: t('
|
|
32
|
+
}) }), error ? (_jsx("p", { className: "border-error/40 text-error rounded-md border p-2 text-sm", children: error })) : null, _jsx(DialogActions, { cancelLabel: t('common.actions.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: t('common.actions.remove', {
|
|
33
33
|
defaultValue: 'Remove',
|
|
34
34
|
}), onAction: submit, actionVariant: "destructive", disabled: submitting })] }) }));
|
|
35
35
|
}
|
|
@@ -30,7 +30,7 @@ export function DeleteGroupModal({ group, onClose }) {
|
|
|
30
30
|
return (_jsx(Dialog, { open: true, onOpenChange: (open) => !open && onClose(), children: _jsxs(DialogContent, { className: "max-w-sm", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: t('groups.delete.title', { defaultValue: 'Delete group' }) }) }), _jsx("p", { className: "px-1 text-sm", children: t('groups.delete.description', {
|
|
31
31
|
defaultValue: 'Delete {{groupName}} permanently?',
|
|
32
32
|
groupName: groupName(group),
|
|
33
|
-
}) }), error ? (_jsx("p", { className: "border-error/40 text-error rounded-md border p-2 text-sm", children: error })) : null, _jsx(DialogActions, { cancelLabel: t('
|
|
33
|
+
}) }), error ? (_jsx("p", { className: "border-error/40 text-error rounded-md border p-2 text-sm", children: error })) : null, _jsx(DialogActions, { cancelLabel: t('common.actions.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: t('common.actions.delete', {
|
|
34
34
|
defaultValue: 'Delete',
|
|
35
35
|
}), onAction: submit, actionVariant: "destructive", disabled: submitting })] }) }));
|
|
36
36
|
}
|
|
@@ -10,9 +10,9 @@ export function GroupForm({ groupData, onChange, fieldErrors, isEdit = false, se
|
|
|
10
10
|
const showRoles = sections.includes('roles');
|
|
11
11
|
const { showCapabilityMatrix, templateSelection, templateOptions, templateDescription, onTemplateChange, } = useGroupTemplateSelection({ groupData, onChange, isEdit });
|
|
12
12
|
const patch = (partial) => onChange({ ...groupData, ...partial });
|
|
13
|
-
return (_jsxs("div", { className: "space-y-4", children: [showInfo ? (_jsxs(_Fragment, { children: [_jsx(HeaderAvatarInput, { header: groupData.header ?? undefined, avatar: groupData.avatar ?? undefined, onHeaderChange: (header) => patch({ header }), onAvatarChange: (avatar) => patch({ avatar }) }), _jsxs("div", { className: "space-y-2 px-1", children: [_jsx(Label, { htmlFor: "displayName", children: t('groups.form.groupName', { defaultValue: 'Group name' }) }), _jsx(Input, { id: "displayName", value: groupData.displayName ?? '', error: Boolean(fieldErrors?.displayName), "aria-invalid": Boolean(fieldErrors?.displayName), "aria-describedby": fieldErrors?.displayName ? 'displayName-error' : undefined, onChange: (e) => patch({ displayName: e.target.value }), "data-testid": "groups-name-input" }), fieldErrors?.displayName ? (_jsx("p", { id: "displayName-error", role: "alert", className: "text-error text-sm", "data-testid": "groups-name-error", children: fieldErrors.displayName })) : null] }), !isEdit ? (_jsxs("div", { className: "space-y-2 px-1", children: [_jsx(Label, { htmlFor: "handle", children: t('
|
|
13
|
+
return (_jsxs("div", { className: "space-y-4", children: [showInfo ? (_jsxs(_Fragment, { children: [_jsx(HeaderAvatarInput, { header: groupData.header ?? undefined, avatar: groupData.avatar ?? undefined, onHeaderChange: (header) => patch({ header }), onAvatarChange: (avatar) => patch({ avatar }) }), _jsxs("div", { className: "space-y-2 px-1", children: [_jsx(Label, { htmlFor: "displayName", children: t('groups.form.groupName', { defaultValue: 'Group name' }) }), _jsx(Input, { id: "displayName", value: groupData.displayName ?? '', error: Boolean(fieldErrors?.displayName), "aria-invalid": Boolean(fieldErrors?.displayName), "aria-describedby": fieldErrors?.displayName ? 'displayName-error' : undefined, onChange: (e) => patch({ displayName: e.target.value }), "data-testid": "groups-name-input" }), fieldErrors?.displayName ? (_jsx("p", { id: "displayName-error", role: "alert", className: "text-error text-sm", "data-testid": "groups-name-error", children: fieldErrors.displayName })) : null] }), !isEdit ? (_jsxs("div", { className: "space-y-2 px-1", children: [_jsx(Label, { htmlFor: "handle", children: t('common.labels.handle', { defaultValue: 'Handle' }) }), _jsx(Input, { id: "handle", value: groupData.handle ?? '', error: Boolean(fieldErrors?.handle), "aria-invalid": Boolean(fieldErrors?.handle), "aria-describedby": fieldErrors?.handle ? 'handle-error' : undefined, placeholder: t('groups.handle.placeholder', {
|
|
14
14
|
defaultValue: 'my_group',
|
|
15
|
-
}), onChange: (e) => patch({ handle: e.target.value }), "data-testid": "groups-handle-input" }), fieldErrors?.handle ? (_jsx("p", { id: "handle-error", role: "alert", className: "text-error text-sm", "data-testid": "groups-handle-error", children: fieldErrors.handle })) : null] })) : null, _jsxs("div", { className: "space-y-2 px-1", children: [_jsx(Label, { htmlFor: "description", children: t('
|
|
15
|
+
}), onChange: (e) => patch({ handle: e.target.value }), "data-testid": "groups-handle-input" }), fieldErrors?.handle ? (_jsx("p", { id: "handle-error", role: "alert", className: "text-error text-sm", "data-testid": "groups-handle-error", children: fieldErrors.handle })) : null] })) : null, _jsxs("div", { className: "space-y-2 px-1", children: [_jsx(Label, { htmlFor: "description", children: t('common.labels.description', { defaultValue: 'Description' }) }), _jsx(Textarea, { id: "description", rows: 4, value: groupData.description ?? '', placeholder: t('groups.description.placeholder', {
|
|
16
16
|
defaultValue: '',
|
|
17
17
|
}), onChange: (e) => patch({ description: e.target.value }), "data-testid": "groups-description-input" })] }), _jsxs("div", { className: "space-y-2 px-1", children: [_jsx(Label, { htmlFor: "rules", children: t('groups.rules.title', { defaultValue: 'Rules' }) }), _jsx(Textarea, { id: "rules", rows: 4, value: groupData.rules ?? '', placeholder: t('groups.rules.placeholder', { defaultValue: '' }), onChange: (e) => patch({ rules: e.target.value }), "data-testid": "groups-rules-input" })] })] })) : null, showRoles ? (_jsxs(_Fragment, { children: [_jsx(RadioSelect, { title: t('groups.templates.title', {
|
|
18
18
|
defaultValue: 'Group type',
|
|
@@ -43,9 +43,9 @@ export function GroupNotificationSettingsModal({ group, onClose, }) {
|
|
|
43
43
|
defaultValue: optionDescriptionDefault[option],
|
|
44
44
|
}) })] })] }, option))) })) : loadFailed ? (_jsx("p", { className: "text-error px-1 text-sm", children: t('groups.modals.manageNotifications.loadError', {
|
|
45
45
|
defaultValue: 'Could not load notification settings.',
|
|
46
|
-
}) })) : (_jsx("div", { className: "text-muted-foreground flex h-24 items-center justify-center", children: _jsx(LoadingSpinner, {}) })), error ? (_jsx("p", { className: "border-error/40 text-error rounded-md border p-2 text-sm", children: error })) : null, _jsx(DialogActions, { cancelLabel: t('common.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: saving
|
|
46
|
+
}) })) : (_jsx("div", { className: "text-muted-foreground flex h-24 items-center justify-center", children: _jsx(LoadingSpinner, {}) })), error ? (_jsx("p", { className: "border-error/40 text-error rounded-md border p-2 text-sm", children: error })) : null, _jsx(DialogActions, { cancelLabel: t('common.actions.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: saving
|
|
47
47
|
? t('common.saving', { defaultValue: 'Saving…' })
|
|
48
|
-
: t('common.save', { defaultValue: 'Save' }), onAction: onSave, disabled: saving || !ready })] }) }));
|
|
48
|
+
: t('common.actions.save', { defaultValue: 'Save' }), onAction: onSave, disabled: saving || !ready })] }) }));
|
|
49
49
|
}
|
|
50
50
|
export function GroupNotificationButton({ group }) {
|
|
51
51
|
const t = useT();
|
|
@@ -11,7 +11,7 @@ import { Avatar } from '../profile/index.js';
|
|
|
11
11
|
import { JamAnimatedEmoji } from './JamAnimatedEmoji.js';
|
|
12
12
|
import { useJamContext } from './JamContext.js';
|
|
13
13
|
import { useJamEventsContext } from './JamEventsContext.js';
|
|
14
|
-
import {
|
|
14
|
+
import { participantTileProfile } from './jamEventActions.js';
|
|
15
15
|
import { useConnectionLost } from './useParticipantConnection.js';
|
|
16
16
|
import { useRaisedHands } from './useJamHands.js';
|
|
17
17
|
function JamParticipantReactions({ identity, isLocal, }) {
|
|
@@ -64,7 +64,7 @@ function JamParticipantOverlay({ trackRef, compact, spotlighted, onToggleSpotlig
|
|
|
64
64
|
void handRaiseSound.current?.play().catch(() => { });
|
|
65
65
|
}
|
|
66
66
|
}, [handUp]);
|
|
67
|
-
const profile =
|
|
67
|
+
const profile = participantTileProfile(participant, me);
|
|
68
68
|
const isModerator = jam.moderators.includes(participant.identity);
|
|
69
69
|
const viewerIsModerator = !!me && jam.moderators.includes(me.id);
|
|
70
70
|
const iconSize = compact ? 'size-3' : 'size-3 md:size-4';
|
|
@@ -92,7 +92,8 @@ function JamParticipantOverlay({ trackRef, compact, spotlighted, onToggleSpotlig
|
|
|
92
92
|
export function JamCallParticipant({ trackRef, size, compact = false, onEnlarge, spotlighted = false, onToggleSpotlight, }) {
|
|
93
93
|
const t = useT();
|
|
94
94
|
const participant = trackRef.participant;
|
|
95
|
-
const
|
|
95
|
+
const me = useCurrentProfile();
|
|
96
|
+
const profile = participantTileProfile(participant, me);
|
|
96
97
|
const connectionLost = useConnectionLost(participant);
|
|
97
98
|
const speaking = useIsSpeaking(participant);
|
|
98
99
|
const cameraOn = isTrackReference(trackRef) && !trackRef.publication.isMuted;
|
|
@@ -40,7 +40,7 @@ export function JamGuestForm() {
|
|
|
40
40
|
defaultValue: 'Enter your details to join as a guest.',
|
|
41
41
|
}) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "guest-name", children: t('jams.lobby.guestFullNameLabel', { defaultValue: 'Full name' }) }), _jsx(Input, { id: "guest-name", value: guestData.displayName, onChange: (e) => setGuestData((d) => ({ ...d, displayName: e.target.value })), placeholder: t('jams.lobby.guestFullNamePlaceholder', {
|
|
42
42
|
defaultValue: 'Your name',
|
|
43
|
-
}) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "guest-email", children: t('
|
|
43
|
+
}) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "guest-email", children: t('common.labels.email', { defaultValue: 'Email' }) }), _jsx(Input, { id: "guest-email", type: "email", value: guestData.email, onChange: (e) => setGuestData((d) => ({ ...d, email: e.target.value })), placeholder: t('jams.lobby.guestEmailPlaceholder', {
|
|
44
44
|
defaultValue: 'you@example.com',
|
|
45
45
|
}) })] }), _jsxs("p", { className: "text-muted-foreground text-sm", children: [t('jams.lobby.guestTermsAgreePrefix', {
|
|
46
46
|
defaultValue: 'By continuing you agree to the',
|
|
@@ -10,6 +10,16 @@ export type JamParticipantMetadata = {
|
|
|
10
10
|
observer?: boolean;
|
|
11
11
|
};
|
|
12
12
|
export declare function parseParticipantMetadata(metadata?: string): JamParticipantMetadata;
|
|
13
|
+
/**
|
|
14
|
+
* Profile drawn on a participant tile. LiveKit applies token metadata only
|
|
15
|
+
* after the room connection completes, so the local tile has no profile while
|
|
16
|
+
* the UI still says it is connecting and the empty-name avatar renders as "??".
|
|
17
|
+
* Use the signed-in profile for that window.
|
|
18
|
+
*/
|
|
19
|
+
export declare const participantTileProfile: (participant: {
|
|
20
|
+
isLocal: boolean;
|
|
21
|
+
metadata?: string;
|
|
22
|
+
}, localProfile?: PublicProfile) => PublicProfile | undefined;
|
|
13
23
|
export declare const mentionProfilesFromParticipants: (participants: {
|
|
14
24
|
metadata?: string;
|
|
15
25
|
}[]) => PublicProfile[];
|
|
@@ -11,6 +11,19 @@ export function parseParticipantMetadata(metadata) {
|
|
|
11
11
|
return {};
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
const hasTileIdentity = (profile) => !!(profile?.handle || profile?.displayName || profile?.avatar);
|
|
15
|
+
/**
|
|
16
|
+
* Profile drawn on a participant tile. LiveKit applies token metadata only
|
|
17
|
+
* after the room connection completes, so the local tile has no profile while
|
|
18
|
+
* the UI still says it is connecting and the empty-name avatar renders as "??".
|
|
19
|
+
* Use the signed-in profile for that window.
|
|
20
|
+
*/
|
|
21
|
+
export const participantTileProfile = (participant, localProfile) => {
|
|
22
|
+
const fromRoom = parseParticipantMetadata(participant.metadata).profile;
|
|
23
|
+
if (hasTileIdentity(fromRoom))
|
|
24
|
+
return fromRoom;
|
|
25
|
+
return participant.isLocal ? localProfile : fromRoom;
|
|
26
|
+
};
|
|
14
27
|
export const mentionProfilesFromParticipants = (participants) => {
|
|
15
28
|
const byId = new Map();
|
|
16
29
|
for (const participant of participants) {
|
|
@@ -14,5 +14,5 @@ export function ContentHeader() {
|
|
|
14
14
|
const titleNode = pageHeader?.title && typeof pageHeader.title !== 'string'
|
|
15
15
|
? pageHeader.title
|
|
16
16
|
: null;
|
|
17
|
-
return (_jsxs("header", { className: "bg-background sticky top-0 z-10 flex h-16 w-full items-center justify-between border-b p-4", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsxs("button", { type: "button", title: t('
|
|
17
|
+
return (_jsxs("header", { className: "bg-background sticky top-0 z-10 flex h-16 w-full items-center justify-between border-b p-4", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsxs("button", { type: "button", title: t('common.actions.back'), "aria-label": t('common.actions.back'), onClick: () => router.back(), children: [_jsx(ChevronLeft, { "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: t('common.actions.back') })] }), titleNode ?? (_jsx("h1", { className: "truncate text-xl font-semibold", "data-testid": pageHeader?.testId, children: titleString }))] }), pageHeader?.actions && (_jsx("div", { className: "flex items-center gap-2", children: pageHeader.actions }))] }));
|
|
18
18
|
}
|
|
@@ -12,5 +12,5 @@ export function FooterMobile({ onNewPost } = {}) {
|
|
|
12
12
|
const notificationStats = openpeepsApi.useCurrentProfileNotificationStats();
|
|
13
13
|
return (_jsx(TooltipProvider, { delayDuration: 300, children: _jsxs("nav", { "aria-label": t('navigation.primaryMobile', {
|
|
14
14
|
defaultValue: 'Primary',
|
|
15
|
-
}), className: "bg-surface flex h-20 w-full items-center justify-evenly md:hidden", children: [_jsx(MobileMenuItem, { title: t('navigation.home'), tooltip: t('navigation.tooltips.community'), icon: Home, action: hrefOf({ type: 'feed', feed: 'local' }) }), _jsx(MobileMenuItem, { title: t('navigation.myFeed'), tooltip: t('navigation.tooltips.myFeed'), icon: Newspaper, action: hrefOf({ type: 'feed', feed: 'my' }) }), _jsx(MobileMenuItem, { title: t('navigation.newPost'), tooltip: t('navigation.tooltips.newPost'), icon: PlusSquare, action: onNewPost ?? hrefOf({ type: 'postNew' }) }), _jsx(MobileMenuItem, { title: t('
|
|
15
|
+
}), className: "bg-surface flex h-20 w-full items-center justify-evenly md:hidden", children: [_jsx(MobileMenuItem, { title: t('navigation.home'), tooltip: t('navigation.tooltips.community'), icon: Home, action: hrefOf({ type: 'feed', feed: 'local' }) }), _jsx(MobileMenuItem, { title: t('navigation.myFeed'), tooltip: t('navigation.tooltips.myFeed'), icon: Newspaper, action: hrefOf({ type: 'feed', feed: 'my' }) }), _jsx(MobileMenuItem, { title: t('navigation.newPost'), tooltip: t('navigation.tooltips.newPost'), icon: PlusSquare, action: onNewPost ?? hrefOf({ type: 'postNew' }) }), _jsx(MobileMenuItem, { title: t('common.entities.groups'), tooltip: t('navigation.tooltips.groups'), icon: Users, action: hrefOf({ type: 'groups' }) }), _jsx(MobileMenuItem, { title: t('navigation.openNotifications'), tooltip: t('navigation.tooltips.notifications'), icon: Bell, action: hrefOf({ type: 'notifications' }), badge: notificationStats.data?.unseen })] }) }));
|
|
16
16
|
}
|
|
@@ -26,7 +26,7 @@ export function SideBar({ onClose, mainMenu, profileMenu } = {}) {
|
|
|
26
26
|
const registerHref = hrefOf({ type: 'auth', mode: 'register' });
|
|
27
27
|
const loginHref = hrefOf({ type: 'auth', mode: 'login' });
|
|
28
28
|
const aboutHref = hrefOf({ type: 'about' });
|
|
29
|
-
return (_jsxs("div", { className: "bg-background text-foreground relative h-screen w-full pt-3 md:h-full", children: [_jsxs("div", { className: "h-[90%] overflow-y-auto pb-14", children: [_jsxs("div", { className: "flex w-full items-center justify-between px-4 md:items-start", children: [_jsx("a", { href: homeHref, children: logoSmall && (_jsx("img", { src: logoSmall, alt: "logo", className: "h-10 object-contain" })) }), onClose && (_jsxs("button", { type: "button", title: t('common.close'), "aria-label": t('common.close'), className: "flex md:hidden", onClick: onClose, children: [_jsx(X, { "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: t('common.close') })] }))] }), profile?.type === 'local' ? (_jsxs(_Fragment, { children: [profileMenu, mainMenu] })) : (_jsx("div", { className: "mt-4 px-4", children: _jsxs("div", { className: "flex h-full flex-col items-center justify-center space-y-4", children: [name && (_jsx("p", { className: "text-center text-lg font-semibold", children: t('navigation.welcome', { name }) })), tagLine && _jsx("p", { className: "px-2 text-center text-sm", children: tagLine }), serverInfo.publicContent && (_jsx("span", { children: _jsx(Link, { action: aboutHref, className: "op-anchor text-sm", children: t('navigation.about', {
|
|
29
|
+
return (_jsxs("div", { className: "bg-background text-foreground relative h-screen w-full pt-3 md:h-full", children: [_jsxs("div", { className: "h-[90%] overflow-y-auto pb-14", children: [_jsxs("div", { className: "flex w-full items-center justify-between px-4 md:items-start", children: [_jsx("a", { href: homeHref, children: logoSmall && (_jsx("img", { src: logoSmall, alt: "logo", className: "h-10 object-contain" })) }), onClose && (_jsxs("button", { type: "button", title: t('common.actions.close'), "aria-label": t('common.actions.close'), className: "flex md:hidden", onClick: onClose, children: [_jsx(X, { "aria-hidden": "true" }), _jsx("span", { className: "sr-only", children: t('common.actions.close') })] }))] }), profile?.type === 'local' ? (_jsxs(_Fragment, { children: [profileMenu, mainMenu] })) : (_jsx("div", { className: "mt-4 px-4", children: _jsxs("div", { className: "flex h-full flex-col items-center justify-center space-y-4", children: [name && (_jsx("p", { className: "text-center text-lg font-semibold", children: t('navigation.welcome', { name }) })), tagLine && _jsx("p", { className: "px-2 text-center text-sm", children: tagLine }), serverInfo.publicContent && (_jsx("span", { children: _jsx(Link, { action: aboutHref, className: "op-anchor text-sm", children: t('navigation.about', {
|
|
30
30
|
defaultValue: 'Learn more about {{communityName}}',
|
|
31
31
|
communityName: name,
|
|
32
32
|
}) }) })), _jsx(Button, { title: t('navigation.joinCommunity'), variant: "default", action: registerHref, children: t('navigation.joinCommunity') }), _jsxs("span", { className: "text-sm", children: [t('navigation.haveAccount'), ' ', _jsx(Link, { action: loginHref, children: t('navigation.logIn') })] })] }) }))] }), _jsxs("footer", { className: "bg-background absolute bottom-3", children: [bugReportUrl && /^https?:\/\//i.test(bugReportUrl) && (_jsx("p", { className: "ml-4 text-center", children: _jsx("a", { href: bugReportUrl, target: "_blank", rel: "noreferrer", className: "op-anchor text-sm", children: t('navigation.reportBug', { defaultValue: 'Report a bug' }) }) })), _jsx("p", { className: "ml-4 text-center", children: t('navigation.poweredBy') })] })] }));
|
|
@@ -18,7 +18,7 @@ export function FullPostLayout({ post, deleteCallback, children, }) {
|
|
|
18
18
|
postRef.current?.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
19
19
|
}, [post.id]);
|
|
20
20
|
if (isLoading) {
|
|
21
|
-
return (_jsx("div", { className: "text-muted-foreground flex h-32 items-center justify-center text-sm", children: t('common.loading', { defaultValue: 'Loading…' }) }));
|
|
21
|
+
return (_jsx("div", { className: "text-muted-foreground flex h-32 items-center justify-center text-sm", children: t('common.states.loading', { defaultValue: 'Loading…' }) }));
|
|
22
22
|
}
|
|
23
23
|
return (_jsxs(_Fragment, { children: [ancestryThread ? (_jsx("div", { className: threadIndent, children: _jsx(ThreadedFeed, { thread: ancestryThread, isAncestors: true }) })) : null, _jsxs("div", { ref: postRef, className: "relative", children: [children ?? (_jsx(FeedPost, { post: post, deleteCallback: deleteCallback, hideReply: true,
|
|
24
24
|
// The page header already names the group. On a repost, keep the
|
|
@@ -20,6 +20,7 @@ export { DeletePostModal } from './pieces/modals/DeletePostModal';
|
|
|
20
20
|
export { EditPostModal } from './post-form/EditPostModal';
|
|
21
21
|
export { useEditPostModal } from './post-form/EditPostModalContext';
|
|
22
22
|
export { ComposeAttachments } from './post-form/ComposeAttachments';
|
|
23
|
+
export { useComposeAttachments } from './post-form/ComposeAttachments';
|
|
23
24
|
export { DescriptionEditModal } from './post-form/DescriptionEditModal';
|
|
24
25
|
export type { DescriptionEditModalProps } from './post-form/DescriptionEditModal';
|
|
25
26
|
export { OpenpeepsMarkdownInput } from './post-form/OpenpeepsMarkdownInput';
|
|
@@ -13,6 +13,7 @@ export { DeletePostModal } from './pieces/modals/DeletePostModal.js';
|
|
|
13
13
|
export { EditPostModal } from './post-form/EditPostModal.js';
|
|
14
14
|
export { useEditPostModal } from './post-form/EditPostModalContext.js';
|
|
15
15
|
export { ComposeAttachments } from './post-form/ComposeAttachments.js';
|
|
16
|
+
export { useComposeAttachments } from './post-form/ComposeAttachments.js';
|
|
16
17
|
export { DescriptionEditModal } from './post-form/DescriptionEditModal.js';
|
|
17
18
|
export { OpenpeepsMarkdownInput } from './post-form/OpenpeepsMarkdownInput.js';
|
|
18
19
|
export { ArticleForm } from './post-form/ArticleForm.js';
|
|
@@ -122,7 +122,7 @@ const EventRsvpRow = ({ rsvp, post, currentProfile, canManageRsvps, recurrenceId
|
|
|
122
122
|
defaultValue: 'Message',
|
|
123
123
|
}), action: () => onMessage(rsvp.profile) })) : null, _jsx(FollowUnfollowButton, { profile: rsvp.profile, popup: true })] })) : undefined }) }), canManageRsvps && rsvp.profile.id !== post.profile.id ? (rsvp.response === 'removed' ? (_jsx(Button, { variant: "outline", action: () => onManage('yes', rsvp.profile.id, recurrenceId), children: t('events.rsvp.restoreAttendee', {
|
|
124
124
|
defaultValue: 'Restore',
|
|
125
|
-
}) })) : (_jsx(Button, { variant: "outline", action: () => onManage('removed', rsvp.profile.id, recurrenceId), children: t('
|
|
125
|
+
}) })) : (_jsx(Button, { variant: "outline", action: () => onManage('removed', rsvp.profile.id, recurrenceId), children: t('common.actions.remove', {
|
|
126
126
|
defaultValue: 'Remove',
|
|
127
127
|
}) }))) : null] }));
|
|
128
128
|
};
|
|
@@ -92,13 +92,13 @@ export const EventRsvpScopeDialog = ({ open, post, response, defaultRecurrenceId
|
|
|
92
92
|
: ''] })] }) }, occurrence.recurrenceId));
|
|
93
93
|
}) }) })) : null, scope === 'selected' && openSelected.length === 0 ? (_jsx("p", { className: "text-muted-foreground text-sm", children: t('events.rsvp.scope.selectAtLeastOne', {
|
|
94
94
|
defaultValue: 'Select at least one date.',
|
|
95
|
-
}) })) : null, error ? _jsx("p", { className: "text-error text-sm", children: error }) : null, _jsx(DialogActions, { cancelLabel: t('
|
|
95
|
+
}) })) : null, error ? _jsx("p", { className: "text-error text-sm", children: error }) : null, _jsx(DialogActions, { cancelLabel: t('common.actions.cancel', {
|
|
96
96
|
defaultValue: 'Cancel',
|
|
97
97
|
}), onCancel: onClose, actionLabel: joiningWaitlist
|
|
98
98
|
? t('events.rsvp.joinWaitlist', {
|
|
99
99
|
defaultValue: 'Join waitlist',
|
|
100
100
|
})
|
|
101
|
-
: t('
|
|
101
|
+
: t('common.actions.confirm', {
|
|
102
102
|
defaultValue: 'Confirm',
|
|
103
103
|
}), onAction: confirm, disabled: confirmDisabled })] }) }));
|
|
104
104
|
};
|
|
@@ -18,7 +18,7 @@ export const EventWaitlistJoinDialog = ({ open, post, error, submitting, onClose
|
|
|
18
18
|
}) }), _jsx("p", { className: "text-muted-foreground text-sm", children: t('events.rsvp.waitlistConfirmBody', {
|
|
19
19
|
defaultValue: 'If a spot opens, you will have {{minutes}} minutes to claim it.',
|
|
20
20
|
minutes,
|
|
21
|
-
}) }), error ? _jsx("p", { className: "text-error text-sm", children: error }) : null, _jsx(DialogActions, { cancelLabel: t('
|
|
21
|
+
}) }), error ? _jsx("p", { className: "text-error text-sm", children: error }) : null, _jsx(DialogActions, { cancelLabel: t('common.actions.cancel', {
|
|
22
22
|
defaultValue: 'Cancel',
|
|
23
23
|
}), onCancel: onClose, actionLabel: t('events.rsvp.joinWaitlist', {
|
|
24
24
|
defaultValue: 'Join waitlist',
|
|
@@ -24,7 +24,7 @@ export function GalleryModal({ attachments, initialIndex = 0, onClose, }) {
|
|
|
24
24
|
return null;
|
|
25
25
|
const prevLabel = t('posts.gallery.previous', { defaultValue: 'Previous' });
|
|
26
26
|
const nextLabel = t('posts.gallery.next', { defaultValue: 'Next' });
|
|
27
|
-
const closeLabel = t('
|
|
27
|
+
const closeLabel = t('common.actions.close', { defaultValue: 'Close' });
|
|
28
28
|
const prev = (e) => {
|
|
29
29
|
stop(e);
|
|
30
30
|
setIndex((i) => (i === 0 ? attachments.length - 1 : i - 1));
|
|
@@ -16,9 +16,9 @@ export function DeletePostModal({ post, open, onClose, deleteCallback, }) {
|
|
|
16
16
|
defaultValue: 'Delete post',
|
|
17
17
|
}) }) }), _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: _jsxs("article", { className: "min-w-0 overflow-x-hidden", children: [_jsx(FeedPost, { post: post, noReactionHeader: true }), _jsx("p", { className: "my-4 text-sm", children: t('posts.delete.confirm', {
|
|
18
18
|
defaultValue: 'Are you sure you want to delete this post?',
|
|
19
|
-
}) })] }) }), _jsx(DialogActions, { cancelLabel: t('
|
|
19
|
+
}) })] }) }), _jsx(DialogActions, { cancelLabel: t('common.actions.cancel', {
|
|
20
20
|
defaultValue: 'Cancel',
|
|
21
|
-
}), onCancel: onClose, actionLabel: t('
|
|
21
|
+
}), onCancel: onClose, actionLabel: t('common.actions.delete', {
|
|
22
22
|
defaultValue: 'Delete',
|
|
23
23
|
}), onAction: handleDelete, actionVariant: "destructive" })] }) }));
|
|
24
24
|
}
|
|
@@ -12,6 +12,8 @@ export interface ComposeAttachmentsApi {
|
|
|
12
12
|
openImagePicker: () => void;
|
|
13
13
|
openAudioPicker: () => void;
|
|
14
14
|
openDocumentPicker: () => void;
|
|
15
|
+
/** Drop in-flight and ready items. Used after a message is sent. */
|
|
16
|
+
clear: () => void;
|
|
15
17
|
/** True while any attachment is still uploading or processing. */
|
|
16
18
|
pending: boolean;
|
|
17
19
|
/** Attachment cards — render where the previews should appear. */
|
|
@@ -153,6 +153,14 @@ export function useComposeAttachments({ attachments, onChange, multipleImages =
|
|
|
153
153
|
openImagePicker: () => imageInputRef.current?.click(),
|
|
154
154
|
openAudioPicker: () => audioInputRef.current?.click(),
|
|
155
155
|
openDocumentPicker: () => documentInputRef.current?.click(),
|
|
156
|
+
clear: () => {
|
|
157
|
+
items.forEach((item) => {
|
|
158
|
+
if (item.previewUrl && isBlobUrl(item.previewUrl)) {
|
|
159
|
+
revokeBlobUrl(item.previewUrl);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
setItems([]);
|
|
163
|
+
},
|
|
156
164
|
pending,
|
|
157
165
|
previews,
|
|
158
166
|
inputs,
|
|
@@ -18,5 +18,5 @@ export function DescriptionEditModal({ attachment, open, onClose, onSave, }) {
|
|
|
18
18
|
defaultValue: 'Edit description',
|
|
19
19
|
}) }) }), _jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: "attachment-description", children: t('common.media.altText', { defaultValue: 'Alt text' }) }), _jsx(Textarea, { id: "attachment-description", rows: 3, value: description, onChange: (e) => setDescription(e.target.value), placeholder: t('form.uploadEditModal.description.placeholder', {
|
|
20
20
|
defaultValue: 'Describe this attachment for accessibility',
|
|
21
|
-
}) })] }), _jsx(DialogActions, { cancelLabel: t('common.back', { defaultValue: 'Back' }), onCancel: onClose, actionLabel: t('common.done', { defaultValue: 'Done' }), onAction: saveAndClose })] }) }));
|
|
21
|
+
}) })] }), _jsx(DialogActions, { cancelLabel: t('common.actions.back', { defaultValue: 'Back' }), onCancel: onClose, actionLabel: t('common.done', { defaultValue: 'Done' }), onAction: saveAndClose })] }) }));
|
|
22
22
|
}
|
|
@@ -87,7 +87,7 @@ export function EditPostModal({ post, onClose }) {
|
|
|
87
87
|
? data.content
|
|
88
88
|
: data.type === 'event'
|
|
89
89
|
? data.content
|
|
90
|
-
: '', mentions: post.mentions })), error ? _jsx("p", { className: "text-error text-sm", children: error }) : null, _jsx(DialogActions, { cancelLabel: t('common.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: submitting
|
|
90
|
+
: '', mentions: post.mentions })), error ? _jsx("p", { className: "text-error text-sm", children: error }) : null, _jsx(DialogActions, { cancelLabel: t('common.actions.cancel', { defaultValue: 'Cancel' }), onCancel: onClose, actionLabel: submitting
|
|
91
91
|
? t('common.saving', { defaultValue: 'Saving…' })
|
|
92
|
-
: t('common.save', { defaultValue: 'Save' }), onAction: publish, disabled: submitting || !canSave })] }) }));
|
|
92
|
+
: t('common.actions.save', { defaultValue: 'Save' }), onAction: publish, disabled: submitting || !canSave })] }) }));
|
|
93
93
|
}
|