@armoyu/ui 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/layout.d.ts.map +1 -1
- package/dist/app/layout.js +16 -13
- package/dist/app/layout.js.map +1 -1
- package/dist/components/Button.d.ts +7 -7
- package/dist/components/Button.js +15 -15
- package/dist/components/GenderStatsBar.d.ts +5 -5
- package/dist/components/GenderStatsBar.js +7 -7
- package/dist/components/RollingNumber.js +3 -3
- package/dist/components/RollingNumber.js.map +1 -1
- package/dist/components/Slider.d.ts +10 -10
- package/dist/components/Slider.js +35 -35
- package/dist/components/StatsGrid.d.ts +5 -5
- package/dist/components/StatsGrid.js +13 -13
- package/dist/components/ViewModeToggle.d.ts +7 -7
- package/dist/components/ViewModeToggle.js +9 -9
- package/dist/components/modules/auth/Dashboard.d.ts +1 -1
- package/dist/components/modules/auth/Dashboard.js +250 -250
- package/dist/components/modules/auth/MediaLightbox.d.ts +13 -13
- package/dist/components/modules/auth/MediaLightbox.js +46 -46
- package/dist/components/modules/auth/PostCard.d.ts +24 -24
- package/dist/components/modules/auth/PostCard.js +112 -112
- package/dist/components/modules/auth/PostInteractionsModal.d.ts +11 -11
- package/dist/components/modules/auth/PostInteractionsModal.js +12 -12
- package/dist/components/modules/auth/RepostModal.d.ts +21 -21
- package/dist/components/modules/auth/RepostModal.js +75 -75
- package/dist/components/modules/auth/SidebarLeft.d.ts +1 -1
- package/dist/components/modules/auth/SidebarLeft.js +40 -40
- package/dist/components/modules/auth/Stories.d.ts +1 -1
- package/dist/components/modules/auth/Stories.js +15 -15
- package/dist/components/modules/auth/StoryViewer.d.ts +9 -9
- package/dist/components/modules/auth/StoryViewer.js +47 -47
- package/dist/components/modules/chat/ChatContainer.d.ts +1 -1
- package/dist/components/modules/chat/ChatContainer.js +196 -196
- package/dist/components/modules/chat/ChatInput.d.ts +4 -4
- package/dist/components/modules/chat/ChatInput.js +30 -30
- package/dist/components/modules/chat/ChatList.d.ts +6 -6
- package/dist/components/modules/chat/ChatList.js +51 -51
- package/dist/components/modules/chat/ChatMessage.d.ts +11 -11
- package/dist/components/modules/chat/ChatMessage.js +6 -6
- package/dist/components/modules/chat/ChatNotes.d.ts +1 -1
- package/dist/components/modules/chat/ChatNotes.js +11 -11
- package/dist/components/modules/community/GroupHeader.d.ts +10 -10
- package/dist/components/modules/community/GroupHeader.js +17 -17
- package/dist/components/modules/community/GroupMenu.d.ts +9 -9
- package/dist/components/modules/community/GroupMenu.js +16 -16
- package/dist/components/modules/community/SchoolCard.d.ts +6 -6
- package/dist/components/modules/community/SchoolCard.js +7 -7
- package/dist/components/modules/community/SurveyCard.d.ts +6 -6
- package/dist/components/modules/community/SurveyCard.js +35 -35
- package/dist/components/modules/forum/ForumBoard.d.ts +16 -16
- package/dist/components/modules/forum/ForumBoard.js +6 -6
- package/dist/components/modules/forum/ForumPost.d.ts +13 -13
- package/dist/components/modules/forum/ForumPost.js +5 -5
- package/dist/components/modules/forum/NewTopicModal.d.ts +7 -7
- package/dist/components/modules/forum/NewTopicModal.js +26 -26
- package/dist/components/modules/forum/TopicItem.d.ts +15 -15
- package/dist/components/modules/forum/TopicItem.js +6 -6
- package/dist/components/modules/galleries/GalleryCard.d.ts +9 -9
- package/dist/components/modules/galleries/GalleryCard.js +5 -5
- package/dist/components/modules/giveaways/GiveawayCard.d.ts +9 -9
- package/dist/components/modules/giveaways/GiveawayCard.js +6 -6
- package/dist/components/modules/groups/ApplicationModal.d.ts +7 -7
- package/dist/components/modules/groups/ApplicationModal.js +27 -27
- package/dist/components/modules/groups/GroupCard.d.ts +12 -12
- package/dist/components/modules/groups/GroupCard.js +6 -6
- package/dist/components/modules/guest/Introduction.d.ts +1 -1
- package/dist/components/modules/guest/Introduction.js +13 -13
- package/dist/components/modules/magaza/BackToStore.d.ts +1 -1
- package/dist/components/modules/magaza/BackToStore.js +10 -10
- package/dist/components/modules/magaza/StoreHeader.d.ts +5 -5
- package/dist/components/modules/magaza/StoreHeader.js +8 -8
- package/dist/components/modules/news/NewsCard.d.ts +11 -11
- package/dist/components/modules/news/NewsCard.js +6 -6
- package/dist/components/modules/news/NewsComments.d.ts +1 -1
- package/dist/components/modules/news/NewsComments.js +52 -52
- package/dist/components/modules/profile/CloudStorageModal.d.ts +8 -8
- package/dist/components/modules/profile/CloudStorageModal.js +31 -31
- package/dist/components/modules/profile/EditProfileModal.d.ts +8 -8
- package/dist/components/modules/profile/EditProfileModal.js +27 -27
- package/dist/components/modules/profile/ProfileContent.d.ts +4 -4
- package/dist/components/modules/profile/ProfileContent.js +70 -70
- package/dist/components/modules/profile/ProfileHeader.d.ts +7 -7
- package/dist/components/modules/profile/ProfileHeader.js +19 -19
- package/dist/components/modules/profile/ProfileStats.js +1 -1
- package/dist/components/modules/profile/ProfileStats.js.map +1 -1
- package/dist/components/modules/profile/TeamSelectorModal.d.ts +10 -10
- package/dist/components/modules/profile/TeamSelectorModal.js +16 -16
- package/dist/components/modules/stations/StationCard.d.ts +2 -2
- package/dist/components/modules/stations/StationCard.js +25 -25
- package/dist/components/modules/stations/StationQRModal.d.ts +9 -9
- package/dist/components/modules/stations/StationQRModal.js +12 -12
- package/dist/components/shared/FloatingChatButton.d.ts +4 -4
- package/dist/components/shared/FloatingChatButton.js +20 -20
- package/dist/components/shared/Footer.d.ts +1 -1
- package/dist/components/shared/Footer.js +9 -9
- package/dist/components/shared/Header.d.ts +1 -1
- package/dist/components/shared/Header.js +97 -97
- package/dist/components/shared/LoginModal.d.ts +4 -4
- package/dist/components/shared/LoginModal.js +69 -69
- package/dist/components/shared/MainLayoutWrapper.d.ts +3 -3
- package/dist/components/shared/MainLayoutWrapper.js +7 -7
- package/dist/components/shared/PageWidth.d.ts +5 -5
- package/dist/components/shared/PageWidth.js +13 -13
- package/dist/context/AuthContext.d.ts +18 -18
- package/dist/context/AuthContext.js +74 -74
- package/dist/context/CartContext.d.ts +16 -16
- package/dist/context/CartContext.js +63 -63
- package/dist/context/ChatContext.d.ts +12 -12
- package/dist/context/ChatContext.js +17 -17
- package/dist/context/LayoutContext.d.ts +10 -10
- package/dist/context/LayoutContext.js +16 -16
- package/dist/context/SocketContext.d.ts +12 -12
- package/dist/context/SocketContext.js +30 -30
- package/dist/context/ThemeContext.d.ts +10 -10
- package/dist/context/ThemeContext.js +39 -39
- package/dist/index.d.ts +65 -65
- package/dist/index.js +80 -80
- package/dist/lib/constants/educationData.d.ts +7 -7
- package/dist/lib/constants/educationData.js +117 -117
- package/dist/lib/constants/punishmentData.d.ts +29 -29
- package/dist/lib/constants/punishmentData.js +183 -183
- package/dist/lib/constants/seedData.d.ts +164 -164
- package/dist/lib/constants/seedData.js +694 -694
- package/dist/lib/constants/stationData.d.ts +13 -13
- package/dist/lib/constants/stationData.js +166 -166
- package/dist/lib/constants/surveyData.d.ts +2 -2
- package/dist/lib/constants/surveyData.js +49 -49
- package/dist/lib/constants/teamData.d.ts +12 -12
- package/dist/lib/constants/teamData.js +65 -65
- package/dist/types/stats.d.ts +17 -17
- package/dist/types/stats.js +1 -1
- package/next.config.ts +13 -13
- package/package.json +45 -46
- package/postcss.config.js +6 -6
- package/src/app/layout.tsx +67 -64
- package/src/app/page.tsx +101 -101
- package/src/components/RollingNumber.tsx +3 -3
- package/src/components/modules/profile/ProfileStats.tsx +4 -4
- package/src/components/showcase/CommunityTab.tsx +22 -22
- package/src/components/showcase/CorporateTab.tsx +38 -38
- package/src/components/showcase/GeneralTab.tsx +41 -41
- package/src/components/showcase/MessagesTab.tsx +26 -26
- package/src/components/showcase/ProfileTab.tsx +20 -20
- package/src/components/showcase/ShopTab.tsx +24 -24
- package/src/components/showcase/SocialTab.tsx +28 -28
- package/src/globals.css +187 -187
- package/src/lib/utils/numberFormat.ts +16 -16
- package/src/lib/utils/odpUtils.ts +51 -51
- package/src/types/index.ts +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { User } from '@armoyu/core';
|
|
2
|
-
import { PostMedia } from './MediaLightbox';
|
|
3
|
-
interface RepostModalProps {
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
post: {
|
|
7
|
-
id: string;
|
|
8
|
-
author: User;
|
|
9
|
-
content: string;
|
|
10
|
-
media?: PostMedia[];
|
|
11
|
-
createdAt: string;
|
|
12
|
-
stats?: {
|
|
13
|
-
likes: number;
|
|
14
|
-
comments: number;
|
|
15
|
-
reposts?: number;
|
|
16
|
-
shares: number;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export declare function RepostModal({ isOpen, onClose, post }: RepostModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
-
export {};
|
|
1
|
+
import { User } from '@armoyu/core';
|
|
2
|
+
import { PostMedia } from './MediaLightbox';
|
|
3
|
+
interface RepostModalProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
post: {
|
|
7
|
+
id: string;
|
|
8
|
+
author: User;
|
|
9
|
+
content: string;
|
|
10
|
+
media?: PostMedia[];
|
|
11
|
+
createdAt: string;
|
|
12
|
+
stats?: {
|
|
13
|
+
likes: number;
|
|
14
|
+
comments: number;
|
|
15
|
+
reposts?: number;
|
|
16
|
+
shares: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare function RepostModal({ isOpen, onClose, post }: RepostModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
export {};
|
|
22
22
|
//# sourceMappingURL=RepostModal.d.ts.map
|
|
@@ -1,76 +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
|
-
}
|
|
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
76
|
//# sourceMappingURL=RepostModal.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function SidebarLeft(): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function SidebarLeft(): import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=SidebarLeft.d.ts.map
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { useRouter } from 'next/navigation';
|
|
5
|
-
import { useAuth } from '../../../context/AuthContext';
|
|
6
|
-
import { MOCK_RANKING_LEVEL, MOCK_RANKING_POPULARITY } from '../../../lib/constants/seedData';
|
|
7
|
-
export function SidebarLeft() {
|
|
8
|
-
const [rankingType, setRankingType] = useState('level');
|
|
9
|
-
const [visibleCount, setVisibleCount] = useState(5);
|
|
10
|
-
const router = useRouter();
|
|
11
|
-
const { user: currentUser } = useAuth();
|
|
12
|
-
const allRankings = rankingType === 'level' ? MOCK_RANKING_LEVEL : MOCK_RANKING_POPULARITY;
|
|
13
|
-
const currentRanking = allRankings.slice(0, visibleCount);
|
|
14
|
-
const goToProfile = (user) => {
|
|
15
|
-
const params = new URLSearchParams();
|
|
16
|
-
if (user.displayName)
|
|
17
|
-
params.set('name', user.displayName);
|
|
18
|
-
if (user.avatar)
|
|
19
|
-
params.set('avatar', user.avatar);
|
|
20
|
-
router.push(`/oyuncular/${user.username}?${params.toString()}`);
|
|
21
|
-
};
|
|
22
|
-
return (_jsxs("div", { className: "hidden lg:flex w-[280px] flex-col gap-6 animate-in fade-in slide-in-from-left-8 duration-700", children: [_jsxs("div", { className: "glass-panel p-5 rounded-3xl border border-armoyu-card-border bg-armoyu-card-bg flex flex-col gap-4", children: [_jsx("div", { className: "flex items-center justify-center mb-2", children: _jsxs("div", { className: "flex bg-black/5 dark:bg-white/5 p-1 rounded-xl border border-black/5 dark:border-white/5 relative h-9 w-[140px]", children: [_jsx("div", { className: `absolute inset-y-1 transition-all duration-300 ease-out bg-white dark:bg-blue-600 rounded-lg shadow-sm ${rankingType === 'level' ? 'left-1 w-[64px]' : 'left-[73px] w-[62px]'}` }), _jsx("button", { onClick: () => { setRankingType('level'); setVisibleCount(5); }, className: `flex-1 text-[10px] font-black uppercase tracking-wider rounded-lg transition-all relative z-10 ${rankingType === 'level' ? 'text-blue-600 dark:text-white' : 'text-armoyu-text-muted hover:text-armoyu-text'}`, children: "Seviye" }), _jsx("button", { onClick: () => { setRankingType('popularity'); setVisibleCount(5); }, className: `flex-1 text-[10px] font-black uppercase tracking-wider rounded-lg transition-all relative z-10 ${rankingType === 'popularity' ? 'text-blue-600 dark:text-white' : 'text-armoyu-text-muted hover:text-armoyu-text'}`, children: "Pop\u00FCler" })] }) }), _jsx("div", { className: "space-y-3", children: currentRanking.map((user, idx) => {
|
|
23
|
-
const isMe = currentUser?.username === user.username;
|
|
24
|
-
return (_jsxs("div", { onClick: () => goToProfile(user), className: `flex items-center justify-between group cursor-pointer p-1.5 rounded-xl transition-all ${isMe
|
|
25
|
-
? 'bg-blue-600/10 border border-blue-500/30'
|
|
26
|
-
: 'hover:bg-black/5 dark:hover:bg-white/5'}`, children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsxs("div", { className: "relative", children: [_jsx("img", { src: user.avatar, alt: user.displayName, className: "w-9 h-9 rounded-full border border-black/10 dark:border-white/10 group-hover:border-blue-500 transition-colors" }), _jsx("div", { className: `absolute -top-1 -left-1 w-4 h-4 rounded-full flex items-center justify-center text-[8px] font-black text-white shadow-sm transition-transform group-hover:scale-110 ${idx === 0 ? 'bg-yellow-500' :
|
|
27
|
-
idx === 1 ? 'bg-gray-400' :
|
|
28
|
-
idx === 2 ? 'bg-orange-600' :
|
|
29
|
-
'bg-armoyu-card-border text-armoyu-text-muted dark:bg-white/10 dark:text-white/60'}`, children: idx + 1 })] }), _jsx("span", { className: "text-sm font-bold text-armoyu-text-muted group-hover:text-armoyu-text transition-colors truncate max-w-[100px]", children: user.displayName })] }), _jsx("span", { className: "text-[10px] font-black text-blue-500 bg-blue-500/10 px-2 py-1 rounded-md", children: rankingType === 'level' ? user.level : user.popScore })] }, idx));
|
|
30
|
-
}) }), visibleCount < allRankings.length && (_jsxs("button", { onClick: () => setVisibleCount(prev => prev + 10), className: "w-full pt-2 text-[11px] font-bold text-armoyu-text-muted hover:text-blue-500 transition-colors border-t border-armoyu-card-border mt-1", children: ["S\u0131ralamadan ", Math.min(10, allRankings.length - visibleCount), " Ki\u015Fi Daha G\u00F6r"] }))] }), _jsxs("div", { className: "glass-panel p-5 rounded-3xl border border-armoyu-card-border bg-armoyu-card-bg", children: [_jsxs("div", { className: "flex items-center gap-2 mb-4", children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "text-emerald-500", children: _jsx("path", { d: "M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" }) }), _jsx("h3", { className: "font-extrabold text-armoyu-text text-base", children: "Ekonomi" })] }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex items-center justify-between p-3 rounded-2xl bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/5", children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("div", { className: "w-8 h-8 rounded-full bg-emerald-500/10 flex items-center justify-center text-emerald-600 font-black text-xs", children: "USD" }), _jsxs("div", { children: [_jsx("span", { className: "block text-xs font-bold text-armoyu-text", children: "Dolar" }), _jsx("span", { className: "block text-[10px] text-armoyu-text-muted", children: "Merkez Bankas\u0131" })] })] }), _jsxs("div", { className: "text-right", children: [_jsx("span", { className: "block text-sm font-black text-armoyu-text", children: "\u20BA32.45" }), _jsxs("span", { className: "flex items-center justify-end text-[10px] font-bold text-emerald-500", children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", className: "mr-0.5", children: _jsx("polyline", { points: "18 15 12 9 6 15" }) }), "0.24%"] })] })] }), _jsxs("div", { className: "flex items-center justify-between p-3 rounded-2xl bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/5", children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("div", { className: "w-8 h-8 rounded-full bg-yellow-500/10 flex items-center justify-center text-yellow-600 font-black text-xs", children: "AU" }), _jsxs("div", { children: [_jsx("span", { className: "block text-xs font-bold text-armoyu-text", children: "Gram Alt\u0131n" }), _jsx("span", { className: "block text-[10px] text-armoyu-text-muted", children: "Spot Piyasa" })] })] }), _jsxs("div", { className: "text-right", children: [_jsx("span", { className: "block text-sm font-black text-armoyu-text", children: "\u20BA2,450" }), _jsxs("span", { className: "flex items-center justify-end text-[10px] font-bold text-red-500", children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", className: "mr-0.5 rotate-180", children: _jsx("polyline", { points: "18 15 12 9 6 15" }) }), "0.12%"] })] })] }), _jsxs("div", { className: "flex items-center justify-between p-3 rounded-2xl bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/5 font-inter", children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("div", { className: "w-8 h-8 rounded-full bg-slate-400/20 flex items-center justify-center text-slate-500 dark:text-slate-300 font-black text-xs", children: "AG" }), _jsxs("div", { children: [_jsx("span", { className: "block text-xs font-bold text-armoyu-text", children: "G\u00FCm\u00FC\u015F" }), _jsx("span", { className: "block text-[10px] text-armoyu-text-muted", children: "Spot Piyasa" })] })] }), _jsxs("div", { className: "text-right", children: [_jsx("span", { className: "block text-sm font-black text-armoyu-text", children: "\u20BA31.20" }), _jsxs("span", { className: "flex items-center justify-end text-[10px] font-bold text-emerald-500", children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", className: "mr-0.5", children: _jsx("polyline", { points: "18 15 12 9 6 15" }) }), "0.45%"] })] })] })] })] }), _jsxs("div", { className: "glass-panel p-5 rounded-3xl border border-armoyu-card-border bg-armoyu-card-bg", children: [_jsxs("div", { className: "flex items-center gap-2 mb-4", 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", className: "text-blue-500", children: [_jsx("path", { d: "M12 2L2 7l10 5 10-5-10-5z" }), _jsx("path", { d: "M2 17l10 5 10-5" }), _jsx("path", { d: "M2 12l10 5 10-5" })] }), _jsx("h3", { className: "font-extrabold text-armoyu-text text-base", children: "S\u00FCper Lig" })] }), _jsx("div", { className: "space-y-3", children: [
|
|
31
|
-
{ team: 'Galatasaray', p: '84', color: 'bg-red-600' },
|
|
32
|
-
{ team: 'Fenerbahçe', p: '82', color: 'bg-yellow-500' },
|
|
33
|
-
{ team: 'Beşiktaş', p: '65', color: 'bg-black dark:bg-white' },
|
|
34
|
-
{ team: 'Trabzonspor', p: '60', color: 'bg-blue-600' },
|
|
35
|
-
{ team: 'Başakşehir', p: '55', color: 'bg-orange-600' },
|
|
36
|
-
].map((item, idx) => (_jsxs("div", { className: "flex items-center justify-between p-2 rounded-xl hover:bg-black/5 transition-colors", children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("span", { className: "text-[10px] font-black text-armoyu-text-muted w-3", children: idx + 1 }), _jsx("div", { className: `w-1.5 h-1.5 rounded-full ${item.color}` }), _jsx("span", { className: "text-xs font-bold text-armoyu-text", children: item.team })] }), _jsx("span", { className: "text-xs font-black text-armoyu-text", children: item.p })] }, idx))) }), _jsx("button", { className: "w-full pt-3 text-[10px] font-bold text-blue-500 hover:underline border-t border-armoyu-card-border mt-3", children: "T\u00FCm Puan Durumu" })] }), _jsxs("div", { className: "glass-panel p-5 rounded-3xl border border-armoyu-card-border bg-armoyu-card-bg overflow-hidden relative group", children: [_jsx("div", { className: "absolute -right-4 -top-4 w-24 h-24 bg-emerald-500/10 blur-2xl rounded-full group-hover:bg-emerald-500/20 transition-colors" }), _jsxs("div", { className: "flex items-center gap-2 mb-4 relative z-10", children: [_jsx("div", { className: "w-2 h-2 rounded-full bg-emerald-500 animate-pulse" }), _jsx("h3", { className: "font-extrabold text-armoyu-text text-base", children: "Minecraft Sunucu" })] }), _jsxs("div", { className: "space-y-4 relative z-10", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex flex-col", children: [_jsx("span", { className: "text-[10px] font-black uppercase tracking-widest text-armoyu-text-muted opacity-60", children: "Sunucu Adresi" }), _jsx("span", { className: "text-sm font-bold text-armoyu-text group-hover:text-blue-500 transition-colors", children: "mc.armoyu.com" })] }), _jsx("button", { title: "IP Kopyala", className: "p-2 rounded-lg bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/5 hover:bg-black/10 transition-colors", onClick: () => {
|
|
37
|
-
navigator.clipboard.writeText('mc.armoyu.com');
|
|
38
|
-
alert('IP Kopyalandı!');
|
|
39
|
-
}, 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", children: [_jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), _jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })] }) })] }), _jsxs("div", { className: "flex items-center justify-between p-3 rounded-2xl bg-emerald-500/5 border border-emerald-500/10", children: [_jsxs("div", { className: "flex flex-col", children: [_jsx("span", { className: "text-[10px] font-black text-emerald-600 dark:text-emerald-400", children: "Aktif Oyuncu" }), _jsx("span", { className: "text-lg font-black text-emerald-600 dark:text-emerald-400", children: "142 / 500" })] }), _jsxs("div", { className: "flex -space-x-2", children: [[1, 2, 3].map(i => (_jsx("img", { src: `https://api.dicebear.com/7.x/avataaars/svg?seed=${i + 99}`, className: "w-7 h-7 rounded-full border-2 border-white dark:border-[#0a0a0e] bg-white/10 shadow-sm", alt: "Player" }, i))), _jsx("div", { className: "w-7 h-7 rounded-full border-2 border-white dark:border-[#0a0a0e] bg-emerald-500 flex items-center justify-center text-[8px] font-black text-white", children: "+139" })] })] }), _jsx("button", { className: "w-full py-3 bg-gradient-to-r from-emerald-600 to-emerald-500 hover:from-emerald-500 hover:to-emerald-400 text-white text-xs font-black uppercase tracking-widest rounded-xl shadow-lg shadow-emerald-500/20 transition-all active:scale-[0.98]", children: "Sunucuya Giri\u015F Yap" })] })] })] }));
|
|
40
|
-
}
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { useRouter } from 'next/navigation';
|
|
5
|
+
import { useAuth } from '../../../context/AuthContext';
|
|
6
|
+
import { MOCK_RANKING_LEVEL, MOCK_RANKING_POPULARITY } from '../../../lib/constants/seedData';
|
|
7
|
+
export function SidebarLeft() {
|
|
8
|
+
const [rankingType, setRankingType] = useState('level');
|
|
9
|
+
const [visibleCount, setVisibleCount] = useState(5);
|
|
10
|
+
const router = useRouter();
|
|
11
|
+
const { user: currentUser } = useAuth();
|
|
12
|
+
const allRankings = rankingType === 'level' ? MOCK_RANKING_LEVEL : MOCK_RANKING_POPULARITY;
|
|
13
|
+
const currentRanking = allRankings.slice(0, visibleCount);
|
|
14
|
+
const goToProfile = (user) => {
|
|
15
|
+
const params = new URLSearchParams();
|
|
16
|
+
if (user.displayName)
|
|
17
|
+
params.set('name', user.displayName);
|
|
18
|
+
if (user.avatar)
|
|
19
|
+
params.set('avatar', user.avatar);
|
|
20
|
+
router.push(`/oyuncular/${user.username}?${params.toString()}`);
|
|
21
|
+
};
|
|
22
|
+
return (_jsxs("div", { className: "hidden lg:flex w-[280px] flex-col gap-6 animate-in fade-in slide-in-from-left-8 duration-700", children: [_jsxs("div", { className: "glass-panel p-5 rounded-3xl border border-armoyu-card-border bg-armoyu-card-bg flex flex-col gap-4", children: [_jsx("div", { className: "flex items-center justify-center mb-2", children: _jsxs("div", { className: "flex bg-black/5 dark:bg-white/5 p-1 rounded-xl border border-black/5 dark:border-white/5 relative h-9 w-[140px]", children: [_jsx("div", { className: `absolute inset-y-1 transition-all duration-300 ease-out bg-white dark:bg-blue-600 rounded-lg shadow-sm ${rankingType === 'level' ? 'left-1 w-[64px]' : 'left-[73px] w-[62px]'}` }), _jsx("button", { onClick: () => { setRankingType('level'); setVisibleCount(5); }, className: `flex-1 text-[10px] font-black uppercase tracking-wider rounded-lg transition-all relative z-10 ${rankingType === 'level' ? 'text-blue-600 dark:text-white' : 'text-armoyu-text-muted hover:text-armoyu-text'}`, children: "Seviye" }), _jsx("button", { onClick: () => { setRankingType('popularity'); setVisibleCount(5); }, className: `flex-1 text-[10px] font-black uppercase tracking-wider rounded-lg transition-all relative z-10 ${rankingType === 'popularity' ? 'text-blue-600 dark:text-white' : 'text-armoyu-text-muted hover:text-armoyu-text'}`, children: "Pop\u00FCler" })] }) }), _jsx("div", { className: "space-y-3", children: currentRanking.map((user, idx) => {
|
|
23
|
+
const isMe = currentUser?.username === user.username;
|
|
24
|
+
return (_jsxs("div", { onClick: () => goToProfile(user), className: `flex items-center justify-between group cursor-pointer p-1.5 rounded-xl transition-all ${isMe
|
|
25
|
+
? 'bg-blue-600/10 border border-blue-500/30'
|
|
26
|
+
: 'hover:bg-black/5 dark:hover:bg-white/5'}`, children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsxs("div", { className: "relative", children: [_jsx("img", { src: user.avatar, alt: user.displayName, className: "w-9 h-9 rounded-full border border-black/10 dark:border-white/10 group-hover:border-blue-500 transition-colors" }), _jsx("div", { className: `absolute -top-1 -left-1 w-4 h-4 rounded-full flex items-center justify-center text-[8px] font-black text-white shadow-sm transition-transform group-hover:scale-110 ${idx === 0 ? 'bg-yellow-500' :
|
|
27
|
+
idx === 1 ? 'bg-gray-400' :
|
|
28
|
+
idx === 2 ? 'bg-orange-600' :
|
|
29
|
+
'bg-armoyu-card-border text-armoyu-text-muted dark:bg-white/10 dark:text-white/60'}`, children: idx + 1 })] }), _jsx("span", { className: "text-sm font-bold text-armoyu-text-muted group-hover:text-armoyu-text transition-colors truncate max-w-[100px]", children: user.displayName })] }), _jsx("span", { className: "text-[10px] font-black text-blue-500 bg-blue-500/10 px-2 py-1 rounded-md", children: rankingType === 'level' ? user.level : user.popScore })] }, idx));
|
|
30
|
+
}) }), visibleCount < allRankings.length && (_jsxs("button", { onClick: () => setVisibleCount(prev => prev + 10), className: "w-full pt-2 text-[11px] font-bold text-armoyu-text-muted hover:text-blue-500 transition-colors border-t border-armoyu-card-border mt-1", children: ["S\u0131ralamadan ", Math.min(10, allRankings.length - visibleCount), " Ki\u015Fi Daha G\u00F6r"] }))] }), _jsxs("div", { className: "glass-panel p-5 rounded-3xl border border-armoyu-card-border bg-armoyu-card-bg", children: [_jsxs("div", { className: "flex items-center gap-2 mb-4", children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "text-emerald-500", children: _jsx("path", { d: "M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" }) }), _jsx("h3", { className: "font-extrabold text-armoyu-text text-base", children: "Ekonomi" })] }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex items-center justify-between p-3 rounded-2xl bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/5", children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("div", { className: "w-8 h-8 rounded-full bg-emerald-500/10 flex items-center justify-center text-emerald-600 font-black text-xs", children: "USD" }), _jsxs("div", { children: [_jsx("span", { className: "block text-xs font-bold text-armoyu-text", children: "Dolar" }), _jsx("span", { className: "block text-[10px] text-armoyu-text-muted", children: "Merkez Bankas\u0131" })] })] }), _jsxs("div", { className: "text-right", children: [_jsx("span", { className: "block text-sm font-black text-armoyu-text", children: "\u20BA32.45" }), _jsxs("span", { className: "flex items-center justify-end text-[10px] font-bold text-emerald-500", children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", className: "mr-0.5", children: _jsx("polyline", { points: "18 15 12 9 6 15" }) }), "0.24%"] })] })] }), _jsxs("div", { className: "flex items-center justify-between p-3 rounded-2xl bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/5", children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("div", { className: "w-8 h-8 rounded-full bg-yellow-500/10 flex items-center justify-center text-yellow-600 font-black text-xs", children: "AU" }), _jsxs("div", { children: [_jsx("span", { className: "block text-xs font-bold text-armoyu-text", children: "Gram Alt\u0131n" }), _jsx("span", { className: "block text-[10px] text-armoyu-text-muted", children: "Spot Piyasa" })] })] }), _jsxs("div", { className: "text-right", children: [_jsx("span", { className: "block text-sm font-black text-armoyu-text", children: "\u20BA2,450" }), _jsxs("span", { className: "flex items-center justify-end text-[10px] font-bold text-red-500", children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", className: "mr-0.5 rotate-180", children: _jsx("polyline", { points: "18 15 12 9 6 15" }) }), "0.12%"] })] })] }), _jsxs("div", { className: "flex items-center justify-between p-3 rounded-2xl bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/5 font-inter", children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("div", { className: "w-8 h-8 rounded-full bg-slate-400/20 flex items-center justify-center text-slate-500 dark:text-slate-300 font-black text-xs", children: "AG" }), _jsxs("div", { children: [_jsx("span", { className: "block text-xs font-bold text-armoyu-text", children: "G\u00FCm\u00FC\u015F" }), _jsx("span", { className: "block text-[10px] text-armoyu-text-muted", children: "Spot Piyasa" })] })] }), _jsxs("div", { className: "text-right", children: [_jsx("span", { className: "block text-sm font-black text-armoyu-text", children: "\u20BA31.20" }), _jsxs("span", { className: "flex items-center justify-end text-[10px] font-bold text-emerald-500", children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", className: "mr-0.5", children: _jsx("polyline", { points: "18 15 12 9 6 15" }) }), "0.45%"] })] })] })] })] }), _jsxs("div", { className: "glass-panel p-5 rounded-3xl border border-armoyu-card-border bg-armoyu-card-bg", children: [_jsxs("div", { className: "flex items-center gap-2 mb-4", 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", className: "text-blue-500", children: [_jsx("path", { d: "M12 2L2 7l10 5 10-5-10-5z" }), _jsx("path", { d: "M2 17l10 5 10-5" }), _jsx("path", { d: "M2 12l10 5 10-5" })] }), _jsx("h3", { className: "font-extrabold text-armoyu-text text-base", children: "S\u00FCper Lig" })] }), _jsx("div", { className: "space-y-3", children: [
|
|
31
|
+
{ team: 'Galatasaray', p: '84', color: 'bg-red-600' },
|
|
32
|
+
{ team: 'Fenerbahçe', p: '82', color: 'bg-yellow-500' },
|
|
33
|
+
{ team: 'Beşiktaş', p: '65', color: 'bg-black dark:bg-white' },
|
|
34
|
+
{ team: 'Trabzonspor', p: '60', color: 'bg-blue-600' },
|
|
35
|
+
{ team: 'Başakşehir', p: '55', color: 'bg-orange-600' },
|
|
36
|
+
].map((item, idx) => (_jsxs("div", { className: "flex items-center justify-between p-2 rounded-xl hover:bg-black/5 transition-colors", children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("span", { className: "text-[10px] font-black text-armoyu-text-muted w-3", children: idx + 1 }), _jsx("div", { className: `w-1.5 h-1.5 rounded-full ${item.color}` }), _jsx("span", { className: "text-xs font-bold text-armoyu-text", children: item.team })] }), _jsx("span", { className: "text-xs font-black text-armoyu-text", children: item.p })] }, idx))) }), _jsx("button", { className: "w-full pt-3 text-[10px] font-bold text-blue-500 hover:underline border-t border-armoyu-card-border mt-3", children: "T\u00FCm Puan Durumu" })] }), _jsxs("div", { className: "glass-panel p-5 rounded-3xl border border-armoyu-card-border bg-armoyu-card-bg overflow-hidden relative group", children: [_jsx("div", { className: "absolute -right-4 -top-4 w-24 h-24 bg-emerald-500/10 blur-2xl rounded-full group-hover:bg-emerald-500/20 transition-colors" }), _jsxs("div", { className: "flex items-center gap-2 mb-4 relative z-10", children: [_jsx("div", { className: "w-2 h-2 rounded-full bg-emerald-500 animate-pulse" }), _jsx("h3", { className: "font-extrabold text-armoyu-text text-base", children: "Minecraft Sunucu" })] }), _jsxs("div", { className: "space-y-4 relative z-10", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex flex-col", children: [_jsx("span", { className: "text-[10px] font-black uppercase tracking-widest text-armoyu-text-muted opacity-60", children: "Sunucu Adresi" }), _jsx("span", { className: "text-sm font-bold text-armoyu-text group-hover:text-blue-500 transition-colors", children: "mc.armoyu.com" })] }), _jsx("button", { title: "IP Kopyala", className: "p-2 rounded-lg bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/5 hover:bg-black/10 transition-colors", onClick: () => {
|
|
37
|
+
navigator.clipboard.writeText('mc.armoyu.com');
|
|
38
|
+
alert('IP Kopyalandı!');
|
|
39
|
+
}, 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", children: [_jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), _jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })] }) })] }), _jsxs("div", { className: "flex items-center justify-between p-3 rounded-2xl bg-emerald-500/5 border border-emerald-500/10", children: [_jsxs("div", { className: "flex flex-col", children: [_jsx("span", { className: "text-[10px] font-black text-emerald-600 dark:text-emerald-400", children: "Aktif Oyuncu" }), _jsx("span", { className: "text-lg font-black text-emerald-600 dark:text-emerald-400", children: "142 / 500" })] }), _jsxs("div", { className: "flex -space-x-2", children: [[1, 2, 3].map(i => (_jsx("img", { src: `https://api.dicebear.com/7.x/avataaars/svg?seed=${i + 99}`, className: "w-7 h-7 rounded-full border-2 border-white dark:border-[#0a0a0e] bg-white/10 shadow-sm", alt: "Player" }, i))), _jsx("div", { className: "w-7 h-7 rounded-full border-2 border-white dark:border-[#0a0a0e] bg-emerald-500 flex items-center justify-center text-[8px] font-black text-white", children: "+139" })] })] }), _jsx("button", { className: "w-full py-3 bg-gradient-to-r from-emerald-600 to-emerald-500 hover:from-emerald-500 hover:to-emerald-400 text-white text-xs font-black uppercase tracking-widest rounded-xl shadow-lg shadow-emerald-500/20 transition-all active:scale-[0.98]", children: "Sunucuya Giri\u015F Yap" })] })] })] }));
|
|
40
|
+
}
|
|
41
41
|
//# sourceMappingURL=SidebarLeft.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function Stories(): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function Stories(): import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=Stories.d.ts.map
|
|
@@ -1,16 +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 './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
|
-
}
|
|
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 './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
16
|
//# sourceMappingURL=Stories.js.map
|
|
@@ -1,10 +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 {};
|
|
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
10
|
//# sourceMappingURL=StoryViewer.d.ts.map
|
|
@@ -1,48 +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
|
-
}
|
|
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
48
|
//# sourceMappingURL=StoryViewer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function ChatContainer(): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function ChatContainer(): import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=ChatContainer.d.ts.map
|