@openpeepshq/react 0.2.3 → 0.2.5
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/accounts/SignUpLoginModal.js +2 -2
- package/dist/components/configuration/ConfigMenuButton.d.ts +10 -0
- package/dist/components/configuration/ConfigMenuButton.js +12 -0
- package/dist/components/configuration/ConfigurationTree.js +1 -1
- package/dist/components/configuration/index.d.ts +2 -0
- package/dist/components/configuration/index.js +1 -0
- package/dist/components/conversations/ConversationMessageBubble.d.ts +2 -1
- package/dist/components/conversations/ConversationMessageBubble.js +4 -5
- package/dist/components/conversations/CreateNewConversation.js +10 -42
- package/dist/components/conversations/DirectMessagesHeaderActions.js +1 -1
- package/dist/components/conversations/MessageInThread.js +1 -2
- package/dist/components/form/ImageEditModal.js +2 -4
- package/dist/components/form/ImageInput.js +13 -8
- package/dist/components/form/LocationInput.js +1 -1
- package/dist/components/groups/AddGroupMembersButton.d.ts +1 -1
- package/dist/components/groups/AddGroupMembersButton.js +2 -2
- package/dist/components/groups/ChangeGroupRolesModal.js +1 -1
- package/dist/components/groups/ConfirmGroupExitModal.js +2 -2
- package/dist/components/groups/ConfirmMemberRemovalModal.js +1 -1
- package/dist/components/groups/DeleteGroupModal.js +1 -1
- package/dist/components/groups/GroupAvatar.js +4 -4
- package/dist/components/groups/GroupCard.js +3 -3
- package/dist/components/groups/GroupHeader.js +1 -1
- package/dist/components/groups/GroupMembersList.js +2 -3
- package/dist/components/groups/GroupOptionsMenu.js +12 -6
- package/dist/components/groups/JoinGroupButton.js +3 -20
- package/dist/components/jams/CreateNewJam.js +4 -4
- package/dist/components/jams/JamCallParticipant.js +17 -7
- package/dist/components/jams/JamCapacityGate.js +1 -1
- package/dist/components/jams/JamChatDrawer.js +2 -2
- package/dist/components/jams/JamConference.js +1 -1
- package/dist/components/jams/JamContext.d.ts +4 -0
- package/dist/components/jams/JamContext.js +17 -2
- package/dist/components/jams/JamDetailsDrawer.js +1 -1
- package/dist/components/jams/JamDeviceSelectors.d.ts +15 -0
- package/dist/components/jams/JamDeviceSelectors.js +4 -3
- package/dist/components/jams/JamFooter.js +15 -16
- package/dist/components/jams/JamGuestForm.js +2 -2
- package/dist/components/jams/JamLobby.js +9 -19
- package/dist/components/jams/JamObserverShell.js +1 -1
- package/dist/components/jams/JamParticipantConference.js +1 -1
- package/dist/components/jams/JamPeopleDrawer.js +17 -13
- package/dist/components/jams/JamReactionMenu.js +1 -1
- package/dist/components/jams/JamRequestJoin.js +1 -1
- package/dist/components/jams/JamRoom.js +84 -4
- package/dist/components/jams/JamToolbarButton.d.ts +21 -0
- package/dist/components/jams/JamToolbarButton.js +19 -0
- package/dist/components/jams/JamVideoCall.js +8 -3
- package/dist/components/jams/JamVideoLayout.js +16 -5
- package/dist/components/jams/LeaveCloseButton.js +9 -44
- package/dist/components/jams/LiveJamsSection.js +1 -1
- package/dist/components/jams/constants.js +4 -0
- package/dist/components/jams/useParticipantConnection.d.ts +7 -0
- package/dist/components/jams/useParticipantConnection.js +11 -0
- package/dist/components/layout/Auth.js +1 -1
- package/dist/components/layout/Infos.js +2 -2
- package/dist/components/layout/OpenpeepsContextProvider.js +4 -3
- package/dist/components/layout/OpenpeepsThemeProvider.d.ts +3 -4
- package/dist/components/layout/OpenpeepsThemeProvider.js +23 -9
- package/dist/components/layout/Root.js +1 -1
- package/dist/components/markdown/CompiledMarkdown.js +15 -1
- package/dist/components/markdown/classes.d.ts +2 -0
- package/dist/components/markdown/classes.js +2 -0
- package/dist/components/markdown/index.d.ts +1 -1
- package/dist/components/markdown/index.js +1 -1
- package/dist/components/navigation/ContentHeader.js +1 -1
- package/dist/components/navigation/FooterMobile.js +5 -1
- package/dist/components/navigation/HeaderMobile.js +1 -1
- package/dist/components/navigation/MobileMenuItem.js +1 -1
- package/dist/components/navigation/PageHeaderAction.js +1 -1
- package/dist/components/navigation/PlusButton.js +1 -1
- package/dist/components/navigation/SideBar.js +6 -1
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.js +5 -1
- package/dist/components/navigation/sideBarNavLinkClass.js +1 -1
- package/dist/components/notifications/NotificationHeaderActions.js +2 -2
- package/dist/components/notifications/NotificationWrapper.js +1 -1
- package/dist/components/notifications/NotificationsList.js +3 -3
- package/dist/components/notifications/TypedNotification.js +3 -3
- package/dist/components/post/Feed.js +3 -3
- package/dist/components/post/FeedPost.d.ts +2 -1
- package/dist/components/post/FeedPost.js +11 -6
- package/dist/components/post/FeedPostContent.js +1 -1
- package/dist/components/post/FullPostLayout.js +11 -4
- package/dist/components/post/NewEventButton.js +1 -1
- package/dist/components/post/NewNoteButton.js +1 -1
- package/dist/components/post/PinnedPost.js +1 -1
- package/dist/components/post/ReplyBox.js +1 -1
- package/dist/components/post/feed/events/EventsFeed.js +3 -3
- package/dist/components/post/feed/threaded/ThreadPost.js +1 -1
- package/dist/components/post/feed/threaded/ThreadedFeed.d.ts +3 -1
- package/dist/components/post/feed/threaded/ThreadedFeed.js +3 -3
- package/dist/components/post/pieces/Attachments.js +3 -3
- package/dist/components/post/pieces/EventMenu.js +1 -1
- package/dist/components/post/pieces/EventRsvpButton.js +3 -3
- package/dist/components/post/pieces/FeedPostStats.js +2 -2
- package/dist/components/post/pieces/GalleryModal.js +36 -5
- package/dist/components/post/pieces/PollContent.js +33 -14
- package/dist/components/post/pieces/PostActions.js +6 -45
- package/dist/components/post/pieces/PostInfoHeader.js +1 -1
- package/dist/components/post/pieces/PostMenu.js +35 -9
- package/dist/components/post/pieces/PostReactionHeader.js +1 -1
- package/dist/components/post/pieces/ShareMenu.js +4 -2
- package/dist/components/post/pieces/UnreadPostIndicator.d.ts +5 -3
- package/dist/components/post/pieces/UnreadPostIndicator.js +4 -3
- package/dist/components/post/pieces/modals/DeletePostModal.js +1 -1
- package/dist/components/post/pieces/modals/RepostModal.d.ts +5 -3
- package/dist/components/post/pieces/modals/RepostModal.js +8 -7
- package/dist/components/post/post-form/AttachmentCard.js +2 -2
- package/dist/components/post/post-form/ComposeAttachments.js +1 -1
- package/dist/components/post/post-form/DescriptionEditModal.js +1 -1
- package/dist/components/post/post-form/EditPostModal.js +22 -12
- package/dist/components/post/post-form/EventForm.js +2 -2
- package/dist/components/post/post-form/EventTypeSwitcher.js +1 -1
- package/dist/components/post/post-form/NewPostModal.d.ts +1 -1
- package/dist/components/post/post-form/NewPostModal.js +10 -10
- package/dist/components/post/post-form/OpenpeepsMarkdownInput.js +2 -2
- package/dist/components/post/post-form/PollComposerFields.d.ts +2 -0
- package/dist/components/post/post-form/PollComposerFields.js +12 -8
- package/dist/components/post/post-form/PostAudienceSelector.js +3 -3
- package/dist/components/post/post-form/PostTypeSwitcher.js +1 -1
- package/dist/components/post/post-form/ReplyModal.js +9 -8
- package/dist/components/post/post-form/VisibilitySelector.js +1 -1
- package/dist/components/post/types/Article.js +2 -1
- package/dist/components/post/types/Event.js +1 -1
- package/dist/components/post/types/Note.js +2 -1
- package/dist/components/post/types/Poll.js +2 -1
- package/dist/components/post/types/event/CardEvent.js +2 -2
- package/dist/components/post/types/event/FullEvent.js +8 -8
- package/dist/components/post/types/event/ProfileEventRelationship.d.ts +1 -1
- package/dist/components/post/types/event/ProfileEventRelationship.js +38 -18
- package/dist/components/preview-link/LocalPreviewLink.js +1 -1
- package/dist/components/preview-link/RemotePreviewLink.js +5 -1
- package/dist/components/profile/Avatar.js +3 -2
- package/dist/components/profile/FollowUnfollowButton.js +2 -2
- package/dist/components/profile/ProfileBadge.js +1 -1
- package/dist/components/profile/ProfileCard.js +1 -1
- package/dist/components/profile/ProfileHeader.js +1 -1
- package/dist/components/profile/ProfilePageAction.js +3 -3
- package/dist/components/profile/ProfilePostsAndReplies.js +3 -1
- package/dist/components/profile/ProfileSelector.js +3 -3
- package/dist/components/profile/ProfilesInput.js +1 -1
- package/dist/components/profile/ReportProfileOrPostModal.js +6 -4
- package/dist/components/server-data/context.d.ts +8 -0
- package/dist/contexts/openpeeps/hooks/admin.d.ts +63 -16774
- package/dist/contexts/openpeeps/hooks/admin.js +34 -14
- package/dist/contexts/openpeeps/hooks/conversations.d.ts +330 -0
- package/dist/contexts/openpeeps/hooks/jams.d.ts +110 -0
- package/dist/contexts/openpeeps/hooks/jams.js +1 -1
- package/dist/contexts/openpeeps/hooks/other.d.ts +8 -0
- package/dist/contexts/openpeeps/hooks/posts.d.ts +933 -53
- package/dist/contexts/openpeeps/hooks/profiles.d.ts +220 -0
- package/dist/contexts/openpeeps/hooks/search.d.ts +330 -0
- package/dist/contexts/openpeeps/index.d.ts +1 -1
- package/dist/contexts/openpeeps/index.js +10 -2
- package/dist/contexts/router/index.d.ts +8 -3
- package/dist/contexts/router/index.js +7 -3
- package/dist/hooks/conversations/useCreateConversation.d.ts +124 -0
- package/dist/hooks/conversations/useCreateConversation.js +56 -0
- package/dist/hooks/groups/useJoinGroup.d.ts +8 -0
- package/dist/hooks/groups/useJoinGroup.js +23 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/jams/useLeaveCloseJam.d.ts +20 -0
- package/dist/hooks/jams/useLeaveCloseJam.js +59 -0
- package/dist/hooks/posts/useFeedPostActions.d.ts +18 -0
- package/dist/hooks/posts/useFeedPostActions.js +51 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/lib/Markdown.d.ts +14 -0
- package/dist/lib/Markdown.js +16 -0
- package/dist/lib/analyticsClicks.d.ts +12 -0
- package/dist/lib/analyticsClicks.js +64 -0
- package/dist/lib/auth.d.ts +8 -0
- package/dist/lib/auth.js +27 -0
- package/dist/lib/canvasUtils.d.ts +6 -0
- package/dist/lib/canvasUtils.js +62 -1
- package/dist/lib/groupCapabilityHelpers.d.ts +1 -1
- package/dist/lib/passwordStrength.d.ts +6 -0
- package/dist/lib/passwordStrength.js +26 -0
- package/dist/lib/postUnread.d.ts +7 -0
- package/dist/lib/postUnread.js +7 -0
- package/dist/lib/postViewCounter.d.ts +1 -1
- package/dist/lib/postViewCounter.js +3 -1
- package/dist/lib/routeHandles.d.ts +2 -0
- package/dist/lib/routeHandles.js +2 -0
- package/dist/lib/svgCover.d.ts +2 -0
- package/dist/lib/svgCover.js +18 -0
- package/dist/navigation/index.d.ts +11 -0
- package/dist/navigation/index.js +2 -0
- package/dist/navigation/menuItems.d.ts +8 -0
- package/dist/navigation/menuItems.js +83 -0
- package/dist/navigation/targets.d.ts +94 -0
- package/dist/navigation/targets.js +12 -0
- package/dist/pages/About.d.ts +1 -0
- package/dist/pages/About.js +19 -0
- package/dist/pages/CodeOfConduct.d.ts +1 -0
- package/dist/pages/CodeOfConduct.js +14 -0
- package/dist/pages/Explore.d.ts +1 -0
- package/dist/pages/Explore.js +132 -0
- package/dist/pages/Home.d.ts +6 -0
- package/dist/pages/Home.js +31 -0
- package/dist/pages/Members.d.ts +1 -0
- package/dist/pages/Members.js +35 -0
- package/dist/pages/NotFound.d.ts +1 -0
- package/dist/pages/NotFound.js +9 -0
- package/dist/pages/Notifications.d.ts +1 -0
- package/dist/pages/Notifications.js +8 -0
- package/dist/pages/PostDetail.d.ts +1 -0
- package/dist/pages/PostDetail.js +27 -0
- package/dist/pages/Profile.d.ts +1 -0
- package/dist/pages/Profile.js +20 -0
- package/dist/pages/Tags.d.ts +1 -0
- package/dist/pages/Tags.js +14 -0
- package/dist/pages/Welcome.d.ts +1 -0
- package/dist/pages/Welcome.js +89 -0
- package/dist/pages/admin/Analytics.d.ts +11 -0
- package/dist/pages/admin/Analytics.js +11 -0
- package/dist/pages/admin/ApiKeys.d.ts +1 -0
- package/dist/pages/admin/ApiKeys.js +141 -0
- package/dist/pages/admin/Backups.d.ts +1 -0
- package/dist/pages/admin/Backups.js +39 -0
- package/dist/pages/admin/ConfigEditor.d.ts +14 -0
- package/dist/pages/admin/ConfigEditor.js +91 -0
- package/dist/pages/admin/Configuration.d.ts +1 -0
- package/dist/pages/admin/Configuration.js +8 -0
- package/dist/pages/admin/ConfigurationCommunity.d.ts +1 -0
- package/dist/pages/admin/ConfigurationCommunity.js +7 -0
- package/dist/pages/admin/ConfigurationCommunityLanguage.d.ts +1 -0
- package/dist/pages/admin/ConfigurationCommunityLanguage.js +71 -0
- package/dist/pages/admin/ConfigurationEmail.d.ts +1 -0
- package/dist/pages/admin/ConfigurationEmail.js +97 -0
- package/dist/pages/admin/ConfigurationI18n.d.ts +1 -0
- package/dist/pages/admin/ConfigurationI18n.js +51 -0
- package/dist/pages/admin/Dashboard.d.ts +1 -0
- package/dist/pages/admin/Dashboard.js +40 -0
- package/dist/pages/admin/Db.d.ts +1 -0
- package/dist/pages/admin/Db.js +238 -0
- package/dist/pages/admin/Diagnostics.d.ts +1 -0
- package/dist/pages/admin/Diagnostics.js +8 -0
- package/dist/pages/admin/DiagnosticsEmail.d.ts +1 -0
- package/dist/pages/admin/DiagnosticsEmail.js +65 -0
- package/dist/pages/admin/DiagnosticsJob.d.ts +1 -0
- package/dist/pages/admin/DiagnosticsJob.js +51 -0
- package/dist/pages/admin/DiagnosticsLogs.d.ts +1 -0
- package/dist/pages/admin/DiagnosticsLogs.js +62 -0
- package/dist/pages/admin/DiagnosticsPerformance.d.ts +1 -0
- package/dist/pages/admin/DiagnosticsPerformance.js +34 -0
- package/dist/pages/admin/GroupMembers.d.ts +1 -0
- package/dist/pages/admin/GroupMembers.js +109 -0
- package/dist/pages/admin/Groups.d.ts +1 -0
- package/dist/pages/admin/Groups.js +61 -0
- package/dist/pages/admin/Invites.d.ts +1 -0
- package/dist/pages/admin/Invites.js +72 -0
- package/dist/pages/admin/Members.d.ts +1 -0
- package/dist/pages/admin/Members.js +49 -0
- package/dist/pages/admin/Moderation.d.ts +1 -0
- package/dist/pages/admin/Moderation.js +62 -0
- package/dist/pages/admin/Reports.d.ts +1 -0
- package/dist/pages/admin/Reports.js +178 -0
- package/dist/pages/admin/analytics/AnalyticsLayout.d.ts +14 -0
- package/dist/pages/admin/analytics/AnalyticsLayout.js +104 -0
- package/dist/pages/admin/analytics/AnalyticsRangeContext.d.ts +9 -0
- package/dist/pages/admin/analytics/AnalyticsRangeContext.js +9 -0
- package/dist/pages/admin/analytics/Content.d.ts +1 -0
- package/dist/pages/admin/analytics/Content.js +117 -0
- package/dist/pages/admin/analytics/Engagement.d.ts +1 -0
- package/dist/pages/admin/analytics/Engagement.js +220 -0
- package/dist/pages/admin/analytics/Groups.d.ts +1 -0
- package/dist/pages/admin/analytics/Groups.js +139 -0
- package/dist/pages/admin/analytics/Members.d.ts +1 -0
- package/dist/pages/admin/analytics/Members.js +96 -0
- package/dist/pages/admin/analytics/Overview.d.ts +1 -0
- package/dist/pages/admin/analytics/Overview.js +165 -0
- package/dist/pages/admin/analytics/ReportSettings.d.ts +1 -0
- package/dist/pages/admin/analytics/ReportSettings.js +62 -0
- package/dist/pages/admin/analytics/analyticsInfo.d.ts +3 -0
- package/dist/pages/admin/analytics/analyticsInfo.js +4 -0
- package/dist/pages/admin/analytics/downloadCsv.d.ts +2 -0
- package/dist/pages/admin/analytics/downloadCsv.js +20 -0
- package/dist/pages/admin/community/CommunityFavicons.d.ts +1 -0
- package/dist/pages/admin/community/CommunityFavicons.js +47 -0
- package/dist/pages/admin/community/CommunityInfo.d.ts +1 -0
- package/dist/pages/admin/community/CommunityInfo.js +35 -0
- package/dist/pages/admin/community/CommunityLinks.d.ts +1 -0
- package/dist/pages/admin/community/CommunityLinks.js +35 -0
- package/dist/pages/admin/community/CommunityMarkdownPage.d.ts +8 -0
- package/dist/pages/admin/community/CommunityMarkdownPage.js +35 -0
- package/dist/pages/admin/community/CommunityProfileFields.d.ts +1 -0
- package/dist/pages/admin/community/CommunityProfileFields.js +50 -0
- package/dist/pages/admin/community/CommunityRoles.d.ts +1 -0
- package/dist/pages/admin/community/CommunityRoles.js +109 -0
- package/dist/pages/admin/community/CommunityTheme.d.ts +1 -0
- package/dist/pages/admin/community/CommunityTheme.js +56 -0
- package/dist/pages/admin/community/useCommunityConfig.d.ts +168 -0
- package/dist/pages/admin/community/useCommunityConfig.js +28 -0
- package/dist/pages/admin/components/AdminCharts.d.ts +22 -0
- package/dist/pages/admin/components/AdminCharts.js +29 -0
- package/dist/pages/admin/components/AdminGroupCard.d.ts +6 -0
- package/dist/pages/admin/components/AdminGroupCard.js +42 -0
- package/dist/pages/admin/components/AdminInviteActions.d.ts +1 -0
- package/dist/pages/admin/components/AdminInviteActions.js +23 -0
- package/dist/pages/admin/components/InviteWithEmailModal.d.ts +3 -0
- package/dist/pages/admin/components/InviteWithEmailModal.js +82 -0
- package/dist/pages/admin/components/InviteWithLinkModal.d.ts +22 -0
- package/dist/pages/admin/components/InviteWithLinkModal.js +98 -0
- package/dist/pages/admin/components/ProfileRowActions.d.ts +5 -0
- package/dist/pages/admin/components/ProfileRowActions.js +131 -0
- package/dist/pages/admin/components/RestoreBackupModal.d.ts +4 -0
- package/dist/pages/admin/components/RestoreBackupModal.js +33 -0
- package/dist/pages/admin/components/RestoreTestBackupModal.d.ts +4 -0
- package/dist/pages/admin/components/RestoreTestBackupModal.js +36 -0
- package/dist/pages/articles/Edit.d.ts +1 -0
- package/dist/pages/articles/Edit.js +60 -0
- package/dist/pages/articles/Index.d.ts +1 -0
- package/dist/pages/articles/Index.js +18 -0
- package/dist/pages/articles/New.d.ts +1 -0
- package/dist/pages/articles/New.js +48 -0
- package/dist/pages/auth/Closed.d.ts +1 -0
- package/dist/pages/auth/Closed.js +14 -0
- package/dist/pages/auth/Login.d.ts +1 -0
- package/dist/pages/auth/Login.js +74 -0
- package/dist/pages/auth/OidcCallback.d.ts +5 -0
- package/dist/pages/auth/OidcCallback.js +31 -0
- package/dist/pages/auth/OidcPending.d.ts +5 -0
- package/dist/pages/auth/OidcPending.js +39 -0
- package/dist/pages/auth/Register.d.ts +4 -0
- package/dist/pages/auth/Register.js +124 -0
- package/dist/pages/auth/RegisterInvitation.d.ts +1 -0
- package/dist/pages/auth/RegisterInvitation.js +5 -0
- package/dist/pages/auth/RequestResetPassword.d.ts +1 -0
- package/dist/pages/auth/RequestResetPassword.js +50 -0
- package/dist/pages/auth/ResetPassword.d.ts +1 -0
- package/dist/pages/auth/ResetPassword.js +40 -0
- package/dist/pages/auth/SsoCallback.d.ts +1 -0
- package/dist/pages/auth/SsoCallback.js +34 -0
- package/dist/pages/auth/ValidateEmail.d.ts +6 -0
- package/dist/pages/auth/ValidateEmail.js +64 -0
- package/dist/pages/conversations/Index.d.ts +1 -0
- package/dist/pages/conversations/Index.js +58 -0
- package/dist/pages/conversations/Info.d.ts +1 -0
- package/dist/pages/conversations/Info.js +26 -0
- package/dist/pages/conversations/New.d.ts +1 -0
- package/dist/pages/conversations/New.js +8 -0
- package/dist/pages/conversations/Show.d.ts +1 -0
- package/dist/pages/conversations/Show.js +100 -0
- package/dist/pages/events/Edit.d.ts +1 -0
- package/dist/pages/events/Edit.js +69 -0
- package/dist/pages/events/Index.d.ts +1 -0
- package/dist/pages/events/Index.js +23 -0
- package/dist/pages/events/My.d.ts +1 -0
- package/dist/pages/events/My.js +24 -0
- package/dist/pages/events/New.d.ts +1 -0
- package/dist/pages/events/New.js +66 -0
- package/dist/pages/feeds/Bookmarks.d.ts +1 -0
- package/dist/pages/feeds/Bookmarks.js +10 -0
- package/dist/pages/feeds/Local.d.ts +1 -0
- package/dist/pages/feeds/Local.js +14 -0
- package/dist/pages/feeds/My.d.ts +1 -0
- package/dist/pages/feeds/My.js +12 -0
- package/dist/pages/groups/Edit.d.ts +1 -0
- package/dist/pages/groups/Edit.js +57 -0
- package/dist/pages/groups/Index.d.ts +1 -0
- package/dist/pages/groups/Index.js +50 -0
- package/dist/pages/groups/Info.d.ts +1 -0
- package/dist/pages/groups/Info.js +21 -0
- package/dist/pages/groups/Members.d.ts +1 -0
- package/dist/pages/groups/Members.js +28 -0
- package/dist/pages/groups/New.d.ts +1 -0
- package/dist/pages/groups/New.js +68 -0
- package/dist/pages/groups/Show.d.ts +1 -0
- package/dist/pages/groups/Show.js +64 -0
- package/dist/pages/index.d.ts +94 -0
- package/dist/pages/index.js +94 -0
- package/dist/pages/jams/Event.d.ts +8 -0
- package/dist/pages/jams/Event.js +57 -0
- package/dist/pages/jams/Index.d.ts +6 -0
- package/dist/pages/jams/Index.js +44 -0
- package/dist/pages/payment/Success.d.ts +1 -0
- package/dist/pages/payment/Success.js +30 -0
- package/dist/pages/plugins/Index.d.ts +1 -0
- package/dist/pages/plugins/Index.js +69 -0
- package/dist/pages/profile/Followers.d.ts +6 -0
- package/dist/pages/profile/Followers.js +28 -0
- package/dist/pages/settings/AccessTokens.d.ts +1 -0
- package/dist/pages/settings/AccessTokens.js +149 -0
- package/dist/pages/settings/Account.d.ts +1 -0
- package/dist/pages/settings/Account.js +81 -0
- package/dist/pages/settings/Billing.d.ts +1 -0
- package/dist/pages/settings/Billing.js +82 -0
- package/dist/pages/settings/Index.d.ts +1 -0
- package/dist/pages/settings/Index.js +13 -0
- package/dist/pages/settings/Language.d.ts +1 -0
- package/dist/pages/settings/Language.js +54 -0
- package/dist/pages/settings/NotificationPreferences.d.ts +1 -0
- package/dist/pages/settings/NotificationPreferences.js +180 -0
- package/dist/pages/settings/Notifications.d.ts +1 -0
- package/dist/pages/settings/Notifications.js +10 -0
- package/dist/pages/settings/PublicProfile.d.ts +1 -0
- package/dist/pages/settings/PublicProfile.js +135 -0
- package/dist/pages/settings/PushEnabledDevices.d.ts +1 -0
- package/dist/pages/settings/PushEnabledDevices.js +67 -0
- package/dist/pages/settings/Theme.d.ts +1 -0
- package/dist/pages/settings/Theme.js +37 -0
- package/dist/pages/test/Error.d.ts +1 -0
- package/dist/pages/test/Error.js +10 -0
- package/dist/pages/test/Markdown.d.ts +1 -0
- package/dist/pages/test/Markdown.js +32 -0
- package/dist/pwa/InstallPrompt.js +1 -1
- package/dist/pwa/NotificationPermissionPrompt.js +2 -2
- package/dist/pwa/UpdatePrompt.js +1 -1
- package/dist/react-native.d.ts +1 -0
- package/dist/react-native.js +1 -0
- package/dist/session/useSessionEvents.d.ts +3 -0
- package/dist/session/useSessionEvents.js +64 -0
- package/dist/stores/newPosts.d.ts +8 -8
- package/package.json +14 -9
- package/dist/components/jams/useJamLiveKitTheme.d.ts +0 -3
- package/dist/components/jams/useJamLiveKitTheme.js +0 -10
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/** Page components — hosted by web App.tsx route table. */
|
|
2
|
+
export { About } from './About';
|
|
3
|
+
export { CodeOfConduct } from './CodeOfConduct';
|
|
4
|
+
export { Home } from './Home';
|
|
5
|
+
export { NotFound } from './NotFound';
|
|
6
|
+
export { Welcome } from './Welcome';
|
|
7
|
+
export { AuthClosed } from './auth/Closed';
|
|
8
|
+
export { Login } from './auth/Login';
|
|
9
|
+
export { Register } from './auth/Register';
|
|
10
|
+
export { RegisterInvitation } from './auth/RegisterInvitation';
|
|
11
|
+
export { RequestResetPassword } from './auth/RequestResetPassword';
|
|
12
|
+
export { ResetPassword } from './auth/ResetPassword';
|
|
13
|
+
export { ValidateEmail } from './auth/ValidateEmail';
|
|
14
|
+
export { Settings } from './settings/Index';
|
|
15
|
+
export { FeedsLocal } from './feeds/Local';
|
|
16
|
+
export { FeedsMy } from './feeds/My';
|
|
17
|
+
export { FeedsBookmarks } from './feeds/Bookmarks';
|
|
18
|
+
export { Tags as TagsPage } from './Tags';
|
|
19
|
+
export { PostDetail } from './PostDetail';
|
|
20
|
+
export { Notifications as NotificationsPage } from './Notifications';
|
|
21
|
+
export { Profile as ProfilePage } from './Profile';
|
|
22
|
+
export { Explore as ExplorePage } from './Explore';
|
|
23
|
+
export { Members as MembersPage } from './Members';
|
|
24
|
+
export { ConversationsIndex } from './conversations/Index';
|
|
25
|
+
export { NewConversation } from './conversations/New';
|
|
26
|
+
export { ConversationShow } from './conversations/Show';
|
|
27
|
+
export { EventsIndex } from './events/Index';
|
|
28
|
+
export { EventsMy } from './events/My';
|
|
29
|
+
export { GroupsIndex } from './groups/Index';
|
|
30
|
+
export { GroupShow } from './groups/Show';
|
|
31
|
+
export { GroupInfo } from './groups/Info';
|
|
32
|
+
export { GroupMembers } from './groups/Members';
|
|
33
|
+
export { JamsIndex } from './jams/Index';
|
|
34
|
+
export { JamEvent } from './jams/Event';
|
|
35
|
+
export { ArticlesIndex } from './articles/Index';
|
|
36
|
+
export { Followers as ProfileFollowers } from './profile/Followers';
|
|
37
|
+
export { PublicProfileSettings } from './settings/PublicProfile';
|
|
38
|
+
export { ThemeSettings } from './settings/Theme';
|
|
39
|
+
export { AccountSettings } from './settings/Account';
|
|
40
|
+
export { NotificationSettings as NotificationSettingsPage } from './settings/Notifications';
|
|
41
|
+
export { BillingSettings } from './settings/Billing';
|
|
42
|
+
export { NewGroup } from './groups/New';
|
|
43
|
+
export { NewEvent } from './events/New';
|
|
44
|
+
export { NewArticle } from './articles/New';
|
|
45
|
+
export { AdminDashboard } from './admin/Dashboard';
|
|
46
|
+
export { AdminAnalytics } from './admin/Analytics';
|
|
47
|
+
export { AnalyticsOverviewPage } from './admin/Analytics';
|
|
48
|
+
export { AnalyticsMembersPage } from './admin/Analytics';
|
|
49
|
+
export { AnalyticsContentPage } from './admin/Analytics';
|
|
50
|
+
export { AnalyticsEngagementPage } from './admin/Analytics';
|
|
51
|
+
export { AnalyticsGroupsPage } from './admin/Analytics';
|
|
52
|
+
export { AnalyticsReportSettingsPage } from './admin/Analytics';
|
|
53
|
+
export { AdminBackups } from './admin/Backups';
|
|
54
|
+
export { AdminGroups } from './admin/Groups';
|
|
55
|
+
export { AdminInvites } from './admin/Invites';
|
|
56
|
+
export { AdminMembers } from './admin/Members';
|
|
57
|
+
export { AdminModeration } from './admin/Moderation';
|
|
58
|
+
export { PaymentSuccess } from './payment/Success';
|
|
59
|
+
export { TestMarkdown } from './test/Markdown';
|
|
60
|
+
export { TestError } from './test/Error';
|
|
61
|
+
export { PluginsIndex } from './plugins/Index';
|
|
62
|
+
export { EditArticle } from './articles/Edit';
|
|
63
|
+
export { EditEvent } from './events/Edit';
|
|
64
|
+
export { EditGroup } from './groups/Edit';
|
|
65
|
+
export { AdminConfiguration } from './admin/Configuration';
|
|
66
|
+
export { AdminConfigurationCommunity } from './admin/ConfigurationCommunity';
|
|
67
|
+
export { AdminConfigEditor } from './admin/ConfigEditor';
|
|
68
|
+
export { AdminConfigurationI18n } from './admin/ConfigurationI18n';
|
|
69
|
+
export { AdminConfigurationCommunityInfo } from './admin/community/CommunityInfo';
|
|
70
|
+
export { AdminConfigurationCommunityLinks } from './admin/community/CommunityLinks';
|
|
71
|
+
export { CommunityMarkdownPage } from './admin/community/CommunityMarkdownPage';
|
|
72
|
+
export { AdminConfigurationCommunityFavicons } from './admin/community/CommunityFavicons';
|
|
73
|
+
export { AdminConfigurationCommunityTheme } from './admin/community/CommunityTheme';
|
|
74
|
+
export { AdminConfigurationCommunityProfileFields } from './admin/community/CommunityProfileFields';
|
|
75
|
+
export { AdminConfigurationCommunityRoles } from './admin/community/CommunityRoles';
|
|
76
|
+
export { AdminGroupMembers } from './admin/GroupMembers';
|
|
77
|
+
export { AdminReports } from './admin/Reports';
|
|
78
|
+
export { AdminApiKeys } from './admin/ApiKeys';
|
|
79
|
+
export { AdminDiagnostics } from './admin/Diagnostics';
|
|
80
|
+
export { AdminDiagnosticsEmail } from './admin/DiagnosticsEmail';
|
|
81
|
+
export { AdminDiagnosticsLogs } from './admin/DiagnosticsLogs';
|
|
82
|
+
export { AdminConfigurationEmail } from './admin/ConfigurationEmail';
|
|
83
|
+
export { AccessTokensSettings } from './settings/AccessTokens';
|
|
84
|
+
export { LanguageSettings } from './settings/Language';
|
|
85
|
+
export { NotificationPreferences } from './settings/NotificationPreferences';
|
|
86
|
+
export { PushEnabledDevices } from './settings/PushEnabledDevices';
|
|
87
|
+
export { ConversationInfo } from './conversations/Info';
|
|
88
|
+
export { SsoCallback } from './auth/SsoCallback';
|
|
89
|
+
export { OidcCallback } from './auth/OidcCallback';
|
|
90
|
+
export { OidcPending } from './auth/OidcPending';
|
|
91
|
+
export { AdminDb } from './admin/Db';
|
|
92
|
+
export { AdminDiagnosticsJob } from './admin/DiagnosticsJob';
|
|
93
|
+
export { AdminDiagnosticsPerformance } from './admin/DiagnosticsPerformance';
|
|
94
|
+
export { AdminConfigurationCommunityLanguage } from './admin/ConfigurationCommunityLanguage';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/** Page components — hosted by web App.tsx route table. */
|
|
2
|
+
export { About } from './About.js';
|
|
3
|
+
export { CodeOfConduct } from './CodeOfConduct.js';
|
|
4
|
+
export { Home } from './Home.js';
|
|
5
|
+
export { NotFound } from './NotFound.js';
|
|
6
|
+
export { Welcome } from './Welcome.js';
|
|
7
|
+
export { AuthClosed } from './auth/Closed.js';
|
|
8
|
+
export { Login } from './auth/Login.js';
|
|
9
|
+
export { Register } from './auth/Register.js';
|
|
10
|
+
export { RegisterInvitation } from './auth/RegisterInvitation.js';
|
|
11
|
+
export { RequestResetPassword } from './auth/RequestResetPassword.js';
|
|
12
|
+
export { ResetPassword } from './auth/ResetPassword.js';
|
|
13
|
+
export { ValidateEmail } from './auth/ValidateEmail.js';
|
|
14
|
+
export { Settings } from './settings/Index.js';
|
|
15
|
+
export { FeedsLocal } from './feeds/Local.js';
|
|
16
|
+
export { FeedsMy } from './feeds/My.js';
|
|
17
|
+
export { FeedsBookmarks } from './feeds/Bookmarks.js';
|
|
18
|
+
export { Tags as TagsPage } from './Tags.js';
|
|
19
|
+
export { PostDetail } from './PostDetail.js';
|
|
20
|
+
export { Notifications as NotificationsPage } from './Notifications.js';
|
|
21
|
+
export { Profile as ProfilePage } from './Profile.js';
|
|
22
|
+
export { Explore as ExplorePage } from './Explore.js';
|
|
23
|
+
export { Members as MembersPage } from './Members.js';
|
|
24
|
+
export { ConversationsIndex } from './conversations/Index.js';
|
|
25
|
+
export { NewConversation } from './conversations/New.js';
|
|
26
|
+
export { ConversationShow } from './conversations/Show.js';
|
|
27
|
+
export { EventsIndex } from './events/Index.js';
|
|
28
|
+
export { EventsMy } from './events/My.js';
|
|
29
|
+
export { GroupsIndex } from './groups/Index.js';
|
|
30
|
+
export { GroupShow } from './groups/Show.js';
|
|
31
|
+
export { GroupInfo } from './groups/Info.js';
|
|
32
|
+
export { GroupMembers } from './groups/Members.js';
|
|
33
|
+
export { JamsIndex } from './jams/Index.js';
|
|
34
|
+
export { JamEvent } from './jams/Event.js';
|
|
35
|
+
export { ArticlesIndex } from './articles/Index.js';
|
|
36
|
+
export { Followers as ProfileFollowers } from './profile/Followers.js';
|
|
37
|
+
export { PublicProfileSettings } from './settings/PublicProfile.js';
|
|
38
|
+
export { ThemeSettings } from './settings/Theme.js';
|
|
39
|
+
export { AccountSettings } from './settings/Account.js';
|
|
40
|
+
export { NotificationSettings as NotificationSettingsPage } from './settings/Notifications.js';
|
|
41
|
+
export { BillingSettings } from './settings/Billing.js';
|
|
42
|
+
export { NewGroup } from './groups/New.js';
|
|
43
|
+
export { NewEvent } from './events/New.js';
|
|
44
|
+
export { NewArticle } from './articles/New.js';
|
|
45
|
+
export { AdminDashboard } from './admin/Dashboard.js';
|
|
46
|
+
export { AdminAnalytics } from './admin/Analytics.js';
|
|
47
|
+
export { AnalyticsOverviewPage } from './admin/Analytics.js';
|
|
48
|
+
export { AnalyticsMembersPage } from './admin/Analytics.js';
|
|
49
|
+
export { AnalyticsContentPage } from './admin/Analytics.js';
|
|
50
|
+
export { AnalyticsEngagementPage } from './admin/Analytics.js';
|
|
51
|
+
export { AnalyticsGroupsPage } from './admin/Analytics.js';
|
|
52
|
+
export { AnalyticsReportSettingsPage } from './admin/Analytics.js';
|
|
53
|
+
export { AdminBackups } from './admin/Backups.js';
|
|
54
|
+
export { AdminGroups } from './admin/Groups.js';
|
|
55
|
+
export { AdminInvites } from './admin/Invites.js';
|
|
56
|
+
export { AdminMembers } from './admin/Members.js';
|
|
57
|
+
export { AdminModeration } from './admin/Moderation.js';
|
|
58
|
+
export { PaymentSuccess } from './payment/Success.js';
|
|
59
|
+
export { TestMarkdown } from './test/Markdown.js';
|
|
60
|
+
export { TestError } from './test/Error.js';
|
|
61
|
+
export { PluginsIndex } from './plugins/Index.js';
|
|
62
|
+
export { EditArticle } from './articles/Edit.js';
|
|
63
|
+
export { EditEvent } from './events/Edit.js';
|
|
64
|
+
export { EditGroup } from './groups/Edit.js';
|
|
65
|
+
export { AdminConfiguration } from './admin/Configuration.js';
|
|
66
|
+
export { AdminConfigurationCommunity } from './admin/ConfigurationCommunity.js';
|
|
67
|
+
export { AdminConfigEditor } from './admin/ConfigEditor.js';
|
|
68
|
+
export { AdminConfigurationI18n } from './admin/ConfigurationI18n.js';
|
|
69
|
+
export { AdminConfigurationCommunityInfo } from './admin/community/CommunityInfo.js';
|
|
70
|
+
export { AdminConfigurationCommunityLinks } from './admin/community/CommunityLinks.js';
|
|
71
|
+
export { CommunityMarkdownPage } from './admin/community/CommunityMarkdownPage.js';
|
|
72
|
+
export { AdminConfigurationCommunityFavicons } from './admin/community/CommunityFavicons.js';
|
|
73
|
+
export { AdminConfigurationCommunityTheme } from './admin/community/CommunityTheme.js';
|
|
74
|
+
export { AdminConfigurationCommunityProfileFields } from './admin/community/CommunityProfileFields.js';
|
|
75
|
+
export { AdminConfigurationCommunityRoles } from './admin/community/CommunityRoles.js';
|
|
76
|
+
export { AdminGroupMembers } from './admin/GroupMembers.js';
|
|
77
|
+
export { AdminReports } from './admin/Reports.js';
|
|
78
|
+
export { AdminApiKeys } from './admin/ApiKeys.js';
|
|
79
|
+
export { AdminDiagnostics } from './admin/Diagnostics.js';
|
|
80
|
+
export { AdminDiagnosticsEmail } from './admin/DiagnosticsEmail.js';
|
|
81
|
+
export { AdminDiagnosticsLogs } from './admin/DiagnosticsLogs.js';
|
|
82
|
+
export { AdminConfigurationEmail } from './admin/ConfigurationEmail.js';
|
|
83
|
+
export { AccessTokensSettings } from './settings/AccessTokens.js';
|
|
84
|
+
export { LanguageSettings } from './settings/Language.js';
|
|
85
|
+
export { NotificationPreferences } from './settings/NotificationPreferences.js';
|
|
86
|
+
export { PushEnabledDevices } from './settings/PushEnabledDevices.js';
|
|
87
|
+
export { ConversationInfo } from './conversations/Info.js';
|
|
88
|
+
export { SsoCallback } from './auth/SsoCallback.js';
|
|
89
|
+
export { OidcCallback } from './auth/OidcCallback.js';
|
|
90
|
+
export { OidcPending } from './auth/OidcPending.js';
|
|
91
|
+
export { AdminDb } from './admin/Db.js';
|
|
92
|
+
export { AdminDiagnosticsJob } from './admin/DiagnosticsJob.js';
|
|
93
|
+
export { AdminDiagnosticsPerformance } from './admin/DiagnosticsPerformance.js';
|
|
94
|
+
export { AdminConfigurationCommunityLanguage } from './admin/ConfigurationCommunityLanguage.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/events/:eventId/jam` — loads the jam post and hands it off to
|
|
3
|
+
* `<JamRoom>` from `@openpeepshq/react`. Honors the `?observer=1` query string
|
|
4
|
+
* for moderator/observer mode. Rendered full-screen (outside the sidebar
|
|
5
|
+
* `RootLayout`); the wrapper guarantees a full-viewport height so the lobby
|
|
6
|
+
* and non-room states fill the screen.
|
|
7
|
+
*/
|
|
8
|
+
export declare function JamEvent(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { useNavigate, useSearchParams, useParams } from 'react-router-dom';
|
|
4
|
+
import { useT, useOpenpeeps, useCredentialsStore, useSetPageHeader, } from '../../index.js';
|
|
5
|
+
import { JamRoom, useCurrentProfile } from '../../components/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* `/events/:eventId/jam` — loads the jam post and hands it off to
|
|
8
|
+
* `<JamRoom>` from `@openpeepshq/react`. Honors the `?observer=1` query string
|
|
9
|
+
* for moderator/observer mode. Rendered full-screen (outside the sidebar
|
|
10
|
+
* `RootLayout`); the wrapper guarantees a full-viewport height so the lobby
|
|
11
|
+
* and non-room states fill the screen.
|
|
12
|
+
*/
|
|
13
|
+
export function JamEvent() {
|
|
14
|
+
const t = useT();
|
|
15
|
+
const navigate = useNavigate();
|
|
16
|
+
const { eventId } = useParams();
|
|
17
|
+
const [searchParams] = useSearchParams();
|
|
18
|
+
const { openpeepsApi } = useOpenpeeps();
|
|
19
|
+
const { credentialsStore } = useCredentialsStore();
|
|
20
|
+
const me = useCurrentProfile();
|
|
21
|
+
const observer = searchParams.get('observer') === '1' ||
|
|
22
|
+
searchParams.get('observer') === 'true';
|
|
23
|
+
// Guest/auth handoff: a `?token=` param authenticates this device before the
|
|
24
|
+
// jam post is fetched, mirroring the Svelte jam route.
|
|
25
|
+
const token = searchParams.get('token');
|
|
26
|
+
const tokenApplied = useRef(false);
|
|
27
|
+
const [tokenReady, setTokenReady] = useState(!token);
|
|
28
|
+
if (token && !tokenApplied.current) {
|
|
29
|
+
tokenApplied.current = true;
|
|
30
|
+
void credentialsStore.set({ token }).then(() => {
|
|
31
|
+
setTokenReady(true);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
// Wait until a URL `?token=` (if present) is stored so the post fetch
|
|
35
|
+
// uses the observer service JWT instead of racing as anonymous.
|
|
36
|
+
const postQuery = openpeepsApi.usePost(tokenReady ? (eventId ?? '') : '');
|
|
37
|
+
const jamEvent = postQuery.data?.data?.type === 'event' ? postQuery.data.data : undefined;
|
|
38
|
+
useSetPageHeader(jamEvent?.name
|
|
39
|
+
? t('jams.room.pageTitle', {
|
|
40
|
+
name: jamEvent.name,
|
|
41
|
+
defaultValue: 'Jam Room - {{name}}',
|
|
42
|
+
})
|
|
43
|
+
: undefined);
|
|
44
|
+
// On a capability/access error, send guests to login (preserving the return
|
|
45
|
+
// path) and authenticated users back to the jams list.
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (!postQuery.isError || !postQuery.error?.message)
|
|
48
|
+
return;
|
|
49
|
+
if (me) {
|
|
50
|
+
navigate('/jams');
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
navigate(`/auth/login?redirect=${encodeURIComponent(`${window.location.pathname}${window.location.search}`)}`);
|
|
54
|
+
}
|
|
55
|
+
}, [postQuery.isError, postQuery.error, me, navigate]);
|
|
56
|
+
return (_jsx("main", { className: "bg-surface h-screen w-screen overflow-hidden", children: postQuery.isLoading ? (_jsx("div", { className: "text-muted-foreground flex h-full w-full items-center justify-center p-6 text-sm", children: t('jams.room.loading', { defaultValue: 'Loading jam…' }) })) : !postQuery.data ? (_jsx("div", { className: "text-muted-foreground flex h-full w-full items-center justify-center p-6 text-sm", children: t('jams.room.notFound', { defaultValue: 'Jam not found' }) })) : (_jsx(JamRoom, { jamPost: postQuery.data, observer: observer })) }));
|
|
57
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useState } from 'react';
|
|
3
|
+
import { Link } from 'react-router-dom';
|
|
4
|
+
import { ChevronRight, MoreHorizontal, PhoneCall } from 'lucide-react';
|
|
5
|
+
import { useT, useOpenpeeps, useSetPlusButtonActions, useSetPageHeader, } from '../../index.js';
|
|
6
|
+
import { EventsFeed, LiveJamsSection, useCreateNewJam, useServerInfo, } from '../../components/index.js';
|
|
7
|
+
import { PopupMenu, PopupMenuButton } from '@openpeepshq/react-ui';
|
|
8
|
+
export function JamsIndex({ my = false }) {
|
|
9
|
+
const t = useT();
|
|
10
|
+
const serverInfo = useServerInfo();
|
|
11
|
+
const { openpeepsApi } = useOpenpeeps();
|
|
12
|
+
const { openCreateJam } = useCreateNewJam();
|
|
13
|
+
const [tab, setTab] = useState('upcoming');
|
|
14
|
+
const plusButton = useMemo(() => {
|
|
15
|
+
if (!serverInfo.jams.livekit.enabled)
|
|
16
|
+
return undefined;
|
|
17
|
+
return {
|
|
18
|
+
title: t('jams.create.title', { defaultValue: 'Start a jam' }),
|
|
19
|
+
icon: PhoneCall,
|
|
20
|
+
action: () => openCreateJam(),
|
|
21
|
+
};
|
|
22
|
+
}, [serverInfo.jams.livekit.enabled, t, openCreateJam]);
|
|
23
|
+
useSetPlusButtonActions(plusButton);
|
|
24
|
+
const headerActions = useMemo(() => {
|
|
25
|
+
if (my) {
|
|
26
|
+
return (_jsx(Link, { to: "/jams", className: "text-primary text-sm hover:underline", children: t('navigation.jams', { defaultValue: 'All jams' }) }));
|
|
27
|
+
}
|
|
28
|
+
return (_jsx(PopupMenu, { icon: MoreHorizontal, compact: true, children: _jsx(PopupMenuButton, { icon: ChevronRight, title: t('navigation.myJams', { defaultValue: 'My jams' }), text: t('navigation.myJams', { defaultValue: 'My jams' }), action: "/jams/my" }) }));
|
|
29
|
+
}, [my, t]);
|
|
30
|
+
useSetPageHeader(my
|
|
31
|
+
? t('navigation.myJams', { defaultValue: 'My jams' })
|
|
32
|
+
: t('navigation.jams', { defaultValue: 'Jams' }), headerActions, 'jams-page-heading');
|
|
33
|
+
const upcoming = my
|
|
34
|
+
? openpeepsApi.useMyUpcomingJamsFeed()
|
|
35
|
+
: openpeepsApi.useUpcomingJamsFeed();
|
|
36
|
+
const past = my
|
|
37
|
+
? openpeepsApi.useMyPastJamsFeed()
|
|
38
|
+
: openpeepsApi.usePastJamsFeed();
|
|
39
|
+
const activeQuery = tab === 'upcoming' ? upcoming : past;
|
|
40
|
+
return (_jsxs("div", { className: "p-4", children: [!my && serverInfo.jams.livekit.enabled ? _jsx(LiveJamsSection, {}) : null, _jsxs("nav", { "aria-label": t('jams.feed.label', { defaultValue: 'Jam timeframe' }), className: "border-border mb-4 flex border-b", children: [_jsx(TabButton, { active: tab === 'upcoming', onClick: () => setTab('upcoming'), children: t('jams.feed.upcoming', { defaultValue: 'Upcoming' }) }), _jsx(TabButton, { active: tab === 'past', onClick: () => setTab('past'), children: t('jams.feed.past', { defaultValue: 'Past' }) })] }), _jsx(EventsFeed, { query: activeQuery })] }));
|
|
41
|
+
}
|
|
42
|
+
function TabButton({ active, onClick, children, }) {
|
|
43
|
+
return (_jsx("button", { type: "button", onClick: onClick, className: `px-4 py-2 text-sm ${active ? 'border-primary border-b-2 font-semibold' : 'text-muted-foreground hover:text-foreground'}`, children: children }));
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PaymentSuccess(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { useNavigate, useSearchParams } from 'react-router-dom';
|
|
4
|
+
import { CheckCircle, Loader2 } from 'lucide-react';
|
|
5
|
+
import { useT, useOpenpeeps } from '../../index.js';
|
|
6
|
+
export function PaymentSuccess() {
|
|
7
|
+
const t = useT();
|
|
8
|
+
const navigate = useNavigate();
|
|
9
|
+
const [params] = useSearchParams();
|
|
10
|
+
const { openpeepsApi } = useOpenpeeps();
|
|
11
|
+
// Re-use the payment status endpoint as a verification ping. It returns 200
|
|
12
|
+
// once Stripe has acknowledged the checkout.
|
|
13
|
+
const paymentStatus = openpeepsApi.usePaymentStatus();
|
|
14
|
+
const verified = paymentStatus.data && paymentStatus.data.status !== 'none';
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!verified)
|
|
17
|
+
return;
|
|
18
|
+
if (params.has('user')) {
|
|
19
|
+
navigate('/feeds/local');
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
navigate('/welcome');
|
|
23
|
+
}
|
|
24
|
+
}, [verified, params, navigate]);
|
|
25
|
+
return (_jsx("div", { className: "flex min-h-screen flex-col items-center justify-center bg-gradient-to-br from-green-50 via-emerald-50 to-teal-50 p-4 text-center", children: verified ? (_jsxs(_Fragment, { children: [_jsx(CheckCircle, { size: 60, className: "text-green-500" }), _jsx("p", { className: "mt-4 max-w-sm text-lg text-gray-700", children: t('payment.success.message', {
|
|
26
|
+
defaultValue: 'Payment received. Redirecting…',
|
|
27
|
+
}) })] })) : (_jsxs(_Fragment, { children: [_jsx(Loader2, { size: 48, className: "animate-spin text-emerald-500" }), _jsx("p", { className: "mt-6 max-w-sm text-lg text-gray-600", children: t('payment.success.verifying', {
|
|
28
|
+
defaultValue: 'Verifying your payment…',
|
|
29
|
+
}) })] })) }));
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PluginsIndex: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useOpenpeeps, useT } from '../../index.js';
|
|
4
|
+
import { PluginSlot } from '../../components/index.js';
|
|
5
|
+
import { LoadingSpinner } from '@openpeepshq/react-ui';
|
|
6
|
+
const SENSITIVE_KEY_PATTERNS = [
|
|
7
|
+
'password',
|
|
8
|
+
'secret',
|
|
9
|
+
'token',
|
|
10
|
+
'apikey',
|
|
11
|
+
'api_key',
|
|
12
|
+
'privatekey',
|
|
13
|
+
'private_key',
|
|
14
|
+
'credential',
|
|
15
|
+
];
|
|
16
|
+
const isSensitiveKey = (key) => SENSITIVE_KEY_PATTERNS.some((pattern) => key.toLowerCase().includes(pattern));
|
|
17
|
+
const maskSensitive = (value, key = '') => {
|
|
18
|
+
if ((typeof value === 'string' || typeof value === 'number') &&
|
|
19
|
+
isSensitiveKey(key)) {
|
|
20
|
+
return '***';
|
|
21
|
+
}
|
|
22
|
+
if (Array.isArray(value)) {
|
|
23
|
+
return value.map((item) => maskSensitive(item, key));
|
|
24
|
+
}
|
|
25
|
+
if (value !== null && typeof value === 'object') {
|
|
26
|
+
return Object.fromEntries(Object.entries(value).map(([k, v]) => [
|
|
27
|
+
k,
|
|
28
|
+
maskSensitive(v, k),
|
|
29
|
+
]));
|
|
30
|
+
}
|
|
31
|
+
return value;
|
|
32
|
+
};
|
|
33
|
+
const safeJsonStringify = (obj) => JSON.stringify(maskSensitive(obj), null, 2);
|
|
34
|
+
export const PluginsIndex = () => {
|
|
35
|
+
const { client } = useOpenpeeps();
|
|
36
|
+
const t = useT();
|
|
37
|
+
const [plugins, setPlugins] = useState(null);
|
|
38
|
+
const [config, setConfig] = useState(null);
|
|
39
|
+
const [error, setError] = useState(null);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
let cancelled = false;
|
|
42
|
+
Promise.all([client.plugins.list(), client.plugins.config()]).then(([listResult, configResult]) => {
|
|
43
|
+
if (cancelled) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if ('error' in listResult || 'error' in configResult) {
|
|
47
|
+
setError(t('plugins.error'));
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
setPlugins(listResult.data);
|
|
51
|
+
setConfig(configResult.data);
|
|
52
|
+
}, (err) => {
|
|
53
|
+
if (cancelled) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
setError(String(err));
|
|
57
|
+
});
|
|
58
|
+
return () => {
|
|
59
|
+
cancelled = true;
|
|
60
|
+
};
|
|
61
|
+
}, [client, t]);
|
|
62
|
+
if (error) {
|
|
63
|
+
return (_jsxs("div", { className: "mx-auto max-w-3xl p-6", children: [_jsx("h1", { className: "mb-6 text-2xl font-bold", children: t('plugins.pageTitle') }), _jsx("p", { className: "text-error", children: t('plugins.error') })] }));
|
|
64
|
+
}
|
|
65
|
+
if (!plugins || !config) {
|
|
66
|
+
return _jsx(LoadingSpinner, {});
|
|
67
|
+
}
|
|
68
|
+
return (_jsxs("div", { className: "mx-auto max-w-3xl p-6", children: [_jsx("h1", { className: "mb-6 text-2xl font-bold", children: t('plugins.pageTitle') }), _jsx(PluginSlot, { name: "plugins.header", className: "mb-6" }), plugins.length === 0 ? (_jsx("p", { className: "text-muted-foreground", children: t('plugins.noPlugins') })) : (_jsx("ul", { className: "space-y-4", children: plugins.map((plugin) => (_jsxs("li", { className: "rounded-lg border p-4", children: [_jsxs("h2", { className: "text-lg font-semibold", children: [plugin.displayName ?? plugin.name, _jsx("span", { className: "text-muted-foreground ml-2 text-sm", children: plugin.version })] }), plugin.description ? (_jsx("p", { className: "text-muted-foreground text-sm", children: plugin.description })) : null, _jsx("div", { className: "text-muted-foreground mt-2 text-xs", title: t('plugins.configTitle'), children: _jsx("pre", { className: "bg-surface overflow-auto rounded p-2 text-xs", children: safeJsonStringify(config[plugin.namespace]?.[plugin.name] ?? {}) }) })] }, plugin.key))) })), _jsx(PluginSlot, { name: "plugins.footer", className: "mt-6" })] }));
|
|
69
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useParams } from 'react-router-dom';
|
|
3
|
+
import { UserX } from 'lucide-react';
|
|
4
|
+
import { useT, useOpenpeeps, useSetPageHeader } from '../../index.js';
|
|
5
|
+
import { ProfileCard, AccessDeniedLoader } from '../../components/index.js';
|
|
6
|
+
import { routeHandleParam } from '../../lib/routeHandles.js';
|
|
7
|
+
export function Followers({ following = false }) {
|
|
8
|
+
const t = useT();
|
|
9
|
+
const { handle: handleParam = '' } = useParams();
|
|
10
|
+
const handle = routeHandleParam(handleParam);
|
|
11
|
+
const { openpeepsApi } = useOpenpeeps();
|
|
12
|
+
const profileQuery = openpeepsApi.useProfileByHandle(handle);
|
|
13
|
+
const profile = profileQuery.data;
|
|
14
|
+
const listQuery = following
|
|
15
|
+
? openpeepsApi.useProfileFollowing(profile?.id ?? '')
|
|
16
|
+
: openpeepsApi.useProfileFollowers(profile?.id ?? '');
|
|
17
|
+
const pageTitle = following
|
|
18
|
+
? t('profile.following.pageTitle', { defaultValue: 'Following' })
|
|
19
|
+
: t('profile.followers.pageTitle', { defaultValue: 'Followers' });
|
|
20
|
+
useSetPageHeader(`${pageTitle} ${profile?.displayName ?? `@${handle}`}`, undefined, following ? 'profile-following-heading' : 'profile-followers-heading');
|
|
21
|
+
return (_jsx(AccessDeniedLoader, { queries: [profileQuery], children: _jsx(AccessDeniedLoader, { queries: [listQuery], children: (listQuery.data ?? []).length === 0 ? (_jsxs("div", { className: "relative flex flex-col items-center pt-20", children: [_jsx(UserX, { size: 50 }), _jsx("p", { className: "text-muted-foreground mt-2 text-sm", children: following
|
|
22
|
+
? t('profile.following.noFollowers', {
|
|
23
|
+
defaultValue: 'Not following anyone yet',
|
|
24
|
+
})
|
|
25
|
+
: t('profile.followers.noFollowing', {
|
|
26
|
+
defaultValue: 'No followers yet',
|
|
27
|
+
}) })] })) : (_jsx("div", { className: "flex flex-col", children: (listQuery.data ?? []).map((p) => (_jsx(ProfileCard, { profile: p }, p.id))) })) }) }));
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AccessTokensSettings(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Copy } from 'lucide-react';
|
|
4
|
+
import { useT, useOpenpeeps, useSetPageHeader } from '../../index.js';
|
|
5
|
+
import { Button, Input, Label, ShadcnBadge, Toast, } from '@openpeepshq/react-ui';
|
|
6
|
+
const scopeLabel = (scope) => `${scope.scopeLevel ?? 'read'}:${scope.resource.type}:${scope.resource.id ?? '*'}`;
|
|
7
|
+
const RESOURCE_TYPES = [
|
|
8
|
+
'*',
|
|
9
|
+
'posts',
|
|
10
|
+
'profiles',
|
|
11
|
+
'groups',
|
|
12
|
+
'jams',
|
|
13
|
+
'notifications',
|
|
14
|
+
'reports',
|
|
15
|
+
'webhooks',
|
|
16
|
+
];
|
|
17
|
+
const SCOPE_LEVELS = ['read', 'write', 'admin'];
|
|
18
|
+
const defaultForm = {
|
|
19
|
+
name: '',
|
|
20
|
+
description: '',
|
|
21
|
+
expirationTime: '30d',
|
|
22
|
+
scopes: [{ scopeLevel: 'read', resource: { type: 'posts', id: '*' } }],
|
|
23
|
+
};
|
|
24
|
+
export function AccessTokensSettings() {
|
|
25
|
+
const t = useT();
|
|
26
|
+
const { openpeepsApi } = useOpenpeeps();
|
|
27
|
+
const tokensQuery = openpeepsApi.useCurrentProfileAccessTokens();
|
|
28
|
+
const createToken = openpeepsApi.createCurrentProfileAccessTokenAction();
|
|
29
|
+
const revokeToken = openpeepsApi.revokeCurrentProfileAccessTokenAction();
|
|
30
|
+
useSetPageHeader(t('settings.accessTokens.title', { defaultValue: 'Access tokens' }));
|
|
31
|
+
const [form, setForm] = useState(defaultForm);
|
|
32
|
+
const [creating, setCreating] = useState(false);
|
|
33
|
+
const [createdToken, setCreatedToken] = useState();
|
|
34
|
+
const [error, setError] = useState();
|
|
35
|
+
const tokens = (tokensQuery.data ?? []);
|
|
36
|
+
const create = async () => {
|
|
37
|
+
setError(undefined);
|
|
38
|
+
if (!form.name?.trim()) {
|
|
39
|
+
setError(t('settings.accessTokens.nameRequired', {
|
|
40
|
+
defaultValue: 'Name is required',
|
|
41
|
+
}));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (!(form.scopes?.length ?? 0)) {
|
|
45
|
+
setError(t('settings.accessTokens.scopeRequired', {
|
|
46
|
+
defaultValue: 'At least one scope is required',
|
|
47
|
+
}));
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
setCreating(true);
|
|
51
|
+
setCreatedToken(undefined);
|
|
52
|
+
try {
|
|
53
|
+
const created = (await createToken({
|
|
54
|
+
name: form.name.trim(),
|
|
55
|
+
description: form.description?.trim() || undefined,
|
|
56
|
+
expirationTime: form.expirationTime,
|
|
57
|
+
scopes: (form.scopes ?? []).map((scope) => ({
|
|
58
|
+
...scope,
|
|
59
|
+
resource: { ...scope.resource, id: '*' },
|
|
60
|
+
})),
|
|
61
|
+
}));
|
|
62
|
+
setCreatedToken(created.signedToken);
|
|
63
|
+
setForm(defaultForm);
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
setError(t('settings.accessTokens.createError', {
|
|
67
|
+
defaultValue: 'Failed to create token',
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
setCreating(false);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return (_jsxs("div", { className: "space-y-6 p-4", children: [_jsxs("section", { className: "space-y-3 rounded-md border p-4", children: [_jsx("h2", { className: "text-lg font-medium", children: t('settings.accessTokens.createTitle', {
|
|
75
|
+
defaultValue: 'Create token',
|
|
76
|
+
}) }), _jsx("p", { className: "text-muted-foreground text-sm", children: t('settings.accessTokens.createDescription', {
|
|
77
|
+
defaultValue: 'Create a personal access token to use the API.',
|
|
78
|
+
}) }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "token-name", children: t('settings.accessTokens.name', { defaultValue: 'Name' }) }), _jsx(Input, { id: "token-name", value: form.name, placeholder: t('settings.accessTokens.namePlaceholder', {
|
|
79
|
+
defaultValue: 'My integration',
|
|
80
|
+
}), onChange: (e) => setForm((f) => ({ ...f, name: e.target.value })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "token-description", children: t('settings.accessTokens.descriptionLabel', {
|
|
81
|
+
defaultValue: 'Description',
|
|
82
|
+
}) }), _jsx(Input, { id: "token-description", value: form.description ?? '', placeholder: t('settings.accessTokens.descriptionPlaceholder', {
|
|
83
|
+
defaultValue: 'What is this token for?',
|
|
84
|
+
}), onChange: (e) => setForm((f) => ({ ...f, description: e.target.value })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "token-expiration", children: t('settings.accessTokens.expiration', {
|
|
85
|
+
defaultValue: 'Expiration',
|
|
86
|
+
}) }), _jsxs("select", { id: "token-expiration", className: "border-input bg-background w-full rounded-md border px-3 py-2 text-sm", value: form.expirationTime, onChange: (e) => setForm((f) => ({ ...f, expirationTime: e.target.value })), children: [_jsx("option", { value: "7d", children: t('settings.accessTokens.expirationOptions.sevenDays', {
|
|
87
|
+
defaultValue: '7 days',
|
|
88
|
+
}) }), _jsx("option", { value: "30d", children: t('settings.accessTokens.expirationOptions.thirtyDays', {
|
|
89
|
+
defaultValue: '30 days',
|
|
90
|
+
}) }), _jsx("option", { value: "90d", children: t('settings.accessTokens.expirationOptions.ninetyDays', {
|
|
91
|
+
defaultValue: '90 days',
|
|
92
|
+
}) }), _jsx("option", { value: "1y", children: t('settings.accessTokens.expirationOptions.oneYear', {
|
|
93
|
+
defaultValue: '1 year',
|
|
94
|
+
}) })] })] }), _jsx("p", { className: "text-sm font-medium", children: t('settings.accessTokens.scopes', { defaultValue: 'Scopes' }) }), (form.scopes ?? []).map((scope, index) => (_jsxs("div", { className: "flex flex-wrap items-end gap-2", children: [_jsx("select", { className: "border-input bg-background rounded-md border px-2 py-2 text-sm", value: scope.scopeLevel ?? 'read', onChange: (e) => setForm((f) => ({
|
|
95
|
+
...f,
|
|
96
|
+
scopes: (f.scopes ?? []).map((s, i) => i === index
|
|
97
|
+
? { ...s, scopeLevel: e.target.value }
|
|
98
|
+
: s),
|
|
99
|
+
})), children: SCOPE_LEVELS.map((level) => (_jsx("option", { value: level, children: level }, level))) }), _jsx("select", { className: "border-input bg-background rounded-md border px-2 py-2 text-sm", value: scope.resource.type, onChange: (e) => setForm((f) => ({
|
|
100
|
+
...f,
|
|
101
|
+
scopes: (f.scopes ?? []).map((s, i) => i === index
|
|
102
|
+
? {
|
|
103
|
+
...s,
|
|
104
|
+
resource: {
|
|
105
|
+
...s.resource,
|
|
106
|
+
type: e.target
|
|
107
|
+
.value,
|
|
108
|
+
},
|
|
109
|
+
}
|
|
110
|
+
: s),
|
|
111
|
+
})), children: RESOURCE_TYPES.map((type) => (_jsx("option", { value: type, children: type }, type))) }), _jsx(Button, { variant: "outline", disabled: (form.scopes?.length ?? 0) === 1, action: () => setForm((f) => ({
|
|
112
|
+
...f,
|
|
113
|
+
scopes: (f.scopes ?? []).filter((_, i) => i !== index),
|
|
114
|
+
})), children: t('common.remove', { defaultValue: 'Remove' }) })] }, index))), _jsx(Button, { variant: "outline", action: () => setForm((f) => ({
|
|
115
|
+
...f,
|
|
116
|
+
scopes: [
|
|
117
|
+
...(f.scopes ?? []),
|
|
118
|
+
{ scopeLevel: 'read', resource: { type: 'posts', id: '*' } },
|
|
119
|
+
],
|
|
120
|
+
})), children: t('settings.accessTokens.addScope', { defaultValue: 'Add scope' }) }), error ? (_jsx(Toast, { variant: "error", onDismiss: () => setError(undefined), children: error })) : null, _jsx(Button, { variant: "default", disabled: creating, action: create, children: creating
|
|
121
|
+
? t('settings.accessTokens.creating', {
|
|
122
|
+
defaultValue: 'Creating…',
|
|
123
|
+
})
|
|
124
|
+
: t('settings.accessTokens.create', {
|
|
125
|
+
defaultValue: 'Create token',
|
|
126
|
+
}) }), createdToken ? (_jsxs("div", { className: "rounded-md border p-3", children: [_jsx("p", { className: "text-sm font-semibold", children: t('settings.accessTokens.copyWarning', {
|
|
127
|
+
defaultValue: 'Copy this token now. It will not be shown again.',
|
|
128
|
+
}) }), _jsxs("div", { className: "mt-2 flex items-start gap-2", children: [_jsx("code", { className: "break-all text-sm", children: createdToken }), _jsx("button", { type: "button", title: t('settings.accessTokens.copy', {
|
|
129
|
+
defaultValue: 'Copy',
|
|
130
|
+
}), onClick: () => void navigator.clipboard.writeText(createdToken), children: _jsx(Copy, { className: "size-4" }) })] })] })) : null] }), _jsxs("section", { className: "space-y-3 rounded-md border p-4", children: [_jsx("h2", { className: "text-lg font-medium", children: t('settings.accessTokens.listTitle', {
|
|
131
|
+
defaultValue: 'Your tokens',
|
|
132
|
+
}) }), tokens.length === 0 ? (_jsx("p", { className: "text-muted-foreground text-sm", children: t('settings.accessTokens.empty', {
|
|
133
|
+
defaultValue: 'No access tokens yet.',
|
|
134
|
+
}) })) : (tokens.map((token) => (_jsxs("div", { className: "rounded-md border p-3", children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: token.name }), token.description ? (_jsx("p", { className: "text-muted-foreground text-sm", children: token.description })) : null, _jsxs("p", { className: "text-muted-foreground mt-1 text-xs", children: [t('settings.accessTokens.expiresAt', {
|
|
135
|
+
defaultValue: 'Expires',
|
|
136
|
+
}), ":", ' ', token.expiresAt
|
|
137
|
+
? new Date(token.expiresAt).toLocaleString()
|
|
138
|
+
: t('settings.accessTokens.never', {
|
|
139
|
+
defaultValue: 'Never',
|
|
140
|
+
})] })] }), _jsx(Button, { variant: "outline", disabled: !!token.revokedAt, action: () => revokeToken({ accessTokenId: token.id }), children: token.revokedAt
|
|
141
|
+
? t('settings.accessTokens.revoked', {
|
|
142
|
+
defaultValue: 'Revoked',
|
|
143
|
+
})
|
|
144
|
+
: t('settings.accessTokens.revoke', {
|
|
145
|
+
defaultValue: 'Revoke',
|
|
146
|
+
}) })] }), _jsx("div", { className: "mt-2 flex flex-wrap gap-2", children: (token.scopes ?? []).length ? ((token.scopes ?? []).map((scope, scopeIndex) => (_jsx(ShadcnBadge, { variant: "outline", children: scopeLabel(scope) }, scopeIndex)))) : (_jsx("span", { className: "text-muted-foreground text-xs", children: t('settings.accessTokens.noScopes', {
|
|
147
|
+
defaultValue: 'No scopes',
|
|
148
|
+
}) })) })] }, token.id))))] })] }));
|
|
149
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AccountSettings(): import("react/jsx-runtime").JSX.Element;
|