@armoyu/ui 1.0.7 → 1.0.8
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/app/api/proxy/[...path]/route.d.ts +1 -0
- package/dist/app/api/proxy/[...path]/route.d.ts.map +1 -1
- package/dist/app/api/proxy/[...path]/route.js +39 -3
- package/dist/app/api/proxy/[...path]/route.js.map +1 -1
- package/dist/app/gruplar/[groupId]/page.d.ts +2 -0
- package/dist/app/gruplar/[groupId]/page.d.ts.map +1 -0
- package/dist/app/gruplar/[groupId]/page.js +10 -0
- package/dist/app/gruplar/[groupId]/page.js.map +1 -0
- package/dist/app/layout.d.ts +1 -0
- package/dist/app/layout.d.ts.map +1 -1
- package/dist/app/layout.js +3 -1
- package/dist/app/layout.js.map +1 -1
- package/dist/app/not-found.d.ts +2 -0
- package/dist/app/not-found.d.ts.map +1 -0
- package/dist/app/not-found.js +7 -0
- package/dist/app/not-found.js.map +1 -0
- package/dist/app/page.d.ts.map +1 -1
- package/dist/app/page.js +15 -19
- package/dist/app/page.js.map +1 -1
- package/dist/components/modules/chat/ChatContainer.d.ts.map +1 -1
- package/dist/components/modules/chat/ChatContainer.js +198 -196
- package/dist/components/modules/chat/ChatContainer.js.map +1 -1
- package/dist/components/modules/chat/ChatLayout.d.ts +2 -0
- package/dist/components/modules/chat/ChatLayout.d.ts.map +1 -0
- package/dist/components/modules/chat/ChatLayout.js +190 -0
- package/dist/components/modules/chat/ChatLayout.js.map +1 -0
- package/dist/components/modules/chat/ChatList.d.ts +1 -1
- package/dist/components/modules/chat/ChatList.d.ts.map +1 -1
- package/dist/components/modules/chat/ChatList.js +52 -51
- package/dist/components/modules/chat/ChatList.js.map +1 -1
- package/dist/components/modules/chat/widgets/ChatInput.d.ts +5 -0
- package/dist/components/modules/chat/widgets/ChatInput.d.ts.map +1 -0
- package/dist/components/modules/chat/widgets/ChatInput.js +31 -0
- package/dist/components/modules/chat/widgets/ChatInput.js.map +1 -0
- package/dist/components/modules/chat/widgets/ChatList.d.ts +7 -0
- package/dist/components/modules/chat/widgets/ChatList.d.ts.map +1 -0
- package/dist/components/modules/chat/widgets/ChatList.js +53 -0
- package/dist/components/modules/chat/widgets/ChatList.js.map +1 -0
- package/dist/components/modules/chat/widgets/ChatMessage.d.ts +12 -0
- package/dist/components/modules/chat/widgets/ChatMessage.d.ts.map +1 -0
- package/dist/components/modules/chat/widgets/ChatMessage.js +7 -0
- package/dist/components/modules/chat/widgets/ChatMessage.js.map +1 -0
- package/dist/components/modules/chat/widgets/ChatNotes.d.ts +2 -0
- package/dist/components/modules/chat/widgets/ChatNotes.d.ts.map +1 -0
- package/dist/components/modules/chat/widgets/ChatNotes.js +12 -0
- package/dist/components/modules/chat/widgets/ChatNotes.js.map +1 -0
- package/dist/components/modules/community/CommunityLayout.d.ts +7 -0
- package/dist/components/modules/community/CommunityLayout.d.ts.map +1 -0
- package/dist/components/modules/community/CommunityLayout.js +137 -0
- package/dist/components/modules/community/CommunityLayout.js.map +1 -0
- package/dist/components/modules/community/GroupHeader.d.ts.map +1 -1
- package/dist/components/modules/community/GroupHeader.js +17 -17
- package/dist/components/modules/community/GroupHeader.js.map +1 -1
- package/dist/components/modules/community/GroupProfileContent.d.ts +1 -0
- package/dist/components/modules/community/GroupProfileContent.d.ts.map +1 -1
- package/dist/components/modules/community/GroupProfileContent.js +85 -61
- package/dist/components/modules/community/GroupProfileContent.js.map +1 -1
- package/dist/components/modules/community/widgets/GroupAboutCard.d.ts.map +1 -1
- package/dist/components/modules/community/widgets/GroupAboutCard.js +2 -1
- package/dist/components/modules/community/widgets/GroupAboutCard.js.map +1 -1
- package/dist/components/modules/community/widgets/GroupEventsList.d.ts.map +1 -1
- package/dist/components/modules/community/widgets/GroupEventsList.js +2 -2
- package/dist/components/modules/community/widgets/GroupEventsList.js.map +1 -1
- package/dist/components/modules/community/widgets/GroupFeedSection.d.ts.map +1 -1
- package/dist/components/modules/community/widgets/GroupFeedSection.js +3 -2
- package/dist/components/modules/community/widgets/GroupFeedSection.js.map +1 -1
- package/dist/components/modules/community/widgets/GroupHeader.d.ts +11 -0
- package/dist/components/modules/community/widgets/GroupHeader.d.ts.map +1 -0
- package/dist/components/modules/community/widgets/GroupHeader.js +18 -0
- package/dist/components/modules/community/widgets/GroupHeader.js.map +1 -0
- package/dist/components/modules/community/widgets/GroupMenu.d.ts +10 -0
- package/dist/components/modules/community/widgets/GroupMenu.d.ts.map +1 -0
- package/dist/components/modules/community/widgets/GroupMenu.js +17 -0
- package/dist/components/modules/community/widgets/GroupMenu.js.map +1 -0
- package/dist/components/modules/community/widgets/GroupPermissions.d.ts.map +1 -1
- package/dist/components/modules/community/widgets/GroupPermissions.js +2 -2
- package/dist/components/modules/community/widgets/GroupPermissions.js.map +1 -1
- package/dist/components/modules/community/widgets/GroupStatsGrid.d.ts.map +1 -1
- package/dist/components/modules/community/widgets/GroupStatsGrid.js +8 -6
- package/dist/components/modules/community/widgets/GroupStatsGrid.js.map +1 -1
- package/dist/components/modules/community/widgets/GroupTopMembers.d.ts.map +1 -1
- package/dist/components/modules/community/widgets/GroupTopMembers.js +2 -1
- package/dist/components/modules/community/widgets/GroupTopMembers.js.map +1 -1
- package/dist/components/modules/community/widgets/SchoolCard.d.ts +7 -0
- package/dist/components/modules/community/widgets/SchoolCard.d.ts.map +1 -0
- package/dist/components/modules/community/widgets/SchoolCard.js +8 -0
- package/dist/components/modules/community/widgets/SchoolCard.js.map +1 -0
- package/dist/components/modules/community/widgets/SurveyCard.d.ts +8 -0
- package/dist/components/modules/community/widgets/SurveyCard.d.ts.map +1 -0
- package/dist/components/modules/community/widgets/SurveyCard.js +25 -0
- package/dist/components/modules/community/widgets/SurveyCard.js.map +1 -0
- package/dist/components/modules/forum/widgets/ForumBoard.d.ts +17 -0
- package/dist/components/modules/forum/widgets/ForumBoard.d.ts.map +1 -0
- package/dist/components/modules/forum/widgets/ForumBoard.js +7 -0
- package/dist/components/modules/forum/widgets/ForumBoard.js.map +1 -0
- package/dist/components/modules/forum/widgets/ForumCategoryList.js +1 -1
- package/dist/components/modules/forum/widgets/ForumCategoryList.js.map +1 -1
- package/dist/components/modules/forum/widgets/ForumPost.d.ts +14 -0
- package/dist/components/modules/forum/widgets/ForumPost.d.ts.map +1 -0
- package/dist/components/modules/forum/widgets/ForumPost.js +6 -0
- package/dist/components/modules/forum/widgets/ForumPost.js.map +1 -0
- package/dist/components/modules/forum/widgets/NewTopicModal.d.ts +8 -0
- package/dist/components/modules/forum/widgets/NewTopicModal.d.ts.map +1 -0
- package/dist/components/modules/forum/widgets/NewTopicModal.js +27 -0
- package/dist/components/modules/forum/widgets/NewTopicModal.js.map +1 -0
- package/dist/components/modules/forum/widgets/TopicItem.d.ts +16 -0
- package/dist/components/modules/forum/widgets/TopicItem.d.ts.map +1 -0
- package/dist/components/modules/forum/widgets/TopicItem.js +7 -0
- package/dist/components/modules/forum/widgets/TopicItem.js.map +1 -0
- package/dist/components/modules/galleries/widgets/GalleryCard.d.ts +10 -0
- package/dist/components/modules/galleries/widgets/GalleryCard.d.ts.map +1 -0
- package/dist/components/modules/galleries/widgets/GalleryCard.js +6 -0
- package/dist/components/modules/galleries/widgets/GalleryCard.js.map +1 -0
- package/dist/components/modules/giveaways/widgets/GiveawayCard.d.ts +10 -0
- package/dist/components/modules/giveaways/widgets/GiveawayCard.d.ts.map +1 -0
- package/dist/components/modules/giveaways/widgets/GiveawayCard.js +7 -0
- package/dist/components/modules/giveaways/widgets/GiveawayCard.js.map +1 -0
- package/dist/components/modules/groups/GroupCard.d.ts +13 -12
- package/dist/components/modules/groups/GroupCard.d.ts.map +1 -1
- package/dist/components/modules/groups/GroupCard.js +7 -6
- package/dist/components/modules/groups/GroupCard.js.map +1 -1
- package/dist/components/modules/groups/widgets/ApplicationModal.d.ts +8 -0
- package/dist/components/modules/groups/widgets/ApplicationModal.d.ts.map +1 -0
- package/dist/components/modules/groups/widgets/ApplicationModal.js +28 -0
- package/dist/components/modules/groups/widgets/ApplicationModal.js.map +1 -0
- package/dist/components/modules/groups/widgets/GroupCard.d.ts +14 -0
- package/dist/components/modules/groups/widgets/GroupCard.d.ts.map +1 -0
- package/dist/components/modules/groups/widgets/GroupCard.js +8 -0
- package/dist/components/modules/groups/widgets/GroupCard.js.map +1 -0
- package/dist/components/modules/guest/widgets/Introduction.d.ts +2 -0
- package/dist/components/modules/guest/widgets/Introduction.d.ts.map +1 -0
- package/dist/components/modules/guest/widgets/Introduction.js +15 -0
- package/dist/components/modules/guest/widgets/Introduction.js.map +1 -0
- package/dist/components/modules/news/widgets/NewsCard.d.ts +12 -0
- package/dist/components/modules/news/widgets/NewsCard.d.ts.map +1 -0
- package/dist/components/modules/news/widgets/NewsCard.js +7 -0
- package/dist/components/modules/news/widgets/NewsCard.js.map +1 -0
- package/dist/components/modules/news/widgets/NewsComments.d.ts +4 -0
- package/dist/components/modules/news/widgets/NewsComments.d.ts.map +1 -0
- package/dist/components/modules/news/widgets/NewsComments.js +6 -0
- package/dist/components/modules/news/widgets/NewsComments.js.map +1 -0
- package/dist/components/modules/posts/MediaLightbox.d.ts +14 -0
- package/dist/components/modules/posts/MediaLightbox.d.ts.map +1 -0
- package/dist/components/modules/posts/MediaLightbox.js +47 -0
- package/dist/components/modules/posts/MediaLightbox.js.map +1 -0
- package/dist/components/modules/posts/PostCard.d.ts +26 -0
- package/dist/components/modules/posts/PostCard.d.ts.map +1 -0
- package/dist/components/modules/posts/PostCard.js +116 -0
- package/dist/components/modules/posts/PostCard.js.map +1 -0
- package/dist/components/modules/posts/PostInteractionsModal.d.ts +12 -0
- package/dist/components/modules/posts/PostInteractionsModal.d.ts.map +1 -0
- package/dist/components/modules/posts/PostInteractionsModal.js +13 -0
- package/dist/components/modules/posts/PostInteractionsModal.js.map +1 -0
- package/dist/components/modules/posts/RepostModal.d.ts +22 -0
- package/dist/components/modules/posts/RepostModal.d.ts.map +1 -0
- package/dist/components/modules/posts/RepostModal.js +76 -0
- package/dist/components/modules/posts/RepostModal.js.map +1 -0
- package/dist/components/modules/posts/Stories.d.ts +2 -0
- package/dist/components/modules/posts/Stories.d.ts.map +1 -0
- package/dist/components/modules/posts/Stories.js +16 -0
- package/dist/components/modules/posts/Stories.js.map +1 -0
- package/dist/components/modules/posts/StoryViewer.d.ts +10 -0
- package/dist/components/modules/posts/StoryViewer.d.ts.map +1 -0
- package/dist/components/modules/posts/StoryViewer.js +48 -0
- package/dist/components/modules/posts/StoryViewer.js.map +1 -0
- package/dist/components/modules/posts/reels/ReelCard.d.ts +16 -0
- package/dist/components/modules/posts/reels/ReelCard.d.ts.map +1 -0
- package/dist/components/modules/posts/reels/ReelCard.js +70 -0
- package/dist/components/modules/posts/reels/ReelCard.js.map +1 -0
- package/dist/components/modules/posts/reels/ReelsContainer.d.ts +8 -0
- package/dist/components/modules/posts/reels/ReelsContainer.d.ts.map +1 -0
- package/dist/components/modules/posts/reels/ReelsContainer.js +37 -0
- package/dist/components/modules/posts/reels/ReelsContainer.js.map +1 -0
- package/dist/components/modules/posts/widgets/MediaLightbox.d.ts +14 -0
- package/dist/components/modules/posts/widgets/MediaLightbox.d.ts.map +1 -0
- package/dist/components/modules/posts/widgets/MediaLightbox.js +47 -0
- package/dist/components/modules/posts/widgets/MediaLightbox.js.map +1 -0
- package/dist/components/modules/posts/widgets/PostCard.d.ts +26 -0
- package/dist/components/modules/posts/widgets/PostCard.d.ts.map +1 -0
- package/dist/components/modules/posts/widgets/PostCard.js +116 -0
- package/dist/components/modules/posts/widgets/PostCard.js.map +1 -0
- package/dist/components/modules/posts/widgets/PostInteractionsModal.d.ts +12 -0
- package/dist/components/modules/posts/widgets/PostInteractionsModal.d.ts.map +1 -0
- package/dist/components/modules/posts/widgets/PostInteractionsModal.js +13 -0
- package/dist/components/modules/posts/widgets/PostInteractionsModal.js.map +1 -0
- package/dist/components/modules/posts/widgets/RepostModal.d.ts +22 -0
- package/dist/components/modules/posts/widgets/RepostModal.d.ts.map +1 -0
- package/dist/components/modules/posts/widgets/RepostModal.js +76 -0
- package/dist/components/modules/posts/widgets/RepostModal.js.map +1 -0
- package/dist/components/modules/posts/widgets/Stories.d.ts +2 -0
- package/dist/components/modules/posts/widgets/Stories.d.ts.map +1 -0
- package/dist/components/modules/posts/widgets/Stories.js +16 -0
- package/dist/components/modules/posts/widgets/Stories.js.map +1 -0
- package/dist/components/modules/posts/widgets/StoryViewer.d.ts +10 -0
- package/dist/components/modules/posts/widgets/StoryViewer.d.ts.map +1 -0
- package/dist/components/modules/posts/widgets/StoryViewer.js +48 -0
- package/dist/components/modules/posts/widgets/StoryViewer.js.map +1 -0
- package/dist/components/modules/posts/widgets/reels/ReelCard.d.ts +16 -0
- package/dist/components/modules/posts/widgets/reels/ReelCard.d.ts.map +1 -0
- package/dist/components/modules/posts/widgets/reels/ReelCard.js +55 -0
- package/dist/components/modules/posts/widgets/reels/ReelCard.js.map +1 -0
- package/dist/components/modules/posts/widgets/reels/ReelsContainer.d.ts +8 -0
- package/dist/components/modules/posts/widgets/reels/ReelsContainer.d.ts.map +1 -0
- package/dist/components/modules/posts/widgets/reels/ReelsContainer.js +29 -0
- package/dist/components/modules/posts/widgets/reels/ReelsContainer.js.map +1 -0
- package/dist/components/modules/profile/ProfileLayout.d.ts +5 -0
- package/dist/components/modules/profile/ProfileLayout.d.ts.map +1 -0
- package/dist/components/modules/profile/ProfileLayout.js +71 -0
- package/dist/components/modules/profile/ProfileLayout.js.map +1 -0
- package/dist/components/modules/profile/tabs/PostsTab.js +1 -1
- package/dist/components/modules/profile/tabs/PostsTab.js.map +1 -1
- package/dist/components/modules/profile/widgets/CloudStorageModal.d.ts +9 -0
- package/dist/components/modules/profile/widgets/CloudStorageModal.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/CloudStorageModal.js +32 -0
- package/dist/components/modules/profile/widgets/CloudStorageModal.js.map +1 -0
- package/dist/components/modules/profile/widgets/EditProfileModal.d.ts +9 -0
- package/dist/components/modules/profile/widgets/EditProfileModal.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/EditProfileModal.js +28 -0
- package/dist/components/modules/profile/widgets/EditProfileModal.js.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileHeader.d.ts +8 -0
- package/dist/components/modules/profile/widgets/ProfileHeader.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileHeader.js +20 -0
- package/dist/components/modules/profile/widgets/ProfileHeader.js.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileSidebar.d.ts +11 -0
- package/dist/components/modules/profile/widgets/ProfileSidebar.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileSidebar.js +9 -0
- package/dist/components/modules/profile/widgets/ProfileSidebar.js.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileStats.d.ts +7 -0
- package/dist/components/modules/profile/widgets/ProfileStats.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileStats.js +21 -0
- package/dist/components/modules/profile/widgets/ProfileStats.js.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileTabsArea.d.ts +14 -0
- package/dist/components/modules/profile/widgets/ProfileTabsArea.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/ProfileTabsArea.js +59 -0
- package/dist/components/modules/profile/widgets/ProfileTabsArea.js.map +1 -0
- package/dist/components/modules/profile/widgets/TeamSelectorModal.d.ts +11 -0
- package/dist/components/modules/profile/widgets/TeamSelectorModal.d.ts.map +1 -0
- package/dist/components/modules/profile/widgets/TeamSelectorModal.js +17 -0
- package/dist/components/modules/profile/widgets/TeamSelectorModal.js.map +1 -0
- package/dist/components/modules/shop/BackToStore.d.ts +2 -0
- package/dist/components/modules/shop/BackToStore.d.ts.map +1 -0
- package/dist/components/modules/shop/BackToStore.js +11 -0
- package/dist/components/modules/shop/BackToStore.js.map +1 -0
- package/dist/components/modules/shop/DetailLayout.d.ts +8 -0
- package/dist/components/modules/shop/DetailLayout.d.ts.map +1 -0
- package/dist/components/modules/shop/DetailLayout.js +22 -0
- package/dist/components/modules/shop/DetailLayout.js.map +1 -0
- package/dist/components/modules/shop/ProductCard.d.ts +8 -0
- package/dist/components/modules/shop/ProductCard.d.ts.map +1 -0
- package/dist/components/modules/shop/ProductCard.js +11 -0
- package/dist/components/modules/shop/ProductCard.js.map +1 -0
- package/dist/components/modules/shop/ProductDetailPage.d.ts +8 -0
- package/dist/components/modules/shop/ProductDetailPage.d.ts.map +1 -0
- package/dist/components/modules/shop/ProductDetailPage.js +22 -0
- package/dist/components/modules/shop/ProductDetailPage.js.map +1 -0
- package/dist/components/modules/shop/StoreHeader.d.ts +6 -0
- package/dist/components/modules/shop/StoreHeader.d.ts.map +1 -0
- package/dist/components/modules/shop/StoreHeader.js +9 -0
- package/dist/components/modules/shop/StoreHeader.js.map +1 -0
- package/dist/components/modules/shop/StoreLayout.d.ts +8 -0
- package/dist/components/modules/shop/StoreLayout.d.ts.map +1 -0
- package/dist/components/modules/shop/StoreLayout.js +6 -0
- package/dist/components/modules/shop/StoreLayout.js.map +1 -0
- package/dist/components/modules/shop/widgets/BackToStore.d.ts +2 -0
- package/dist/components/modules/shop/widgets/BackToStore.d.ts.map +1 -0
- package/dist/components/modules/shop/widgets/BackToStore.js +11 -0
- package/dist/components/modules/shop/widgets/BackToStore.js.map +1 -0
- package/dist/components/modules/shop/widgets/CategoryWidget.d.ts +8 -0
- package/dist/components/modules/shop/widgets/CategoryWidget.d.ts.map +1 -0
- package/dist/components/modules/shop/widgets/CategoryWidget.js +23 -0
- package/dist/components/modules/shop/widgets/CategoryWidget.js.map +1 -0
- package/dist/components/modules/shop/widgets/ProductCard.d.ts +8 -0
- package/dist/components/modules/shop/widgets/ProductCard.d.ts.map +1 -0
- package/dist/components/modules/shop/widgets/ProductCard.js +10 -0
- package/dist/components/modules/shop/widgets/ProductCard.js.map +1 -0
- package/dist/components/modules/shop/widgets/StoreHeader.d.ts +6 -0
- package/dist/components/modules/shop/widgets/StoreHeader.d.ts.map +1 -0
- package/dist/components/modules/shop/widgets/StoreHeader.js +9 -0
- package/dist/components/modules/shop/widgets/StoreHeader.js.map +1 -0
- package/dist/components/modules/shop/widgets/StoreProductGrid.d.ts +7 -0
- package/dist/components/modules/shop/widgets/StoreProductGrid.d.ts.map +1 -0
- package/dist/components/modules/shop/widgets/StoreProductGrid.js +13 -0
- package/dist/components/modules/shop/widgets/StoreProductGrid.js.map +1 -0
- package/dist/components/modules/shop/widgets/StoreSidebar.d.ts +8 -0
- package/dist/components/modules/shop/widgets/StoreSidebar.d.ts.map +1 -0
- package/dist/components/modules/shop/widgets/StoreSidebar.js +8 -0
- package/dist/components/modules/shop/widgets/StoreSidebar.js.map +1 -0
- package/dist/components/modules/shop/widgets/StoreTrustBadges.d.ts +2 -0
- package/dist/components/modules/shop/widgets/StoreTrustBadges.d.ts.map +1 -0
- package/dist/components/modules/shop/widgets/StoreTrustBadges.js +29 -0
- package/dist/components/modules/shop/widgets/StoreTrustBadges.js.map +1 -0
- package/dist/components/modules/social/Dashboard.d.ts +2 -0
- package/dist/components/modules/social/Dashboard.d.ts.map +1 -0
- package/dist/components/modules/social/Dashboard.js +251 -0
- package/dist/components/modules/social/Dashboard.js.map +1 -0
- package/dist/components/modules/social/SidebarLeft.d.ts +2 -0
- package/dist/components/modules/social/SidebarLeft.d.ts.map +1 -0
- package/dist/components/modules/social/SidebarLeft.js +9 -0
- package/dist/components/modules/social/SidebarLeft.js.map +1 -0
- package/dist/components/modules/social/SocialLayout.d.ts +2 -0
- package/dist/components/modules/social/SocialLayout.d.ts.map +1 -0
- package/dist/components/modules/social/SocialLayout.js +249 -0
- package/dist/components/modules/social/SocialLayout.js.map +1 -0
- package/dist/components/modules/social/widgets/EconomyWidget.d.ts +2 -0
- package/dist/components/modules/social/widgets/EconomyWidget.d.ts.map +1 -0
- package/dist/components/modules/social/widgets/EconomyWidget.js +38 -0
- package/dist/components/modules/social/widgets/EconomyWidget.js.map +1 -0
- package/dist/components/modules/social/widgets/LeagueWidget.d.ts +2 -0
- package/dist/components/modules/social/widgets/LeagueWidget.d.ts.map +1 -0
- package/dist/components/modules/social/widgets/LeagueWidget.js +36 -0
- package/dist/components/modules/social/widgets/LeagueWidget.js.map +1 -0
- package/dist/components/modules/social/widgets/MinecraftWidget.d.ts +2 -0
- package/dist/components/modules/social/widgets/MinecraftWidget.d.ts.map +1 -0
- package/dist/components/modules/social/widgets/MinecraftWidget.js +36 -0
- package/dist/components/modules/social/widgets/MinecraftWidget.js.map +1 -0
- package/dist/components/modules/social/widgets/RankingWidget.d.ts +5 -0
- package/dist/components/modules/social/widgets/RankingWidget.d.ts.map +1 -0
- package/dist/components/modules/social/widgets/RankingWidget.js +79 -0
- package/dist/components/modules/social/widgets/RankingWidget.js.map +1 -0
- package/dist/components/modules/social/widgets/SocialSidebar.d.ts +2 -0
- package/dist/components/modules/social/widgets/SocialSidebar.d.ts.map +1 -0
- package/dist/components/modules/social/widgets/SocialSidebar.js +9 -0
- package/dist/components/modules/social/widgets/SocialSidebar.js.map +1 -0
- package/dist/components/modules/stations/widgets/StationCard.d.ts +3 -0
- package/dist/components/modules/stations/widgets/StationCard.d.ts.map +1 -0
- package/dist/components/modules/stations/widgets/StationCard.js +26 -0
- package/dist/components/modules/stations/widgets/StationCard.js.map +1 -0
- package/dist/components/modules/stations/widgets/StationQRModal.d.ts +10 -0
- package/dist/components/modules/stations/widgets/StationQRModal.d.ts.map +1 -0
- package/dist/components/modules/stations/widgets/StationQRModal.js +13 -0
- package/dist/components/modules/stations/widgets/StationQRModal.js.map +1 -0
- package/dist/components/shared/FilterTabs.d.ts +16 -0
- package/dist/components/shared/FilterTabs.d.ts.map +1 -0
- package/dist/components/shared/FilterTabs.js +18 -0
- package/dist/components/shared/FilterTabs.js.map +1 -0
- package/dist/components/shared/FloatingChatButton.d.ts.map +1 -1
- package/dist/components/shared/FloatingChatButton.js +20 -20
- package/dist/components/shared/FloatingChatButton.js.map +1 -1
- package/dist/components/shared/ListToolbar.d.ts +32 -0
- package/dist/components/shared/ListToolbar.d.ts.map +1 -0
- package/dist/components/shared/ListToolbar.js +13 -0
- package/dist/components/shared/ListToolbar.js.map +1 -0
- package/dist/components/shared/MainLayoutWrapper.d.ts +2 -1
- package/dist/components/shared/MainLayoutWrapper.d.ts.map +1 -1
- package/dist/components/shared/MainLayoutWrapper.js +7 -7
- package/dist/components/shared/MainLayoutWrapper.js.map +1 -1
- package/dist/components/shared/NotFound.d.ts +21 -0
- package/dist/components/shared/NotFound.d.ts.map +1 -0
- package/dist/components/shared/NotFound.js +7 -0
- package/dist/components/shared/NotFound.js.map +1 -0
- package/dist/components/shared/SearchBar.d.ts +14 -0
- package/dist/components/shared/SearchBar.d.ts.map +1 -0
- package/dist/components/shared/SearchBar.js +21 -0
- package/dist/components/shared/SearchBar.js.map +1 -0
- package/dist/components/showcase/EventsTab.d.ts +2 -0
- package/dist/components/showcase/EventsTab.d.ts.map +1 -0
- package/dist/components/showcase/EventsTab.js +80 -0
- package/dist/components/showcase/EventsTab.js.map +1 -0
- package/dist/components/showcase/GroupTab.d.ts.map +1 -1
- package/dist/components/showcase/GroupTab.js +68 -18
- package/dist/components/showcase/GroupTab.js.map +1 -1
- package/dist/components/showcase/MessagesTab.d.ts.map +1 -1
- package/dist/components/showcase/MessagesTab.js +16 -2
- package/dist/components/showcase/MessagesTab.js.map +1 -1
- package/dist/components/showcase/ProfileTab.d.ts.map +1 -1
- package/dist/components/showcase/ProfileTab.js +7 -2
- package/dist/components/showcase/ProfileTab.js.map +1 -1
- package/dist/components/showcase/ReelsTab.d.ts +2 -0
- package/dist/components/showcase/ReelsTab.d.ts.map +1 -0
- package/dist/components/showcase/ReelsTab.js +34 -0
- package/dist/components/showcase/ReelsTab.js.map +1 -0
- package/dist/components/showcase/ShopTab.d.ts.map +1 -1
- package/dist/components/showcase/ShopTab.js +28 -2
- package/dist/components/showcase/ShopTab.js.map +1 -1
- package/dist/components/showcase/ShowcaseNavigation.d.ts +2 -0
- package/dist/components/showcase/ShowcaseNavigation.d.ts.map +1 -0
- package/dist/components/showcase/ShowcaseNavigation.js +29 -0
- package/dist/components/showcase/ShowcaseNavigation.js.map +1 -0
- package/dist/components/showcase/SocialTab.d.ts.map +1 -1
- package/dist/components/showcase/SocialTab.js +7 -2
- package/dist/components/showcase/SocialTab.js.map +1 -1
- package/dist/context/ChatContext.d.ts +21 -12
- package/dist/context/ChatContext.d.ts.map +1 -1
- package/dist/context/ChatContext.js +95 -17
- package/dist/context/ChatContext.js.map +1 -1
- package/dist/index.d.ts +56 -45
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +55 -47
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/globals.css +5 -5
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import { useAuth } from '../../../../context/AuthContext';
|
|
5
|
+
import { useSocket } from '../../../../context/SocketContext';
|
|
6
|
+
export function RepostModal({ isOpen, onClose, post }) {
|
|
7
|
+
const { user } = useAuth();
|
|
8
|
+
const { emit } = useSocket();
|
|
9
|
+
const [quoteText, setQuoteText] = useState('');
|
|
10
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const handleEsc = (e) => {
|
|
13
|
+
if (e.key === 'Escape')
|
|
14
|
+
onClose();
|
|
15
|
+
};
|
|
16
|
+
window.addEventListener('keydown', handleEsc);
|
|
17
|
+
return () => window.removeEventListener('keydown', handleEsc);
|
|
18
|
+
}, [onClose]);
|
|
19
|
+
const handleRepostSubmit = (e) => {
|
|
20
|
+
e.preventDefault();
|
|
21
|
+
if (!user || isSubmitting)
|
|
22
|
+
return;
|
|
23
|
+
setIsSubmitting(true);
|
|
24
|
+
try {
|
|
25
|
+
// FULL SANITIZATION - Create a completely plain object with NO CLASS INSTANCES
|
|
26
|
+
const sanitizedAuthor = {
|
|
27
|
+
id: user.id || '',
|
|
28
|
+
username: user.username || '',
|
|
29
|
+
displayName: user.displayName || '',
|
|
30
|
+
avatar: user.avatar || '',
|
|
31
|
+
role: user.role ? { name: user.role.name, color: user.role.color } : null,
|
|
32
|
+
verified: !!user.verified
|
|
33
|
+
};
|
|
34
|
+
const sanitizedOriginalAuthor = {
|
|
35
|
+
id: post.author.id || '',
|
|
36
|
+
username: post.author.username || '',
|
|
37
|
+
displayName: post.author.displayName || '',
|
|
38
|
+
avatar: post.author.avatar || '',
|
|
39
|
+
role: post.author.role ? { name: post.author.role.name, color: post.author.role.color } : null,
|
|
40
|
+
verified: !!post.author.verified
|
|
41
|
+
};
|
|
42
|
+
const newPostData = {
|
|
43
|
+
id: 'p-repost-' + Date.now(),
|
|
44
|
+
author: sanitizedAuthor,
|
|
45
|
+
content: quoteText,
|
|
46
|
+
repostOf: {
|
|
47
|
+
id: post.id,
|
|
48
|
+
author: sanitizedOriginalAuthor,
|
|
49
|
+
content: post.content,
|
|
50
|
+
media: post.media || [],
|
|
51
|
+
createdAt: post.createdAt,
|
|
52
|
+
stats: post.stats || { likes: 0, comments: 0, reposts: 0, shares: 0 }
|
|
53
|
+
},
|
|
54
|
+
createdAt: 'Şimdi',
|
|
55
|
+
stats: { likes: 0, comments: 0, reposts: 0, shares: 0 },
|
|
56
|
+
hashtags: quoteText.match(/#\w+/g)?.map(t => t.replace('#', '')) || []
|
|
57
|
+
};
|
|
58
|
+
// Emit safely
|
|
59
|
+
emit('post', newPostData);
|
|
60
|
+
emit('post_repost_count', { postId: post.id });
|
|
61
|
+
setTimeout(() => {
|
|
62
|
+
onClose();
|
|
63
|
+
setQuoteText('');
|
|
64
|
+
setIsSubmitting(false);
|
|
65
|
+
}, 500);
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
console.error('Repost error:', err);
|
|
69
|
+
setIsSubmitting(false);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
if (!isOpen)
|
|
73
|
+
return null;
|
|
74
|
+
return (_jsxs("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [_jsx("div", { className: "absolute inset-0 bg-[#0a0a0f]/90 backdrop-blur-xl animate-in fade-in duration-500", onClick: onClose }), _jsxs("div", { className: "relative w-full max-w-lg glass-panel bg-armoyu-card-bg border border-armoyu-card-border rounded-[40px] shadow-[0_32px_120px_rgba(0,0,0,0.6)] overflow-hidden animate-in zoom-in-95 fade-in duration-500", children: [_jsx("div", { className: "absolute top-0 right-0 w-64 h-64 bg-green-500/10 blur-[100px] rounded-full -mr-32 -mt-32 pointer-events-none" }), _jsx("div", { className: "absolute bottom-0 left-0 w-48 h-48 bg-blue-400/5 blur-[80px] rounded-full -ml-24 -mb-24 pointer-events-none" }), _jsxs("div", { className: "p-8 pb-6 border-b border-armoyu-card-border flex items-center justify-between relative z-10", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-2xl font-black text-armoyu-text uppercase tracking-tighter italic", children: "YEN\u0130DEN PAYLA\u015E" }), _jsx("p", { className: "text-[10px] font-black text-green-500 uppercase tracking-widest mt-1", children: "G\u00D6NDER\u0130Y\u0130 TAK\u0130P\u00C7\u0130LER\u0130NE \u0130LET" })] }), _jsx("button", { onClick: onClose, className: "w-10 h-10 rounded-2xl bg-black/5 dark:bg-white/5 border border-armoyu-card-border flex items-center justify-center hover:bg-black/10 transition-all font-bold", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", children: [_jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), _jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) })] }), _jsxs("div", { className: "p-8 space-y-6 relative z-10", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-[10px] font-black uppercase tracking-widest text-armoyu-text-muted ml-1", children: "F\u0130KR\u0130N\u0130 EKLE (OPS\u0130YONEL)" }), _jsx("textarea", { rows: 3, value: quoteText, onChange: (e) => setQuoteText(e.target.value), placeholder: "Bu g\u00F6nderi hakk\u0131nda ne d\u00FC\u015F\u00FCn\u00FCyorsun?..", className: "w-full bg-black/10 dark:bg-black/20 border border-armoyu-card-border rounded-2xl px-5 py-4 text-armoyu-text placeholder:text-armoyu-text-muted/40 focus:outline-none focus:border-green-500/50 focus:ring-1 focus:ring-green-500/50 transition-all font-medium text-sm no-scrollbar resize-none" })] }), _jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-[10px] font-black uppercase tracking-widest text-armoyu-text-muted ml-1", children: "PAYLA\u015EILAN G\u00D6NDER\u0130" }), _jsxs("div", { className: "p-5 rounded-3xl bg-black/5 dark:bg-white/5 border border-armoyu-card-border", children: [_jsxs("div", { className: "flex items-center gap-3 mb-3", children: [_jsx("img", { src: post.author.avatar, alt: post.author.displayName, className: "w-8 h-8 rounded-full border border-armoyu-card-border" }), _jsxs("div", { children: [_jsx("h4", { className: "text-xs font-black text-armoyu-text leading-tight", children: post.author.displayName }), _jsxs("span", { className: "text-[10px] font-bold text-armoyu-text-muted opacity-60", children: ["@", post.author.username] })] })] }), _jsx("p", { className: "text-xs text-armoyu-text-muted line-clamp-2 leading-relaxed", children: post.content })] })] }), _jsxs("div", { className: "pt-4 space-y-3", children: [_jsx("button", { type: "button", onClick: handleRepostSubmit, disabled: isSubmitting, className: "w-full py-4 bg-green-500 hover:bg-green-400 text-black font-black text-xs uppercase tracking-[0.2em] rounded-2xl shadow-xl shadow-green-500/20 transition-all active:scale-95 flex items-center justify-center gap-2 cursor-pointer disabled:opacity-50", children: isSubmitting ? 'PAYLAŞILIYOR...' : 'YENİDEN PAYLAŞ' }), _jsx("button", { type: "button", onClick: onClose, className: "w-full py-4 text-armoyu-text-muted hover:text-red-500 font-black text-[10px] uppercase tracking-widest transition-colors", children: "\u0130PTAL ET" })] })] })] })] }));
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=RepostModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepostModal.js","sourceRoot":"","sources":["../../../../../src/components/modules/posts/widgets/R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I,0BACE,aAAI,SAAS,EAAC,mDAAmD,YAAE,IAAI,CAAC,MAAM,CAAC,WAAW,GAAM,EAChG,gBAAM,SAAS,EAAC,yDAAyD,kBAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAQ,IACpG,IACF,EACN,YAAG,SAAS,EAAC,6DAA6D,YAAE,IAAI,CAAC,OAAO,GAAK,IACzF,IACF,EAEN,eAAK,SAAS,EAAC,gBAAgB,aAC7B,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAC,yPAAyP,YAElQ,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,gBAAgB,GAC7C,EAET,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,0HAA0H,8BAEnK,IACL,IACF,IACF,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/modules/posts/widgets/Stories.tsx"],"names":[],"mappings":"AAKA,wBAAgB,OAAO,4CAwBtB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { MOCK_STORIES } from '../../../../lib/constants/seedData';
|
|
4
|
+
import { StoryViewer } from '@/components/modules/posts/widgets/StoryViewer';
|
|
5
|
+
export function Stories() {
|
|
6
|
+
const [activeStoryIndex, setActiveStoryIndex] = useState(null);
|
|
7
|
+
return (_jsxs("div", { className: "w-full bg-armoyu-card-bg border border-armoyu-card-border rounded-3xl p-4 shadow-sm overflow-hidden mb-6", children: [_jsx("div", { className: "flex gap-4 overflow-x-auto no-scrollbar pb-1 px-1", children: MOCK_STORIES.map((story, idx) => (_jsx(StoryItem, { story: story, onClick: () => setActiveStoryIndex(idx) }, story.id))) }), activeStoryIndex !== null && (_jsx(StoryViewer, { stories: MOCK_STORIES, initialStoryIndex: activeStoryIndex, onClose: () => setActiveStoryIndex(null) }))] }));
|
|
8
|
+
}
|
|
9
|
+
function StoryItem({ story, onClick }) {
|
|
10
|
+
return (_jsxs("div", { className: "flex flex-col items-center gap-1.5 shrink-0 cursor-pointer group select-none", onClick: onClick, children: [_jsxs("div", { className: "relative", children: [_jsx("div", { className: `p-[3px] rounded-full transition-transform group-hover:scale-105 active:scale-95 ${story.hasUnseen
|
|
11
|
+
? 'bg-gradient-to-tr from-[#f9ce34] via-[#ee2a7b] to-[#6228d7]'
|
|
12
|
+
: story.isMe
|
|
13
|
+
? 'bg-transparent'
|
|
14
|
+
: 'bg-armoyu-card-border'}`, children: _jsx("div", { className: "bg-armoyu-card-bg p-[2px] rounded-full", children: _jsx("img", { src: story.user?.avatar, alt: story.user?.username, className: `w-14 h-14 md:w-16 md:h-16 rounded-full border border-black/5 dark:border-white/10 object-cover ${!story.hasUnseen && !story.isMe ? 'grayscale-[0.5] opacity-80' : ''}` }) }) }), story.isMe && (_jsx("div", { className: "absolute bottom-0 right-0 w-5 h-5 bg-blue-500 rounded-full border-2 border-armoyu-card-bg flex items-center justify-center text-white", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }), _jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" })] }) }))] }), _jsx("span", { className: `text-[11px] md:text-xs font-bold truncate w-16 md:w-20 text-center transition-colors ${story.hasUnseen ? 'text-armoyu-text' : 'text-armoyu-text-muted'}`, children: story.isMe ? 'Hikayen' : story.user?.displayName || story.user?.username })] }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=Stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stories.js","sourceRoot":"","sources":["../../../../../src/components/modules/posts/widgets/Stories.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAG7E,MAAM,UAAU,OAAO;IACrB,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAE9E,OAAO,CACL,eAAK,SAAS,EAAC,0GAA0G,aACvH,cAAK,SAAS,EAAC,mDAAmD,YAC/D,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,KAAC,SAAS,IAER,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,GAAG,CAAC,IAFlC,KAAK,CAAC,EAAE,CAGb,CACH,CAAC,GACE,EAEL,gBAAgB,KAAK,IAAI,IAAI,CAC5B,KAAC,WAAW,IACV,OAAO,EAAE,YAAY,EACrB,iBAAiB,EAAE,gBAAgB,EACnC,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,GACxC,CACH,IACG,CACP,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAyC;IAC1E,OAAO,CACL,eACE,SAAS,EAAC,8EAA8E,EACxF,OAAO,EAAE,OAAO,aAEhB,eAAK,SAAS,EAAC,UAAU,aAEvB,cAAK,SAAS,EAAE,mFAAmF,KAAK,CAAC,SAAS;4BAChH,CAAC,CAAC,6DAA6D;4BAC/D,CAAC,CAAC,KAAK,CAAC,IAAI;gCACV,CAAC,CAAC,gBAAgB;gCAClB,CAAC,CAAC,uBACJ,EAAE,YACF,cAAK,SAAS,EAAC,wCAAwC,YACrD,cACE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EACvB,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,QAAQ,EACzB,SAAS,EAAE,kGAAkG,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,EAAE,EAAE,GAClL,GACE,GACF,EAGL,KAAK,CAAC,IAAI,IAAI,CACb,cAAK,SAAS,EAAC,uIAAuI,YACpJ,eAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,aAAC,eAAM,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,GAAQ,EAAA,eAAM,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,GAAQ,IAAM,GAC5Q,CACP,IACG,EAEN,eAAM,SAAS,EAAE,wFAAwF,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,wBAAwB,EAAE,YACvK,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,IAAI,KAAK,CAAC,IAAI,EAAE,QAAQ,GACpE,IACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Story } from '@armoyu/core';
|
|
3
|
+
interface StoryViewerProps {
|
|
4
|
+
stories: Story[];
|
|
5
|
+
initialStoryIndex: number;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function StoryViewer({ stories, initialStoryIndex, onClose }: StoryViewerProps): React.ReactPortal;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=StoryViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoryViewer.d.ts","sourceRoot":"","sources":["../../../../../src/components/modules/posts/widgets/StoryViewer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAQ,MAAM,cAAc,CAAC;AAE3C,UAAU,gBAAgB;IACxB,OAAO,EAAE,KAAK,EAAE,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,EAAE,gBAAgB,qBAoIpF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import { createPortal } from 'react-dom';
|
|
5
|
+
export function StoryViewer({ stories, initialStoryIndex, onClose }) {
|
|
6
|
+
const [currentIndex, setCurrentIndex] = useState(initialStoryIndex);
|
|
7
|
+
const [progress, setProgress] = useState(0);
|
|
8
|
+
const story = stories[currentIndex];
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
// Reset progress when story changes
|
|
11
|
+
setProgress(0);
|
|
12
|
+
const duration = 5000; // 5 seconds per story
|
|
13
|
+
const interval = 50;
|
|
14
|
+
const step = (interval / duration) * 100;
|
|
15
|
+
const timer = setInterval(() => {
|
|
16
|
+
setProgress((prev) => {
|
|
17
|
+
if (prev >= 100) {
|
|
18
|
+
handleNext();
|
|
19
|
+
return 0;
|
|
20
|
+
}
|
|
21
|
+
return prev + step;
|
|
22
|
+
});
|
|
23
|
+
}, interval);
|
|
24
|
+
return () => clearInterval(timer);
|
|
25
|
+
}, [currentIndex]);
|
|
26
|
+
const handleNext = () => {
|
|
27
|
+
if (currentIndex < stories.length - 1) {
|
|
28
|
+
setCurrentIndex(prev => prev + 1);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
onClose();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const handlePrev = () => {
|
|
35
|
+
if (currentIndex > 0) {
|
|
36
|
+
setCurrentIndex(prev => prev - 1);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
// Scroll kilitleme
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
document.body.style.overflow = 'hidden';
|
|
42
|
+
return () => { document.body.style.overflow = 'unset'; };
|
|
43
|
+
}, []);
|
|
44
|
+
return createPortal(_jsxs("div", { className: "fixed inset-0 z-[9999] bg-black flex items-center justify-center animate-in fade-in duration-300", children: [_jsx("div", { className: "absolute inset-0 overflow-hidden opacity-50", children: _jsx("img", { src: story.media, className: "w-full h-full object-cover blur-3xl scale-110", alt: "" }) }), _jsxs("div", { className: "relative w-full h-full max-w-[450px] md:h-[90%] md:aspect-[9/16] bg-[#1a1a1a] md:rounded-3xl shadow-2xl overflow-hidden flex flex-col", children: [_jsx("div", { className: "absolute top-4 left-4 right-4 z-20 flex gap-1", children: stories.map((_, idx) => (_jsx("div", { className: "h-1 flex-1 bg-white/20 rounded-full overflow-hidden", children: _jsx("div", { className: "h-full bg-white transition-all duration-50", style: {
|
|
45
|
+
width: idx === currentIndex ? `${progress}%` : idx < currentIndex ? '100%' : '0%'
|
|
46
|
+
} }) }, idx))) }), _jsxs("div", { className: "absolute top-8 left-4 right-4 z-20 flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("img", { src: story.user?.avatar, className: "w-9 h-9 rounded-full border border-white/20", alt: "" }), _jsxs("div", { className: "flex flex-col", children: [_jsx("span", { className: "text-white text-sm font-bold shadow-sm", children: story.isMe ? 'Hikayen' : story.user?.displayName || story.user?.username }), _jsx("span", { className: "text-white/60 text-[10px]", children: "2 saat \u00F6nce" })] })] }), _jsx("button", { onClick: onClose, className: "p-2 text-white hover:bg-white/10 rounded-full transition-colors", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), _jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) })] }), _jsxs("div", { className: "flex-1 relative", children: [_jsx("img", { src: story.media, className: "w-full h-full object-cover", alt: "Story Content" }), _jsxs("div", { className: "absolute inset-0 flex", children: [_jsx("div", { className: "w-1/3 h-full cursor-w-resize", onClick: handlePrev }), _jsx("div", { className: "w-2/3 h-full cursor-e-resize", onClick: handleNext })] })] }), _jsxs("div", { className: "p-4 bg-black/40 backdrop-blur-md flex gap-3 items-center", children: [_jsx("input", { type: "text", placeholder: `@${story.user?.username} kişisine yanıt ver...`, className: "flex-1 bg-white/10 border border-white/10 rounded-full px-5 py-2.5 text-sm text-white placeholder-white/50 focus:outline-none focus:bg-white/20 transition-all shadow-sm" }), _jsx("button", { className: "text-white p-2", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" }) }) }), _jsx("button", { className: "text-white p-2", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("line", { x1: "22", y1: "2", x2: "11", y2: "13" }), _jsx("polygon", { points: "22 2 15 22 11 13 2 9 22 2" })] }) })] })] }), _jsxs("div", { className: "hidden md:flex absolute inset-x-0 top-1/2 -translate-y-1/2 justify-between px-10 pointer-events-none", children: [_jsx("button", { onClick: handlePrev, disabled: currentIndex === 0, className: `pointer-events-auto p-4 bg-white/10 hover:bg-white/20 text-white rounded-full backdrop-blur-md transition-all ${currentIndex === 0 ? 'opacity-0 cursor-default' : 'opacity-100'}`, children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: _jsx("polyline", { points: "15 18 9 12 15 6" }) }) }), _jsx("button", { onClick: handleNext, className: "pointer-events-auto p-4 bg-white/10 hover:bg-white/20 text-white rounded-full backdrop-blur-md transition-all", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: _jsx("polyline", { points: "9 18 15 12 9 6" }) }) })] })] }), document.body);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=StoryViewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoryViewer.js","sourceRoot":"","sources":["../../../../../src/components/modules/posts/widgets/StoryViewer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AASzC,MAAM,UAAU,WAAW,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAoB;IACnF,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACpE,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,C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CACd,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { User } from '@armoyu/core';
|
|
2
|
+
export interface ReelCardProps {
|
|
3
|
+
id: string;
|
|
4
|
+
author: User;
|
|
5
|
+
videoUrl: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
songName?: string;
|
|
8
|
+
stats: {
|
|
9
|
+
likes: number;
|
|
10
|
+
comments: number;
|
|
11
|
+
shares: number;
|
|
12
|
+
};
|
|
13
|
+
isActive?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function ReelCard({ id, author, videoUrl, description, songName, stats, isActive }: ReelCardProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=ReelCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReelCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modules/posts/widgets/reels/ReelCard.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,IAAI,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,aAAa,2CA4LvG"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useRef, useEffect } from 'react';
|
|
4
|
+
import { Heart, MessageSquare, Share2, MoreVertical, Music, Play, Volume2, VolumeX } from 'lucide-react';
|
|
5
|
+
import { RollingNumber } from '../../../../RollingNumber';
|
|
6
|
+
export function ReelCard({ id, author, videoUrl, description, songName, stats, isActive }) {
|
|
7
|
+
const [isPlaying, setIsPlaying] = useState(false);
|
|
8
|
+
const [isMuted, setIsMuted] = useState(false);
|
|
9
|
+
const [isLiked, setIsLiked] = useState(false);
|
|
10
|
+
const [showHeartAnim, setShowHeartAnim] = useState(false);
|
|
11
|
+
const [progress, setProgress] = useState(0);
|
|
12
|
+
const videoRef = useRef(null);
|
|
13
|
+
// Handle Play/Pause
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (videoRef.current) {
|
|
16
|
+
if (isActive) {
|
|
17
|
+
videoRef.current.play().catch(() => {
|
|
18
|
+
// Auto-play might be blocked by browser until interaction
|
|
19
|
+
setIsPlaying(false);
|
|
20
|
+
});
|
|
21
|
+
setIsPlaying(true);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
videoRef.current.pause();
|
|
25
|
+
setIsPlaying(false);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}, [isActive]);
|
|
29
|
+
const togglePlay = () => {
|
|
30
|
+
if (videoRef.current) {
|
|
31
|
+
if (isPlaying) {
|
|
32
|
+
videoRef.current.pause();
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
videoRef.current.play();
|
|
36
|
+
}
|
|
37
|
+
setIsPlaying(!isPlaying);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const handleTimeUpdate = () => {
|
|
41
|
+
if (videoRef.current) {
|
|
42
|
+
const p = (videoRef.current.currentTime / videoRef.current.duration) * 100;
|
|
43
|
+
setProgress(p);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const handleDoubleClick = (e) => {
|
|
47
|
+
if (!isLiked) {
|
|
48
|
+
setIsLiked(true);
|
|
49
|
+
}
|
|
50
|
+
setShowHeartAnim(true);
|
|
51
|
+
setTimeout(() => setShowHeartAnim(false), 800);
|
|
52
|
+
};
|
|
53
|
+
return (_jsxs("div", { className: "relative w-full h-full bg-black flex items-center justify-center overflow-hidden", children: [_jsx("video", { ref: videoRef, src: videoUrl, className: "w-full h-full object-cover cursor-pointer", loop: true, muted: isMuted, onClick: togglePlay, onDoubleClick: handleDoubleClick, onTimeUpdate: handleTimeUpdate, playsInline: true }), showHeartAnim && (_jsx("div", { className: "absolute inset-0 flex items-center justify-center z-50 pointer-events-none", children: _jsx(Heart, { fill: "#3b82f6", className: "text-blue-500 w-24 h-24 animate-ping opacity-75" }) })), !isPlaying && (_jsx("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none bg-black/10 transition-opacity", children: _jsx("div", { className: "p-5 bg-black/20 backdrop-blur-md rounded-full text-white/80", children: _jsx(Play, { size: 48, fill: "currentColor" }) }) })), _jsxs("div", { className: "absolute right-3 bottom-24 z-20 flex flex-col items-center gap-6 animate-in slide-in-from-right-4 duration-500", children: [_jsxs("div", { className: "flex flex-col items-center gap-1 group", children: [_jsx("button", { onClick: () => setIsLiked(!isLiked), className: `p-3 rounded-full backdrop-blur-md transition-all active:scale-90 ${isLiked ? 'bg-blue-600 text-white' : 'bg-black/20 text-white hover:bg-black/40'}`, children: _jsx(Heart, { size: 28, fill: isLiked ? "currentColor" : "none" }) }), _jsx("span", { className: "text-xs font-black text-white shadow-sm uppercase tracking-tighter", children: _jsx(RollingNumber, { value: isLiked ? stats.likes + 1 : stats.likes }) })] }), _jsxs("div", { className: "flex flex-col items-center gap-1 group", children: [_jsx("button", { className: "p-3 rounded-full bg-black/20 backdrop-blur-md text-white hover:bg-black/40 transition-all active:scale-90", children: _jsx(MessageSquare, { size: 28 }) }), _jsx("span", { className: "text-xs font-black text-white shadow-sm uppercase tracking-tighter", children: stats.comments })] }), _jsxs("div", { className: "flex flex-col items-center gap-1 group", children: [_jsx("button", { className: "p-3 rounded-full bg-black/20 backdrop-blur-md text-white hover:bg-black/40 transition-all active:scale-90", children: _jsx(Share2, { size: 28 }) }), _jsx("span", { className: "text-xs font-black text-white shadow-sm uppercase tracking-tighter", children: stats.shares })] }), _jsx("button", { className: "p-3 text-white hover:text-blue-400 transition-colors", children: _jsx(MoreVertical, { size: 24 }) }), _jsx("button", { onClick: () => setIsMuted(!isMuted), className: "p-3 rounded-full bg-black/20 backdrop-blur-md text-white hover:bg-black/40 transition-all", children: isMuted ? _jsx(VolumeX, { size: 20 }) : _jsx(Volume2, { size: 20 }) })] }), _jsx("div", { className: "absolute bottom-0 left-0 right-16 z-10 p-5 bg-gradient-to-t from-black/80 via-black/40 to-transparent", children: _jsxs("div", { className: "flex flex-col gap-3 animate-in slide-in-from-bottom-4 duration-500", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("img", { src: author.avatar, className: "w-10 h-10 rounded-full border-2 border-white/50 shadow-md object-cover", alt: author.displayName }), _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-white font-black whitespace-nowrap uppercase tracking-tight italic", children: author.displayName }), author.verified && (_jsx("div", { className: "bg-blue-500 text-white rounded-full p-0.5", children: _jsx("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "currentColor", children: _jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }) }) }))] }), _jsxs("span", { className: "text-white/70 text-xs font-bold", children: ["@", author.username] })] }), _jsx("button", { className: "ml-2 px-4 py-1.5 bg-white text-black text-[10px] font-black rounded-full hover:bg-blue-500 hover:text-white transition-all uppercase tracking-widest shadow-lg active:scale-95", children: "TAK\u0130P ET" })] }), description && (_jsx("p", { className: "text-white/90 text-sm font-medium line-clamp-2 leading-tight", children: description })), _jsxs("div", { className: "flex items-center gap-2 text-white/80", children: [_jsx("div", { className: "animate-spin-slow", children: _jsx(Music, { size: 14 }) }), _jsx("div", { className: "overflow-hidden whitespace-nowrap w-[200px]", children: _jsx("p", { className: "text-xs font-black uppercase tracking-widest animate-marquee inline-block italic", children: songName || 'Orijinal Ses - ARMOYU' }) })] })] }) }), _jsx("div", { className: "absolute bottom-0 left-0 right-0 h-1 bg-white/10 z-30", children: _jsx("div", { className: "h-full bg-blue-500 shadow-[0_0_10px_rgba(59,130,246,0.8)] transition-all duration-300", style: { width: `${progress}%` } }) })] }));
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=ReelCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReelCard.js","sourceRoot":"","sources":["../../../../../../src/components/modules/posts/widgets/reels/ReelCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAS,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAChH,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAgB1D,MAAM,UAAU,QAAQ,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAiB;IACtG,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,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AAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,cAAc,YAAC,eAAM,CAAC,EAAC,6CAA6C,GAAQ,GAAM,GACpI,CACR,IACG,EACN,gBAAM,SAAS,EAAC,iCAAiC,kBAAG,MAAM,CAAC,QAAQ,IAAQ,IACvE,EACN,iBAAQ,SAAS,EAAC,gLAAgL,8BAEzL,IACL,EAGL,WAAW,IAAI,CACd,YAAG,SAAS,EAAC,8DAA8D,YACxE,WAAW,GACV,CACL,EAGD,eAAK,SAAS,EAAC,uCAAuC,aACpD,cAAK,SAAS,EAAC,mBAAmB,YAChC,KAAC,KAAK,IAAC,IAAI,EAAE,EAAE,GAAI,GACf,EACN,cAAK,SAAS,EAAC,6CAA6C,YAC1D,YAAG,SAAS,EAAC,kFAAkF,YAC5F,QAAQ,IAAI,uBAAuB,GAClC,GACA,IACF,IACF,GACF,EAGN,cAAK,SAAS,EAAC,uDAAuD,YACpE,cACE,SAAS,EAAC,uFAAuF,EACjG,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,QAAQ,GAAG,EAAE,GAChC,GACE,IAEF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReelCardProps } from '@/components/modules/posts/widgets/reels/ReelCard';
|
|
2
|
+
interface ReelsContainerProps {
|
|
3
|
+
reels: Omit<ReelCardProps, 'isActive'>[];
|
|
4
|
+
initialReelId?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function ReelsContainer({ reels, initialReelId }: ReelsContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=ReelsContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReelsContainer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modules/posts/widgets/reels/ReelsContainer.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAEjG,UAAU,mBAAmB;IAC3B,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,EAAE,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,mBAAmB,2CA+C3E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect, useRef } from 'react';
|
|
4
|
+
import { ReelCard } from '@/components/modules/posts/widgets/reels/ReelCard';
|
|
5
|
+
export function ReelsContainer({ reels, initialReelId }) {
|
|
6
|
+
const [activeId, setActiveId] = useState(initialReelId || reels[0]?.id);
|
|
7
|
+
const containerRef = useRef(null);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const observerOptions = {
|
|
10
|
+
root: containerRef.current,
|
|
11
|
+
threshold: 0.8, // Must be 80% visible to be considered active
|
|
12
|
+
};
|
|
13
|
+
const handleIntersection = (entries) => {
|
|
14
|
+
entries.forEach((entry) => {
|
|
15
|
+
if (entry.isIntersecting) {
|
|
16
|
+
const id = entry.target.getAttribute('data-reel-id');
|
|
17
|
+
if (id)
|
|
18
|
+
setActiveId(id);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
const observer = new IntersectionObserver(handleIntersection, observerOptions);
|
|
23
|
+
const elements = containerRef.current?.querySelectorAll('[data-reel-id]');
|
|
24
|
+
elements?.forEach((el) => observer.observe(el));
|
|
25
|
+
return () => observer.disconnect();
|
|
26
|
+
}, [reels]);
|
|
27
|
+
return (_jsx("div", { ref: containerRef, className: "w-full h-screen bg-black overflow-y-scroll snap-y snap-mandatory scrollbar-hide", children: reels.map((reel) => (_jsx("div", { "data-reel-id": reel.id, className: "w-full h-full snap-start snap-always shrink-0", children: _jsx(ReelCard, { ...reel, isActive: activeId === reel.id }) }, reel.id))) }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=ReelsContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReelsContainer.js","sourceRoot":"","sources":["../../../../../../src/components/modules/posts/widgets/reels/ReelsContainer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAsB,MAAM,mDAAmD,CAAC;AAOjG,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,aAAa,EAAuB;IAC1E,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,aAAa,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACxE,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,eAAe,GAAG;YACtB,IAAI,EAAE,YAAY,CAAC,OAAO;YAC1B,SAAS,EAAE,GAAG,EAAE,8CAA8C;SAC/D,CAAC;QAEF,MAAM,kBAAkB,GAAG,CAAC,OAAoC,EAAE,EAAE;YAClE,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;gBACxB,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;oBACzB,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;oBACrD,IAAI,EAAE;wBAAE,WAAW,CAAC,EAAE,CAAC,CAAC;gBAC1B,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,MAAM,QAAQ,GAAG,IAAI,oBAAoB,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;QAC/E,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;QAE1E,QAAQ,EAAE,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QAEhD,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACrC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACL,cACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAC,iFAAiF,YAE1F,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,8BAEgB,IAAI,CAAC,EAAE,EACrB,SAAS,EAAC,+CAA+C,YAEzD,KAAC,QAAQ,OACH,IAAI,EACR,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC,EAAE,GAC9B,IAPG,IAAI,CAAC,EAAE,CAQR,CACP,CAAC,GAEE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/modules/profile/ProfileLayout.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAQ,MAAM,cAAc,CAAC;AAgB1C,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,kDAkGtD"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import { User } from '@armoyu/core';
|
|
5
|
+
// Shared Contexts from main index
|
|
6
|
+
import { useAuth, useArmoyu } from '../../../index';
|
|
7
|
+
// Module specific widgets
|
|
8
|
+
import { ProfileHeader } from './widgets/ProfileHeader';
|
|
9
|
+
import { ProfileStats } from './widgets/ProfileStats';
|
|
10
|
+
import { ProfileSidebar } from './widgets/ProfileSidebar';
|
|
11
|
+
import { ProfileTabsArea } from './widgets/ProfileTabsArea';
|
|
12
|
+
import { CloudStorageModal } from './widgets/CloudStorageModal';
|
|
13
|
+
export function ProfileLayout({ user }) {
|
|
14
|
+
const { user: currentUser } = useAuth();
|
|
15
|
+
const { api: armoyuApi } = useArmoyu();
|
|
16
|
+
const [activeTab, setActiveTab] = useState('Kariyer');
|
|
17
|
+
const [isCloudModalOpen, setIsCloudModalOpen] = useState(false);
|
|
18
|
+
const [friends, setFriends] = useState([]);
|
|
19
|
+
const [isLoadingFriends, setIsLoadingFriends] = useState(false);
|
|
20
|
+
const [hasFetchedFriends, setHasFetchedFriends] = useState(false);
|
|
21
|
+
const [friendsPage, setFriendsPage] = useState(1);
|
|
22
|
+
const [hasMoreFriends, setHasMoreFriends] = useState(true);
|
|
23
|
+
// Use currentUser from context if it's our own profile to ensure reactivity
|
|
24
|
+
const isOwnProfile = currentUser?.username === user?.username;
|
|
25
|
+
const displayUser = isOwnProfile ? currentUser : user;
|
|
26
|
+
const fetchFriends = async (isLoadMore = false) => {
|
|
27
|
+
if (!displayUser?.id)
|
|
28
|
+
return;
|
|
29
|
+
setIsLoadingFriends(true);
|
|
30
|
+
try {
|
|
31
|
+
const targetPage = isLoadMore ? friendsPage + 1 : 1;
|
|
32
|
+
const data = await armoyuApi.users.getFriendsList({
|
|
33
|
+
userId: Number(displayUser.id),
|
|
34
|
+
page: targetPage,
|
|
35
|
+
limit: 20
|
|
36
|
+
});
|
|
37
|
+
if (data && Array.isArray(data)) {
|
|
38
|
+
const mappedFriends = data.map((u) => User.fromJSON(u));
|
|
39
|
+
if (isLoadMore) {
|
|
40
|
+
setFriends(prev => [...prev, ...mappedFriends]);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
setFriends(mappedFriends);
|
|
44
|
+
}
|
|
45
|
+
setFriendsPage(targetPage);
|
|
46
|
+
setHasMoreFriends(mappedFriends.length > 0);
|
|
47
|
+
setHasFetchedFriends(true);
|
|
48
|
+
console.log(`[ProfileLayout] Fetched ${mappedFriends.length} friends for ${displayUser.username}, Page: ${targetPage}`);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
setHasMoreFriends(false);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
console.error('[ProfileLayout] Friends fetch error:', error);
|
|
56
|
+
}
|
|
57
|
+
finally {
|
|
58
|
+
setIsLoadingFriends(false);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (activeTab === 'Arkadaşlar' && !hasFetchedFriends) {
|
|
63
|
+
fetchFriends(false);
|
|
64
|
+
}
|
|
65
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
66
|
+
}, [activeTab, hasFetchedFriends, displayUser?.id, armoyuApi]);
|
|
67
|
+
if (!displayUser)
|
|
68
|
+
return null;
|
|
69
|
+
return (_jsxs("div", { className: "max-w-7xl mx-auto px-4 py-8 space-y-8 animate-in fade-in duration-700", children: [_jsx(ProfileHeader, { user: displayUser, isOwnProfile: isOwnProfile }), _jsx(ProfileStats, { user: displayUser }), _jsxs("div", { className: "w-full flex flex-col lg:flex-row gap-8", children: [_jsx("div", { className: "w-full lg:w-80 shrink-0", children: _jsx(ProfileSidebar, { displayUser: displayUser, isOwnProfile: isOwnProfile, friends: friends.length > 0 ? friends : (displayUser?.friends || []), onSeeAllFriends: () => setActiveTab('Arkadaşlar'), onManageCloud: () => setIsCloudModalOpen(true) }) }), _jsx(ProfileTabsArea, { displayUser: displayUser, isOwnProfile: isOwnProfile, activeTab: activeTab, setActiveTab: setActiveTab, friends: friends, hasMoreFriends: hasMoreFriends, isLoadingFriends: isLoadingFriends, onLoadMoreFriends: () => fetchFriends(true) })] }), _jsx(CloudStorageModal, { isOpen: isCloudModalOpen, onClose: () => setIsCloudModalOpen(false) })] }));
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=ProfileLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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ACjD,aAAa,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,GAC9C,GACE,EAGN,KAAC,eAAe,IACd,WAAW,EAAE,WAAkB,EAC/B,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,GAC3C,IAEE,EAEN,KAAC,iBAAiB,IAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,GAAI,IACtF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
|
-
import { PostCard } from '../../
|
|
4
|
+
import { PostCard } from '../../posts/widgets/PostCard';
|
|
5
5
|
import { useArmoyu } from '../../../../context/ArmoyuContext';
|
|
6
6
|
import { useAuth } from '../../../../context/AuthContext';
|
|
7
7
|
export function PostsTab({ user }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostsTab.js","sourceRoot":"","sources":["../../../../../src/components/modules/profile/tabs/PostsTab.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PostsTab.js","sourceRoot":"","sources":["../../../../../src/components/modules/profile/tabs/PostsTab.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC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B,CACjH,CAAC,CAAC,CAAC,mBAAmB,GAChB,GACL,CACP,IACA,CACJ,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CloudStorageModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onSelectMedia?: (url: string, type: 'image' | 'video') => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function CloudStorageModal({ isOpen, onClose, onSelectMedia }: CloudStorageModalProps): React.ReactPortal | null;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=CloudStorageModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloudStorageModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/modules/profile/widgets/CloudStorageModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,UAAU,sBAAsB;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAC,OAAO,KAAK,IAAI,CAAC;CAC9D;AAED,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,sBAAsB,4BA6L3F"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { createPortal } from 'react-dom';
|
|
5
|
+
export function CloudStorageModal({ isOpen, onClose, onSelectMedia }) {
|
|
6
|
+
const [mounted, setMounted] = useState(false);
|
|
7
|
+
const [activeCategory, setActiveCategory] = useState('all'); // Simplified for mock display
|
|
8
|
+
const [dragActive, setDragActive] = useState(false);
|
|
9
|
+
useEffect(() => setMounted(true), []);
|
|
10
|
+
if (!isOpen || !mounted)
|
|
11
|
+
return null;
|
|
12
|
+
// Mock Cloud Files
|
|
13
|
+
const mockFiles = [
|
|
14
|
+
{ id: '1', type: 'image', url: 'https://images.unsplash.com/photo-1542751371-adc38448a05e?q=80&w=2670&auto=format&fit=crop', name: 'Valorant_Clip_1.jpg', size: '2.4 MB', date: '12 Eki' },
|
|
15
|
+
{ id: '2', type: 'video', url: 'https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/720/Big_Buck_Bunny_720_10s_1MB.mp4', name: 'CS2_Aces.mp4', size: '14.1 MB', date: '05 Eki' },
|
|
16
|
+
{ id: '3', type: 'image', url: 'https://images.unsplash.com/photo-1587831990711-23ca6441447b?q=80&w=2698&auto=format&fit=crop', name: 'Setup_Photo.png', size: '4.8 MB', date: '28 Eyl' },
|
|
17
|
+
{ id: '4', type: 'image', url: 'https://images.unsplash.com/photo-1614680376593-902f74cf0d41?q=80&w=2574&auto=format&fit=crop', name: 'Minecraft_Bas...jpg', size: '1.2 MB', date: '15 Eyl' },
|
|
18
|
+
{ id: '5', type: 'image', url: 'https://images.unsplash.com/photo-1498050108023-c5249f4df085?q=80&w=2672&auto=format&fit=crop', name: 'Coding_Session.jpg', size: '3.5 MB', date: '02 Eyl' }
|
|
19
|
+
];
|
|
20
|
+
const filteredFiles = activeCategory === 'all' ? mockFiles : mockFiles.filter(f => f.type === activeCategory);
|
|
21
|
+
// Mock Storage Math
|
|
22
|
+
const storageData = { total: 5000, used: 2400, photos: 1200, videos: 800, audios: 200, documents: 200 };
|
|
23
|
+
const pPhotos = (storageData.photos / storageData.total) * 100;
|
|
24
|
+
const pVideos = (storageData.videos / storageData.total) * 100;
|
|
25
|
+
const pAudios = (storageData.audios / storageData.total) * 100;
|
|
26
|
+
const pDocs = (storageData.documents / storageData.total) * 100;
|
|
27
|
+
const modalContent = (_jsxs("div", { className: "fixed inset-0 z-[9999] p-4 md:p-8 xl:p-12 flex items-center justify-center animate-in fade-in duration-200", children: [_jsx("div", { className: "absolute inset-0 bg-black/80 backdrop-blur-sm", onClick: onClose }), _jsxs("div", { className: "relative w-full max-w-6xl h-full max-h-[85vh] bg-white dark:bg-[#0a0a0e] border border-gray-200 dark:border-white/10 rounded-[2rem] shadow-2xl flex flex-col md:flex-row overflow-hidden animate-in zoom-in-95 duration-300", children: [_jsxs("div", { className: "w-full md:w-64 border-r border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-[#121216] flex flex-col shrink-0", children: [_jsx("div", { className: "p-6 md:p-8 pb-4", children: _jsxs("h2", { className: "text-2xl font-black text-armoyu-text tracking-tight flex items-center gap-3", children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", className: "text-blue-500", children: _jsx("path", { d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" }) }), "Cloud"] }) }), _jsxs("nav", { className: "flex-1 px-4 space-y-1.5 overflow-y-auto hide-scrollbar", children: [_jsxs("button", { onClick: () => setActiveCategory('all'), className: `w-full flex items-center gap-3 px-4 py-3.5 rounded-xl font-bold text-sm transition-all ${activeCategory === 'all' ? 'bg-blue-500 text-white shadow-md shadow-blue-500/20' : 'text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5'}`, children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("rect", { x: "3", y: "3", width: "7", height: "7" }), _jsx("rect", { x: "14", y: "3", width: "7", height: "7" }), _jsx("rect", { x: "14", y: "14", width: "7", height: "7" }), _jsx("rect", { x: "3", y: "14", width: "7", height: "7" })] }), "T\u00FCm\u00FC"] }), _jsxs("button", { onClick: () => setActiveCategory('image'), className: `w-full flex items-center gap-3 px-4 py-3.5 rounded-xl font-bold text-sm transition-all ${activeCategory === 'image' ? 'bg-blue-500 text-white shadow-md shadow-blue-500/20' : 'text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5'}`, children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }), _jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5" }), _jsx("polyline", { points: "21 15 16 10 5 21" })] }), "Foto\u011Fraflar"] }), _jsxs("button", { onClick: () => setActiveCategory('video'), className: `w-full flex items-center gap-3 px-4 py-3.5 rounded-xl font-bold text-sm transition-all ${activeCategory === 'video' ? 'bg-blue-500 text-white shadow-md shadow-blue-500/20' : 'text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5'}`, children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("polygon", { points: "23 7 16 12 23 17 23 7" }), _jsx("rect", { x: "1", y: "5", width: "15", height: "14", rx: "2", ry: "2" })] }), "Videolar"] }), _jsxs("button", { onClick: () => { }, className: `w-full flex items-center gap-3 px-4 py-3.5 rounded-xl font-bold text-sm transition-all text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5`, children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M9 18V5l12-2v13" }), _jsx("circle", { cx: "6", cy: "18", r: "3" }), _jsx("circle", { cx: "18", cy: "16", r: "3" })] }), "Sesler"] })] }), _jsxs("div", { className: "p-6 border-t border-gray-200 dark:border-white/10 hidden md:block group", children: [_jsxs("div", { className: "mb-2 flex justify-between items-end", children: [_jsx("span", { className: "text-xs font-bold text-armoyu-text-muted group-hover:text-armoyu-text transition-colors", children: "Depolama" }), _jsxs("span", { className: "text-xs font-black text-armoyu-text", children: [(storageData.used / 1000).toFixed(1), "GB ", _jsxs("span", { className: "text-[10px] text-armoyu-text-muted font-bold", children: ["/ ", (storageData.total / 1000).toFixed(1), "GB"] })] })] }), _jsxs("div", { className: "w-full h-2.5 bg-black/5 dark:bg-white/10 rounded-full overflow-hidden flex gap-0.5 shadow-inner", children: [_jsx("div", { style: { width: `${pPhotos}%` }, className: "bg-blue-500 h-full", title: "Foto\u011Fraflar" }), _jsx("div", { style: { width: `${pVideos}%` }, className: "bg-purple-500 h-full", title: "Videolar" }), _jsx("div", { style: { width: `${pAudios}%` }, className: "bg-emerald-500 h-full", title: "Sesler" }), _jsx("div", { style: { width: `${pDocs}%` }, className: "bg-orange-500 h-full", title: "Belgeler" })] })] })] }), _jsxs("div", { className: "flex-1 flex flex-col min-w-0 bg-white dark:bg-[#0a0a0e]", children: [_jsxs("div", { className: "flex justify-between items-center p-4 md:px-8 border-b border-gray-200 dark:border-white/10 shrink-0", children: [_jsx("h3", { className: "font-extrabold text-armoyu-text text-lg tracking-tight", children: activeCategory === 'all' ? 'Tüm Dosyalar' :
|
|
28
|
+
activeCategory === 'image' ? 'Fotoğraflar' :
|
|
29
|
+
activeCategory === 'video' ? 'Videolar' : 'Dosyalarım' }), _jsx("button", { onClick: onClose, className: "p-2 rounded-full hover:bg-black/5 dark:hover:bg-white/5 text-armoyu-text-muted transition-colors", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), _jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) })] }), _jsx("div", { className: "flex-1 overflow-y-auto px-4 md:px-8 py-6 hide-scrollbar", children: _jsxs("div", { className: "space-y-8 max-w-5xl mx-auto", children: [_jsxs("div", { className: `border-2 border-dashed rounded-[2rem] p-6 lg:p-8 flex flex-col md:flex-row items-center justify-between gap-6 transition-all group ${dragActive ? 'border-blue-500 bg-blue-500/10' : 'border-black/10 dark:border-white/10 hover:border-blue-500/50 bg-black/5 dark:bg-white/5'}`, onDragEnter: () => setDragActive(true), onDragLeave: () => setDragActive(false), onDragOver: (e) => e.preventDefault(), onDrop: (e) => { e.preventDefault(); setDragActive(false); /* file handle logic */ }, children: [_jsxs("div", { className: "flex items-center gap-5", children: [_jsx("div", { className: "w-16 h-16 rounded-[1.25rem] bg-white dark:bg-[#1a1a24] shadow-[0_4px_20px_rgba(0,0,0,0.05)] dark:shadow-[0_4px_20px_rgba(255,255,255,0.03)] flex flex-shrink-0 items-center justify-center group-hover:scale-105 transition-transform", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", className: "text-blue-500", children: [_jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), _jsx("polyline", { points: "17 8 12 3 7 8" }), _jsx("line", { x1: "12", y1: "3", x2: "12", y2: "15" })] }) }), _jsxs("div", { children: [_jsx("h3", { className: "font-black text-armoyu-text text-lg mb-1", children: "Yeni \u0130\u00E7erik Y\u00FCkle" }), _jsx("p", { className: "text-xs font-bold text-armoyu-text-muted", children: "G\u00F6rsel veya Dosyalar\u0131 S\u00FCr\u00FCkleyin (Maks 100MB)" })] })] }), _jsxs("div", { className: "flex flex-col sm:flex-row gap-3 w-full md:w-auto shrink-0", children: [_jsxs("select", { className: "bg-white dark:bg-[#1a1a24] border border-gray-200 dark:border-white/10 rounded-xl px-4 py-3 text-sm font-bold text-armoyu-text outline-none cursor-pointer focus:border-blue-500 transition-colors shadow-sm", children: [_jsx("option", { value: "image", children: "Foto\u011Fraflar \u0130\u00E7in" }), _jsx("option", { value: "video", children: "Videolar \u0130\u00E7in" }), _jsx("option", { value: "audio", children: "Sesler \u0130\u00E7in" })] }), _jsx("button", { className: "px-6 py-3 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-700 hover:to-blue-600 text-white text-sm font-bold rounded-xl shadow-[0_0_15px_rgba(37,99,235,0.3)] hover:shadow-[0_0_20px_rgba(37,99,235,0.5)] transition-all", children: "Se\u00E7 ve Y\u00FCkle" })] })] }), _jsxs("div", { children: [_jsxs("h4", { className: "text-sm font-bold text-armoyu-text-muted mb-4 uppercase tracking-wider", children: [filteredFiles.length, " \u0130\u00E7erik G\u00F6r\u00FCnt\u00FCleniyor"] }), _jsx("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-4", children: filteredFiles.map(file => (_jsxs("div", { className: "group relative aspect-square rounded-2xl overflow-hidden bg-black/5 dark:bg-white/5 border border-transparent hover:border-blue-500/50 cursor-pointer shadow-sm hover:shadow-lg transition-all", onClick: () => onSelectMedia && onSelectMedia(file.url, file.type), children: [file.type === 'image' ? (_jsx("img", { src: file.url, alt: file.name, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-110" })) : (_jsxs("div", { className: "w-full h-full relative", children: [_jsx("video", { src: file.url, className: "w-full h-full object-cover" }), _jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/20", children: _jsx("div", { className: "w-10 h-10 rounded-full bg-black/50 backdrop-blur-md flex items-center justify-center text-white border border-white/20", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor", children: _jsx("polygon", { points: "5 3 19 12 5 21 5 3" }) }) }) })] })), _jsxs("div", { className: "absolute inset-0 bg-gradient-to-t from-black/90 via-black/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex flex-col justify-end p-4", children: [_jsx("p", { className: "text-white font-bold text-sm truncate mb-0.5", children: file.name }), _jsxs("p", { className: "text-white/70 font-bold text-[10px]", children: [file.size, " \u2022 ", file.date] }), _jsxs("button", { className: "mt-3 w-full py-2 bg-blue-500 hover:bg-blue-600 text-white text-xs font-bold rounded-xl transition-colors shadow-md flex items-center justify-center gap-1.5", onClick: (e) => { e.stopPropagation(); onSelectMedia && onSelectMedia(file.url, file.type); }, children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }), _jsx("polyline", { points: "22 4 12 14.01 9 11.01" })] }), "Payla\u015F\u0131ma Ekle"] })] })] }, file.id))) })] })] }) })] })] })] }));
|
|
30
|
+
return createPortal(modalContent, document.body);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=CloudStorageModal.js.map
|