@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
|
@@ -161,7 +161,7 @@ export function RelationCapabilitiesEditor() {
|
|
|
161
161
|
if (configQuery.isLoading || !draft) {
|
|
162
162
|
return (
|
|
163
163
|
<div className="text-muted-foreground flex h-32 items-center justify-center text-sm">
|
|
164
|
-
{t('common.
|
|
164
|
+
{t('common.states.loading', { defaultValue: 'Loading…' })}
|
|
165
165
|
</div>
|
|
166
166
|
);
|
|
167
167
|
}
|
|
@@ -198,11 +198,11 @@ export function RelationCapabilitiesEditor() {
|
|
|
198
198
|
action={handleSave}
|
|
199
199
|
disabled={saving || !canUpdateConfig || !diffPatch}
|
|
200
200
|
loadingContent={t('common.saving', { defaultValue: 'Saving…' })}
|
|
201
|
-
title={t('common.save', { defaultValue: 'Save' })}
|
|
201
|
+
title={t('common.actions.save', { defaultValue: 'Save' })}
|
|
202
202
|
>
|
|
203
203
|
{saving
|
|
204
204
|
? t('common.saving', { defaultValue: 'Saving…' })
|
|
205
|
-
: t('common.save', { defaultValue: 'Save' })}
|
|
205
|
+
: t('common.actions.save', { defaultValue: 'Save' })}
|
|
206
206
|
</Button>
|
|
207
207
|
{canUpdateConfig && diffPatch ? (
|
|
208
208
|
<Button
|
|
@@ -183,11 +183,11 @@ export function RoleCapabilityMatrix({ roles }: RoleCapabilityMatrixProps) {
|
|
|
183
183
|
action={handleSave}
|
|
184
184
|
disabled={saving || !canUpdateRoles || changedRoleIds.length === 0}
|
|
185
185
|
loadingContent={t('common.saving', { defaultValue: 'Saving…' })}
|
|
186
|
-
title={t('common.save', { defaultValue: 'Save' })}
|
|
186
|
+
title={t('common.actions.save', { defaultValue: 'Save' })}
|
|
187
187
|
>
|
|
188
188
|
{saving
|
|
189
189
|
? t('common.saving', { defaultValue: 'Saving…' })
|
|
190
|
-
: t('common.save', { defaultValue: 'Save' })}
|
|
190
|
+
: t('common.actions.save', { defaultValue: 'Save' })}
|
|
191
191
|
</Button>
|
|
192
192
|
{canUpdateRoles && deviatesFromDefaults ? (
|
|
193
193
|
<Button
|
|
@@ -36,7 +36,7 @@ export function SignUpLoginModal({ onClose }: SignUpLoginModalProps) {
|
|
|
36
36
|
</DialogDescription>
|
|
37
37
|
</DialogHeader>
|
|
38
38
|
<DialogActions
|
|
39
|
-
cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
|
|
39
|
+
cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
|
|
40
40
|
onCancel={onClose}
|
|
41
41
|
actionLabel={t('accounts.login.loginButton', {
|
|
42
42
|
defaultValue: 'Log In',
|
|
@@ -89,7 +89,7 @@ export function ConfigurationList({
|
|
|
89
89
|
)}
|
|
90
90
|
<button
|
|
91
91
|
type="button"
|
|
92
|
-
title={t('common.
|
|
92
|
+
title={t('common.actions.remove', {
|
|
93
93
|
defaultValue: 'Remove',
|
|
94
94
|
})}
|
|
95
95
|
onClick={() => setAndNotify(value.toSpliced(index, 1))}
|
|
@@ -100,7 +100,7 @@ export function ConfigurationList({
|
|
|
100
100
|
))}
|
|
101
101
|
<button
|
|
102
102
|
type="button"
|
|
103
|
-
title={t('common.
|
|
103
|
+
title={t('common.actions.add', { defaultValue: 'Add' })}
|
|
104
104
|
onClick={() => setAndNotify([...value, structuredClone(defaults)])}
|
|
105
105
|
>
|
|
106
106
|
<Plus className="h-4 w-4" />
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { ThumbsUp } from 'lucide-react';
|
|
1
2
|
import type { PublicPost } from '@openpeepshq/common/types';
|
|
3
|
+
import { Button } from '@openpeepshq/react-ui';
|
|
4
|
+
import { useT } from '../../i18n';
|
|
5
|
+
import { usePostReactionToggle } from '../../hooks/posts/usePostReactionToggle';
|
|
2
6
|
import { useCurrentProfile } from '../layout/IdentityContext';
|
|
3
7
|
import { FeedPostContent } from '../post/FeedPostContent';
|
|
4
8
|
import { UnreadPostIndicator } from '../post/pieces/UnreadPostIndicator';
|
|
@@ -11,7 +15,10 @@ export function ConversationMessageBubble({
|
|
|
11
15
|
unread?: boolean;
|
|
12
16
|
}) {
|
|
13
17
|
const me = useCurrentProfile();
|
|
18
|
+
const t = useT();
|
|
14
19
|
const mine = message.profile.id === me?.id;
|
|
20
|
+
const { iReacted, canReact, toggleReaction } = usePostReactionToggle(message);
|
|
21
|
+
const reactionCount = message.reactions?.length ?? 0;
|
|
15
22
|
|
|
16
23
|
return (
|
|
17
24
|
<div
|
|
@@ -23,6 +30,23 @@ export function ConversationMessageBubble({
|
|
|
23
30
|
}`}
|
|
24
31
|
>
|
|
25
32
|
<FeedPostContent post={message} />
|
|
33
|
+
{me && canReact ? (
|
|
34
|
+
<div className={mine ? 'mt-2 flex justify-end' : 'mt-2 flex'}>
|
|
35
|
+
<Button
|
|
36
|
+
variant="unstyled"
|
|
37
|
+
className={`items-center gap-1 rounded-button p-1 text-xs ${
|
|
38
|
+
iReacted ? 'text-primary' : 'text-muted-foreground'
|
|
39
|
+
}`}
|
|
40
|
+
title={t('posts.actions.react', { defaultValue: 'React' })}
|
|
41
|
+
aria-label={t('posts.actions.react')}
|
|
42
|
+
action={toggleReaction}
|
|
43
|
+
spinnerOnlyOnLoading
|
|
44
|
+
>
|
|
45
|
+
<ThumbsUp className="h-4 w-4" />
|
|
46
|
+
{reactionCount > 0 ? reactionCount : null}
|
|
47
|
+
</Button>
|
|
48
|
+
</div>
|
|
49
|
+
) : null}
|
|
26
50
|
</div>
|
|
27
51
|
{!mine ? (
|
|
28
52
|
<UnreadPostIndicator
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Image } from 'lucide-react';
|
|
1
2
|
import type { PublicProfile } from '@openpeepshq/common/types';
|
|
2
3
|
import { blockedPairIds } from '@openpeepshq/common/lib';
|
|
3
4
|
import {
|
|
@@ -11,7 +12,11 @@ import {
|
|
|
11
12
|
} from '@openpeepshq/react-ui';
|
|
12
13
|
import { useT } from '../../i18n';
|
|
13
14
|
import { useCreateConversation } from '../../hooks/conversations/useCreateConversation';
|
|
14
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
canSendDmMessage,
|
|
17
|
+
DM_MAX_ATTACHMENTS,
|
|
18
|
+
} from '../../hooks/conversations/dmMessage';
|
|
19
|
+
import { OpenpeepsMarkdownInput, useComposeAttachments } from '../post';
|
|
15
20
|
import { ProfilesInput } from '../profile';
|
|
16
21
|
|
|
17
22
|
const MAX_MESSAGE_LENGTH = 500;
|
|
@@ -38,6 +43,8 @@ export const CreateNewConversation = ({
|
|
|
38
43
|
setSelectedProfiles,
|
|
39
44
|
message,
|
|
40
45
|
setMessage,
|
|
46
|
+
attachments,
|
|
47
|
+
setAttachments,
|
|
41
48
|
submitting,
|
|
42
49
|
error,
|
|
43
50
|
send,
|
|
@@ -47,91 +54,120 @@ export const CreateNewConversation = ({
|
|
|
47
54
|
skipProfileSelection,
|
|
48
55
|
onClose,
|
|
49
56
|
});
|
|
57
|
+
const compose = useComposeAttachments({
|
|
58
|
+
attachments,
|
|
59
|
+
onChange: setAttachments,
|
|
60
|
+
});
|
|
61
|
+
const canSend = canSendDmMessage({
|
|
62
|
+
sending: submitting,
|
|
63
|
+
uploadsPending: compose.pending,
|
|
64
|
+
text: message,
|
|
65
|
+
attachments,
|
|
66
|
+
});
|
|
67
|
+
const addImageLabel = t('posts.form.addImage', {
|
|
68
|
+
defaultValue: 'Add Media',
|
|
69
|
+
});
|
|
50
70
|
|
|
51
71
|
return (
|
|
52
|
-
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
72
|
+
<>
|
|
73
|
+
<Dialog open onOpenChange={(open) => !open && onClose()}>
|
|
74
|
+
<DialogContent className="flex max-h-[85vh] max-w-lg flex-col overflow-hidden">
|
|
75
|
+
{step === 1 ? (
|
|
76
|
+
<>
|
|
77
|
+
<DialogHeader>
|
|
78
|
+
<DialogTitle>
|
|
79
|
+
{t('conversations.createNew.title', {
|
|
80
|
+
defaultValue: 'New message',
|
|
81
|
+
})}
|
|
82
|
+
</DialogTitle>
|
|
83
|
+
</DialogHeader>
|
|
63
84
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<DialogActions
|
|
79
|
-
cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
|
|
80
|
-
onCancel={onClose}
|
|
81
|
-
actionLabel={t('common.next', { defaultValue: 'Next' })}
|
|
82
|
-
onAction={() => setStep(2)}
|
|
83
|
-
disabled={selectedProfiles.length === 0}
|
|
84
|
-
/>
|
|
85
|
-
</>
|
|
86
|
-
) : (
|
|
87
|
-
<>
|
|
88
|
-
<DialogHeader>
|
|
89
|
-
<DialogTitle>
|
|
90
|
-
{t('conversations.createNew.sendMessage', {
|
|
91
|
-
defaultValue: 'Send message',
|
|
92
|
-
})}
|
|
93
|
-
</DialogTitle>
|
|
94
|
-
</DialogHeader>
|
|
85
|
+
<div className="min-h-0 flex-1 space-y-2 overflow-y-auto">
|
|
86
|
+
<ProfilesInput
|
|
87
|
+
value={selectedProfiles}
|
|
88
|
+
onChange={setSelectedProfiles}
|
|
89
|
+
banlist={me ? [me.id, ...blockedPairIds(me)] : []}
|
|
90
|
+
placeholder={t('conversations.createNew.searchPlaceholder', {
|
|
91
|
+
defaultValue: 'Search members…',
|
|
92
|
+
})}
|
|
93
|
+
title={t('conversations.createNew.title', {
|
|
94
|
+
defaultValue: 'New message',
|
|
95
|
+
})}
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
95
98
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
value={message}
|
|
100
|
-
onChange={setMessage}
|
|
101
|
-
maxLength={MAX_MESSAGE_LENGTH}
|
|
102
|
-
placeholder={t('conversations.createNew.messagePlaceholder', {
|
|
103
|
-
defaultValue: 'Write a message…',
|
|
99
|
+
<DialogActions
|
|
100
|
+
cancelLabel={t('common.actions.cancel', {
|
|
101
|
+
defaultValue: 'Cancel',
|
|
104
102
|
})}
|
|
103
|
+
onCancel={onClose}
|
|
104
|
+
actionLabel={t('common.next', { defaultValue: 'Next' })}
|
|
105
|
+
onAction={() => setStep(2)}
|
|
106
|
+
disabled={selectedProfiles.length === 0}
|
|
105
107
|
/>
|
|
106
|
-
|
|
108
|
+
</>
|
|
109
|
+
) : (
|
|
110
|
+
<>
|
|
111
|
+
<DialogHeader>
|
|
112
|
+
<DialogTitle>
|
|
113
|
+
{t('conversations.createNew.sendMessage', {
|
|
114
|
+
defaultValue: 'Send message',
|
|
115
|
+
})}
|
|
116
|
+
</DialogTitle>
|
|
117
|
+
</DialogHeader>
|
|
107
118
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{
|
|
119
|
+
<div className="min-h-0 flex-1 space-y-2 overflow-y-auto">
|
|
120
|
+
{compose.previews}
|
|
121
|
+
<OpenpeepsMarkdownInput
|
|
122
|
+
rows={5}
|
|
123
|
+
value={message}
|
|
124
|
+
onChange={setMessage}
|
|
125
|
+
maxLength={MAX_MESSAGE_LENGTH}
|
|
126
|
+
placeholder={t('conversations.createNew.messagePlaceholder', {
|
|
127
|
+
defaultValue: 'Write a message…',
|
|
128
|
+
})}
|
|
129
|
+
/>
|
|
130
|
+
<Button
|
|
131
|
+
compact
|
|
132
|
+
variant="ghost"
|
|
133
|
+
title={addImageLabel}
|
|
134
|
+
action={compose.openImagePicker}
|
|
135
|
+
disabled={attachments.length >= DM_MAX_ATTACHMENTS}
|
|
136
|
+
data-testid="conversation-add-image"
|
|
137
|
+
>
|
|
138
|
+
<Image className="size-5" />
|
|
114
139
|
</Button>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
{error ? <p className="text-error text-sm">{error}</p> : null}
|
|
143
|
+
|
|
144
|
+
<DialogFooter className="flex-wrap gap-2">
|
|
145
|
+
{!skipProfileSelection ? (
|
|
146
|
+
<Button variant="outline" action={() => setStep(1)}>
|
|
147
|
+
{t('common.actions.back', { defaultValue: 'Back' })}
|
|
148
|
+
</Button>
|
|
149
|
+
) : (
|
|
150
|
+
<Button variant="outline" action={onClose}>
|
|
151
|
+
{t('common.actions.cancel', { defaultValue: 'Cancel' })}
|
|
152
|
+
</Button>
|
|
153
|
+
)}
|
|
154
|
+
<Button
|
|
155
|
+
variant="default"
|
|
156
|
+
disabled={!canSend || selectedProfiles.length === 0}
|
|
157
|
+
action={send}
|
|
158
|
+
>
|
|
159
|
+
{submitting
|
|
160
|
+
? t('common.actions.sending', { defaultValue: 'Sending…' })
|
|
161
|
+
: t('common.actions.send', {
|
|
162
|
+
defaultValue: 'Send',
|
|
163
|
+
})}
|
|
118
164
|
</Button>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
? t('common.sending', { defaultValue: 'Sending…' })
|
|
127
|
-
: t('conversations.createNew.send', {
|
|
128
|
-
defaultValue: 'Send',
|
|
129
|
-
})}
|
|
130
|
-
</Button>
|
|
131
|
-
</DialogFooter>
|
|
132
|
-
</>
|
|
133
|
-
)}
|
|
134
|
-
</DialogContent>
|
|
135
|
-
</Dialog>
|
|
165
|
+
</DialogFooter>
|
|
166
|
+
</>
|
|
167
|
+
)}
|
|
168
|
+
</DialogContent>
|
|
169
|
+
</Dialog>
|
|
170
|
+
{compose.inputs}
|
|
171
|
+
</>
|
|
136
172
|
);
|
|
137
173
|
};
|
|
@@ -216,12 +216,12 @@ export function ImageEditModal({
|
|
|
216
216
|
</div>
|
|
217
217
|
|
|
218
218
|
<DialogActions
|
|
219
|
-
cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
|
|
219
|
+
cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
|
|
220
220
|
onCancel={onClose}
|
|
221
221
|
actionLabel={
|
|
222
222
|
submitting
|
|
223
223
|
? t('common.uploading', { defaultValue: 'Uploading…' })
|
|
224
|
-
: t('common.add', { defaultValue: 'Add' })
|
|
224
|
+
: t('common.actions.add', { defaultValue: 'Add' })
|
|
225
225
|
}
|
|
226
226
|
onAction={confirm}
|
|
227
227
|
disabled={submitting}
|
|
@@ -110,7 +110,7 @@ export function ChangeGroupRolesModal({
|
|
|
110
110
|
</p>
|
|
111
111
|
) : null}
|
|
112
112
|
<DialogActions
|
|
113
|
-
cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
|
|
113
|
+
cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
|
|
114
114
|
onCancel={onClose}
|
|
115
115
|
actionLabel={t('groups.changeRoles.confirm', {
|
|
116
116
|
defaultValue: 'Save roles',
|
|
@@ -63,7 +63,7 @@ export function ConfirmGroupExitModal({
|
|
|
63
63
|
</p>
|
|
64
64
|
) : null}
|
|
65
65
|
<DialogActions
|
|
66
|
-
cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
|
|
66
|
+
cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
|
|
67
67
|
onCancel={onClose}
|
|
68
68
|
actionLabel={t('groups.modals.confirmExit.leave', {
|
|
69
69
|
defaultValue: 'Leave',
|
|
@@ -63,9 +63,9 @@ export function ConfirmMemberRemovalModal({
|
|
|
63
63
|
</p>
|
|
64
64
|
) : null}
|
|
65
65
|
<DialogActions
|
|
66
|
-
cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
|
|
66
|
+
cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
|
|
67
67
|
onCancel={onClose}
|
|
68
|
-
actionLabel={t('
|
|
68
|
+
actionLabel={t('common.actions.remove', {
|
|
69
69
|
defaultValue: 'Remove',
|
|
70
70
|
})}
|
|
71
71
|
onAction={submit}
|
|
@@ -59,9 +59,9 @@ export function DeleteGroupModal({ group, onClose }: DeleteGroupModalProps) {
|
|
|
59
59
|
</p>
|
|
60
60
|
) : null}
|
|
61
61
|
<DialogActions
|
|
62
|
-
cancelLabel={t('
|
|
62
|
+
cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
|
|
63
63
|
onCancel={onClose}
|
|
64
|
-
actionLabel={t('
|
|
64
|
+
actionLabel={t('common.actions.delete', {
|
|
65
65
|
defaultValue: 'Delete',
|
|
66
66
|
})}
|
|
67
67
|
onAction={submit}
|
|
@@ -85,7 +85,7 @@ export function GroupForm({
|
|
|
85
85
|
{!isEdit ? (
|
|
86
86
|
<div className="space-y-2 px-1">
|
|
87
87
|
<Label htmlFor="handle">
|
|
88
|
-
{t('
|
|
88
|
+
{t('common.labels.handle', { defaultValue: 'Handle' })}
|
|
89
89
|
</Label>
|
|
90
90
|
<Input
|
|
91
91
|
id="handle"
|
|
@@ -116,7 +116,7 @@ export function GroupForm({
|
|
|
116
116
|
|
|
117
117
|
<div className="space-y-2 px-1">
|
|
118
118
|
<Label htmlFor="description">
|
|
119
|
-
{t('
|
|
119
|
+
{t('common.labels.description', { defaultValue: 'Description' })}
|
|
120
120
|
</Label>
|
|
121
121
|
<Textarea
|
|
122
122
|
id="description"
|
|
@@ -119,12 +119,12 @@ export function GroupNotificationSettingsModal({
|
|
|
119
119
|
</p>
|
|
120
120
|
) : null}
|
|
121
121
|
<DialogActions
|
|
122
|
-
cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
|
|
122
|
+
cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
|
|
123
123
|
onCancel={onClose}
|
|
124
124
|
actionLabel={
|
|
125
125
|
saving
|
|
126
126
|
? t('common.saving', { defaultValue: 'Saving…' })
|
|
127
|
-
: t('common.save', { defaultValue: 'Save' })
|
|
127
|
+
: t('common.actions.save', { defaultValue: 'Save' })
|
|
128
128
|
}
|
|
129
129
|
onAction={onSave}
|
|
130
130
|
disabled={saving || !ready}
|
|
@@ -25,7 +25,7 @@ import { Avatar } from '../profile';
|
|
|
25
25
|
import { JamAnimatedEmoji } from './JamAnimatedEmoji';
|
|
26
26
|
import { useJamContext } from './JamContext';
|
|
27
27
|
import { useJamEventsContext } from './JamEventsContext';
|
|
28
|
-
import {
|
|
28
|
+
import { participantTileProfile } from './jamEventActions';
|
|
29
29
|
import { useConnectionLost } from './useParticipantConnection';
|
|
30
30
|
import { useRaisedHands } from './useJamHands';
|
|
31
31
|
|
|
@@ -156,7 +156,7 @@ function JamParticipantOverlay({
|
|
|
156
156
|
}
|
|
157
157
|
}, [handUp]);
|
|
158
158
|
|
|
159
|
-
const profile =
|
|
159
|
+
const profile = participantTileProfile(participant, me);
|
|
160
160
|
const isModerator = jam.moderators.includes(participant.identity);
|
|
161
161
|
const viewerIsModerator = !!me && jam.moderators.includes(me.id);
|
|
162
162
|
|
|
@@ -263,7 +263,8 @@ export function JamCallParticipant({
|
|
|
263
263
|
}: JamCallParticipantProps) {
|
|
264
264
|
const t = useT();
|
|
265
265
|
const participant = trackRef.participant;
|
|
266
|
-
const
|
|
266
|
+
const me = useCurrentProfile();
|
|
267
|
+
const profile = participantTileProfile(participant, me);
|
|
267
268
|
const connectionLost = useConnectionLost(participant);
|
|
268
269
|
const speaking = useIsSpeaking(participant);
|
|
269
270
|
const cameraOn = isTrackReference(trackRef) && !trackRef.publication.isMuted;
|
|
@@ -72,7 +72,7 @@ export function JamGuestForm() {
|
|
|
72
72
|
|
|
73
73
|
<div className="space-y-2">
|
|
74
74
|
<Label htmlFor="guest-email">
|
|
75
|
-
{t('
|
|
75
|
+
{t('common.labels.email', { defaultValue: 'Email' })}
|
|
76
76
|
</Label>
|
|
77
77
|
<Input
|
|
78
78
|
id="guest-email"
|
|
@@ -30,6 +30,27 @@ export function parseParticipantMetadata(
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
const hasTileIdentity = (profile?: {
|
|
34
|
+
handle?: string;
|
|
35
|
+
displayName?: string;
|
|
36
|
+
avatar?: string | null;
|
|
37
|
+
}) => !!(profile?.handle || profile?.displayName || profile?.avatar);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Profile drawn on a participant tile. LiveKit applies token metadata only
|
|
41
|
+
* after the room connection completes, so the local tile has no profile while
|
|
42
|
+
* the UI still says it is connecting and the empty-name avatar renders as "??".
|
|
43
|
+
* Use the signed-in profile for that window.
|
|
44
|
+
*/
|
|
45
|
+
export const participantTileProfile = (
|
|
46
|
+
participant: { isLocal: boolean; metadata?: string },
|
|
47
|
+
localProfile?: PublicProfile,
|
|
48
|
+
): PublicProfile | undefined => {
|
|
49
|
+
const fromRoom = parseParticipantMetadata(participant.metadata).profile;
|
|
50
|
+
if (hasTileIdentity(fromRoom)) return fromRoom;
|
|
51
|
+
return participant.isLocal ? localProfile : fromRoom;
|
|
52
|
+
};
|
|
53
|
+
|
|
33
54
|
export const mentionProfilesFromParticipants = (
|
|
34
55
|
participants: { metadata?: string }[],
|
|
35
56
|
): PublicProfile[] => {
|
|
@@ -26,12 +26,12 @@ export function ContentHeader() {
|
|
|
26
26
|
<div className="flex min-w-0 items-center gap-2">
|
|
27
27
|
<button
|
|
28
28
|
type="button"
|
|
29
|
-
title={t('
|
|
30
|
-
aria-label={t('
|
|
29
|
+
title={t('common.actions.back')}
|
|
30
|
+
aria-label={t('common.actions.back')}
|
|
31
31
|
onClick={() => router.back()}
|
|
32
32
|
>
|
|
33
33
|
<ChevronLeft aria-hidden="true" />
|
|
34
|
-
<span className="sr-only">{t('
|
|
34
|
+
<span className="sr-only">{t('common.actions.back')}</span>
|
|
35
35
|
</button>
|
|
36
36
|
{titleNode ?? (
|
|
37
37
|
<h1
|
|
@@ -43,7 +43,7 @@ export function FooterMobile({ onNewPost }: FooterMobileProps = {}) {
|
|
|
43
43
|
action={onNewPost ?? hrefOf({ type: 'postNew' })}
|
|
44
44
|
/>
|
|
45
45
|
<MobileMenuItem
|
|
46
|
-
title={t('
|
|
46
|
+
title={t('common.entities.groups')}
|
|
47
47
|
tooltip={t('navigation.tooltips.groups')}
|
|
48
48
|
icon={Users}
|
|
49
49
|
action={hrefOf({ type: 'groups' })}
|
|
@@ -56,13 +56,13 @@ export function SideBar({ onClose, mainMenu, profileMenu }: SideBarProps = {}) {
|
|
|
56
56
|
{onClose && (
|
|
57
57
|
<button
|
|
58
58
|
type="button"
|
|
59
|
-
title={t('common.close')}
|
|
60
|
-
aria-label={t('common.close')}
|
|
59
|
+
title={t('common.actions.close')}
|
|
60
|
+
aria-label={t('common.actions.close')}
|
|
61
61
|
className="flex md:hidden"
|
|
62
62
|
onClick={onClose}
|
|
63
63
|
>
|
|
64
64
|
<X aria-hidden="true" />
|
|
65
|
-
<span className="sr-only">{t('common.close')}</span>
|
|
65
|
+
<span className="sr-only">{t('common.actions.close')}</span>
|
|
66
66
|
</button>
|
|
67
67
|
)}
|
|
68
68
|
</div>
|
|
@@ -36,7 +36,7 @@ export function FullPostLayout({
|
|
|
36
36
|
if (isLoading) {
|
|
37
37
|
return (
|
|
38
38
|
<div className="text-muted-foreground flex h-32 items-center justify-center text-sm">
|
|
39
|
-
{t('common.loading', { defaultValue: 'Loading…' })}
|
|
39
|
+
{t('common.states.loading', { defaultValue: 'Loading…' })}
|
|
40
40
|
</div>
|
|
41
41
|
);
|
|
42
42
|
}
|
|
@@ -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';
|
|
@@ -227,7 +227,7 @@ export const EventRsvpScopeDialog = ({
|
|
|
227
227
|
) : null}
|
|
228
228
|
{error ? <p className="text-error text-sm">{error}</p> : null}
|
|
229
229
|
<DialogActions
|
|
230
|
-
cancelLabel={t('
|
|
230
|
+
cancelLabel={t('common.actions.cancel', {
|
|
231
231
|
defaultValue: 'Cancel',
|
|
232
232
|
})}
|
|
233
233
|
onCancel={onClose}
|
|
@@ -236,7 +236,7 @@ export const EventRsvpScopeDialog = ({
|
|
|
236
236
|
? t('events.rsvp.joinWaitlist', {
|
|
237
237
|
defaultValue: 'Join waitlist',
|
|
238
238
|
})
|
|
239
|
-
: t('
|
|
239
|
+
: t('common.actions.confirm', {
|
|
240
240
|
defaultValue: 'Confirm',
|
|
241
241
|
})
|
|
242
242
|
}
|
|
@@ -61,7 +61,7 @@ export const EventWaitlistJoinDialog = ({
|
|
|
61
61
|
</p>
|
|
62
62
|
{error ? <p className="text-error text-sm">{error}</p> : null}
|
|
63
63
|
<DialogActions
|
|
64
|
-
cancelLabel={t('
|
|
64
|
+
cancelLabel={t('common.actions.cancel', {
|
|
65
65
|
defaultValue: 'Cancel',
|
|
66
66
|
})}
|
|
67
67
|
onCancel={onClose}
|
|
@@ -37,7 +37,7 @@ export function GalleryModal({
|
|
|
37
37
|
|
|
38
38
|
const prevLabel = t('posts.gallery.previous', { defaultValue: 'Previous' });
|
|
39
39
|
const nextLabel = t('posts.gallery.next', { defaultValue: 'Next' });
|
|
40
|
-
const closeLabel = t('
|
|
40
|
+
const closeLabel = t('common.actions.close', { defaultValue: 'Close' });
|
|
41
41
|
|
|
42
42
|
const prev = (e: MouseEvent) => {
|
|
43
43
|
stop(e);
|
|
@@ -54,11 +54,11 @@ export function DeletePostModal({
|
|
|
54
54
|
</article>
|
|
55
55
|
</div>
|
|
56
56
|
<DialogActions
|
|
57
|
-
cancelLabel={t('
|
|
57
|
+
cancelLabel={t('common.actions.cancel', {
|
|
58
58
|
defaultValue: 'Cancel',
|
|
59
59
|
})}
|
|
60
60
|
onCancel={onClose}
|
|
61
|
-
actionLabel={t('
|
|
61
|
+
actionLabel={t('common.actions.delete', {
|
|
62
62
|
defaultValue: 'Delete',
|
|
63
63
|
})}
|
|
64
64
|
onAction={handleDelete}
|