@armoyu/ui 1.0.0 → 1.0.2
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 +22 -0
- package/dist/app/api/proxy/[...path]/route.d.ts.map +1 -0
- package/dist/app/api/proxy/[...path]/route.js +89 -0
- package/dist/app/api/proxy/[...path]/route.js.map +1 -0
- package/dist/app/layout.js +11 -11
- 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.d.ts +6 -6
- package/dist/components/RollingNumber.js +23 -23
- package/dist/components/Slider.d.ts +10 -10
- package/dist/components/Slider.js +35 -35
- 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.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.js +112 -112
- package/dist/components/modules/auth/PostInteractionsModal.js +12 -12
- package/dist/components/modules/auth/RepostModal.js +75 -75
- package/dist/components/modules/auth/SidebarLeft.js +40 -40
- package/dist/components/modules/auth/Stories.js +15 -15
- package/dist/components/modules/auth/StoryViewer.js +47 -47
- package/dist/components/modules/chat/ChatContainer.js +196 -196
- package/dist/components/modules/chat/ChatInput.js +30 -30
- 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.js +11 -11
- package/dist/components/modules/community/GroupHeader.js +17 -17
- package/dist/components/modules/community/GroupMenu.js +16 -16
- package/dist/components/modules/community/SchoolCard.js +7 -7
- 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.js +13 -13
- package/dist/components/modules/magaza/BackToStore.js +10 -10
- package/dist/components/modules/magaza/StoreHeader.js +8 -8
- package/dist/components/modules/news/NewsCard.js +6 -6
- 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.js +70 -70
- package/dist/components/modules/profile/ProfileHeader.js +19 -19
- package/dist/components/modules/profile/ProfileStats.d.ts +1 -1
- package/dist/components/modules/profile/ProfileStats.js +14 -14
- package/dist/components/modules/profile/TeamSelectorModal.js +16 -16
- package/dist/components/modules/stations/StationCard.js +25 -25
- package/dist/components/modules/stations/StationQRModal.js +12 -12
- 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.js +97 -97
- package/dist/components/shared/LoginModal.d.ts.map +1 -1
- package/dist/components/shared/LoginModal.js +12 -16
- package/dist/components/shared/LoginModal.js.map +1 -1
- 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/components/showcase/SocialTab.d.ts.map +1 -1
- package/dist/components/showcase/SocialTab.js +47 -2
- package/dist/components/showcase/SocialTab.js.map +1 -1
- package/dist/context/AuthContext.d.ts +1 -1
- package/dist/context/AuthContext.d.ts.map +1 -1
- package/dist/context/AuthContext.js +52 -33
- package/dist/context/AuthContext.js.map +1 -1
- 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.js +30 -30
- package/dist/context/ThemeContext.d.ts +10 -10
- package/dist/context/ThemeContext.js +39 -39
- package/dist/index.js +80 -80
- 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.js +694 -694
- package/dist/lib/constants/stationData.js +166 -166
- package/dist/lib/constants/surveyData.js +49 -49
- package/dist/lib/constants/teamData.js +65 -65
- package/dist/types/stats.d.ts +17 -17
- package/dist/types/stats.js +1 -1
- package/package.json +47 -46
- package/src/globals.css +187 -187
- package/next.config.ts +0 -13
- package/postcss.config.js +0 -6
- package/src/app/layout.tsx +0 -64
- package/src/app/page.tsx +0 -101
- package/src/components/Button.tsx +0 -41
- package/src/components/GenderStatsBar.tsx +0 -66
- package/src/components/RollingNumber.tsx +0 -50
- package/src/components/Slider.tsx +0 -114
- package/src/components/StatsGrid.tsx +0 -35
- package/src/components/ViewModeToggle.tsx +0 -39
- package/src/components/modules/auth/Dashboard.tsx +0 -649
- package/src/components/modules/auth/MediaLightbox.tsx +0 -112
- package/src/components/modules/auth/PostCard.tsx +0 -556
- package/src/components/modules/auth/PostInteractionsModal.tsx +0 -138
- package/src/components/modules/auth/RepostModal.tsx +0 -167
- package/src/components/modules/auth/SidebarLeft.tsx +0 -237
- package/src/components/modules/auth/Stories.tsx +0 -69
- package/src/components/modules/auth/StoryViewer.tsx +0 -146
- package/src/components/modules/chat/ChatContainer.tsx +0 -332
- package/src/components/modules/chat/ChatInput.tsx +0 -57
- package/src/components/modules/chat/ChatList.tsx +0 -179
- package/src/components/modules/chat/ChatMessage.tsx +0 -43
- package/src/components/modules/chat/ChatNotes.tsx +0 -58
- package/src/components/modules/community/GroupHeader.tsx +0 -111
- package/src/components/modules/community/GroupMenu.tsx +0 -82
- package/src/components/modules/community/SchoolCard.tsx +0 -104
- package/src/components/modules/community/SurveyCard.tsx +0 -149
- package/src/components/modules/forum/ForumBoard.tsx +0 -78
- package/src/components/modules/forum/ForumPost.tsx +0 -71
- package/src/components/modules/forum/NewTopicModal.tsx +0 -112
- package/src/components/modules/forum/TopicItem.tsx +0 -72
- package/src/components/modules/galleries/GalleryCard.tsx +0 -66
- package/src/components/modules/giveaways/GiveawayCard.tsx +0 -76
- package/src/components/modules/groups/ApplicationModal.tsx +0 -133
- package/src/components/modules/groups/GroupCard.tsx +0 -96
- package/src/components/modules/guest/Introduction.tsx +0 -60
- package/src/components/modules/magaza/BackToStore.tsx +0 -53
- package/src/components/modules/magaza/StoreHeader.tsx +0 -74
- package/src/components/modules/news/NewsCard.tsx +0 -66
- package/src/components/modules/news/NewsComments.tsx +0 -141
- package/src/components/modules/profile/CloudStorageModal.tsx +0 -200
- package/src/components/modules/profile/EditProfileModal.tsx +0 -191
- package/src/components/modules/profile/ProfileContent.tsx +0 -491
- package/src/components/modules/profile/ProfileHeader.tsx +0 -128
- package/src/components/modules/profile/ProfileStats.tsx +0 -72
- package/src/components/modules/profile/TeamSelectorModal.tsx +0 -129
- package/src/components/modules/stations/StationCard.tsx +0 -95
- package/src/components/modules/stations/StationQRModal.tsx +0 -102
- package/src/components/shared/FloatingChatButton.tsx +0 -57
- package/src/components/shared/Footer.tsx +0 -77
- package/src/components/shared/Header.tsx +0 -799
- package/src/components/shared/LoginModal.tsx +0 -208
- package/src/components/shared/MainLayoutWrapper.tsx +0 -15
- package/src/components/shared/PageWidth.tsx +0 -22
- package/src/components/showcase/CommunityTab.tsx +0 -22
- package/src/components/showcase/CorporateTab.tsx +0 -38
- package/src/components/showcase/GeneralTab.tsx +0 -41
- package/src/components/showcase/MessagesTab.tsx +0 -26
- package/src/components/showcase/ProfileTab.tsx +0 -20
- package/src/components/showcase/ShopTab.tsx +0 -24
- package/src/components/showcase/SocialTab.tsx +0 -28
- package/src/context/AuthContext.tsx +0 -104
- package/src/context/CartContext.tsx +0 -93
- package/src/context/ChatContext.tsx +0 -32
- package/src/context/LayoutContext.tsx +0 -29
- package/src/context/SocketContext.tsx +0 -50
- package/src/context/ThemeContext.tsx +0 -52
- package/src/index.ts +0 -96
- package/src/lib/constants/educationData.ts +0 -124
- package/src/lib/constants/punishmentData.ts +0 -201
- package/src/lib/constants/seedData.ts +0 -758
- package/src/lib/constants/stationData.ts +0 -170
- package/src/lib/constants/surveyData.ts +0 -53
- package/src/lib/constants/teamData.ts +0 -69
- package/src/lib/utils/numberFormat.ts +0 -16
- package/src/lib/utils/odpUtils.ts +0 -51
- package/src/types/index.ts +0 -1
- package/src/types/stats.ts +0 -17
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface ChatMessageProps {
|
|
2
|
-
id: string;
|
|
3
|
-
sender: {
|
|
4
|
-
name: string;
|
|
5
|
-
avatar: string;
|
|
6
|
-
isSelf: boolean;
|
|
7
|
-
};
|
|
8
|
-
content: string;
|
|
9
|
-
timestamp: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function ChatMessage({ sender, content, timestamp }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export interface ChatMessageProps {
|
|
2
|
+
id: string;
|
|
3
|
+
sender: {
|
|
4
|
+
name: string;
|
|
5
|
+
avatar: string;
|
|
6
|
+
isSelf: boolean;
|
|
7
|
+
};
|
|
8
|
+
content: string;
|
|
9
|
+
timestamp: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function ChatMessage({ sender, content, timestamp }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
//# sourceMappingURL=ChatMessage.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export function ChatMessage({ sender, content, timestamp }) {
|
|
3
|
-
return (_jsx("div", { className: `flex w-full ${sender.isSelf ? 'justify-end' : 'justify-start'} mb-4`, children: _jsxs("div", { className: `flex gap-3 items-end max-w-[85%] md:max-w-[70%] ${sender.isSelf ? 'flex-row-reverse' : 'flex-row'}`, children: [_jsx("img", { src: sender.avatar, alt: sender.name, className: "w-8 h-8 rounded-full border border-white/10 shadow-sm shrink-0" }), _jsxs("div", { className: `flex flex-col ${sender.isSelf ? 'items-end' : 'items-start'} gap-1.5`, children: [_jsxs("span", { className: "text-xs text-gray-500 font-bold tracking-wide dark:text-gray-400", children: [sender.name, " ", _jsx("span", { className: "opacity-50 mx-1", children: "\u2022" }), " ", timestamp] }), _jsx("div", { className: `p-3.5 rounded-2xl text-sm shadow-lg leading-relaxed font-medium ${sender.isSelf
|
|
4
|
-
? 'bg-gradient-to-br from-blue-600 to-blue-500 text-white rounded-br-sm shadow-[0_4px_15px_rgba(37,99,235,0.3)]'
|
|
5
|
-
: 'bg-black/5 dark:bg-[#1a1a24] text-armoyu-text rounded-bl-sm border border-black/5 dark:border-white/5'}`, children: content })] })] }) }));
|
|
6
|
-
}
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function ChatMessage({ sender, content, timestamp }) {
|
|
3
|
+
return (_jsx("div", { className: `flex w-full ${sender.isSelf ? 'justify-end' : 'justify-start'} mb-4`, children: _jsxs("div", { className: `flex gap-3 items-end max-w-[85%] md:max-w-[70%] ${sender.isSelf ? 'flex-row-reverse' : 'flex-row'}`, children: [_jsx("img", { src: sender.avatar, alt: sender.name, className: "w-8 h-8 rounded-full border border-white/10 shadow-sm shrink-0" }), _jsxs("div", { className: `flex flex-col ${sender.isSelf ? 'items-end' : 'items-start'} gap-1.5`, children: [_jsxs("span", { className: "text-xs text-gray-500 font-bold tracking-wide dark:text-gray-400", children: [sender.name, " ", _jsx("span", { className: "opacity-50 mx-1", children: "\u2022" }), " ", timestamp] }), _jsx("div", { className: `p-3.5 rounded-2xl text-sm shadow-lg leading-relaxed font-medium ${sender.isSelf
|
|
4
|
+
? 'bg-gradient-to-br from-blue-600 to-blue-500 text-white rounded-br-sm shadow-[0_4px_15px_rgba(37,99,235,0.3)]'
|
|
5
|
+
: 'bg-black/5 dark:bg-[#1a1a24] text-armoyu-text rounded-bl-sm border border-black/5 dark:border-white/5'}`, children: content })] })] }) }));
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=ChatMessage.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { MOCK_NOTES } from '../../../lib/constants/seedData';
|
|
4
|
-
export function ChatNotes() {
|
|
5
|
-
return (_jsx("div", { className: "w-full px-4 py-6 border-b border-black/5 dark:border-white/5", children: _jsx("div", { className: "flex gap-4 overflow-x-auto no-scrollbar pb-1 px-1", children: MOCK_NOTES.map((note) => (_jsx(NoteItem, { note: note }, note.id))) }) }));
|
|
6
|
-
}
|
|
7
|
-
function NoteItem({ note }) {
|
|
8
|
-
return (_jsxs("div", { className: "flex flex-col items-center shrink-0 cursor-pointer group relative", children: [_jsxs("div", { className: "relative mb-3 flex flex-col items-center", children: [_jsxs("div", { className: `relative px-3 py-1.5 rounded-2xl text-[10px] font-bold max-w-[85px] transition-all group-hover:-translate-y-1 shadow-sm border border-black/5 dark:border-white/10 ${note.isMe
|
|
9
|
-
? 'bg-white dark:bg-white/10 text-armoyu-text-muted italic'
|
|
10
|
-
: 'bg-white dark:bg-white/20 text-armoyu-text animate-in zoom-in duration-500'}`, children: [_jsx("p", { className: "truncate line-clamp-2 text-center leading-tight", children: note.note }), _jsx("div", { className: "absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 rotate-45 border-r border-b border-black/5 dark:border-white/10 bg-inherit" })] }), _jsxs("div", { className: "mt-1 relative", children: [_jsx("img", { src: note.user?.avatar, alt: note.user?.username, className: "w-11 h-11 md:w-12 md:h-12 rounded-full border-2 border-white dark:border-white/10 shadow-sm" }), note.isMe && (_jsx("div", { className: "absolute -top-1 -right-1 w-4 h-4 bg-gray-200 dark:bg-zinc-800 rounded-full border-2 border-white dark:border-zinc-900 flex items-center justify-center text-[10px] font-bold text-gray-600 dark:text-gray-400", children: "+" }))] })] }), _jsx("span", { className: `text-[10px] text-armoyu-text-muted font-medium truncate w-14 text-center ${note.isMe ? 'italic' : ''}`, children: note.isMe ? 'Hikayen' : note.user?.displayName || note.user?.username })] }));
|
|
11
|
-
}
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { MOCK_NOTES } from '../../../lib/constants/seedData';
|
|
4
|
+
export function ChatNotes() {
|
|
5
|
+
return (_jsx("div", { className: "w-full px-4 py-6 border-b border-black/5 dark:border-white/5", children: _jsx("div", { className: "flex gap-4 overflow-x-auto no-scrollbar pb-1 px-1", children: MOCK_NOTES.map((note) => (_jsx(NoteItem, { note: note }, note.id))) }) }));
|
|
6
|
+
}
|
|
7
|
+
function NoteItem({ note }) {
|
|
8
|
+
return (_jsxs("div", { className: "flex flex-col items-center shrink-0 cursor-pointer group relative", children: [_jsxs("div", { className: "relative mb-3 flex flex-col items-center", children: [_jsxs("div", { className: `relative px-3 py-1.5 rounded-2xl text-[10px] font-bold max-w-[85px] transition-all group-hover:-translate-y-1 shadow-sm border border-black/5 dark:border-white/10 ${note.isMe
|
|
9
|
+
? 'bg-white dark:bg-white/10 text-armoyu-text-muted italic'
|
|
10
|
+
: 'bg-white dark:bg-white/20 text-armoyu-text animate-in zoom-in duration-500'}`, children: [_jsx("p", { className: "truncate line-clamp-2 text-center leading-tight", children: note.note }), _jsx("div", { className: "absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 rotate-45 border-r border-b border-black/5 dark:border-white/10 bg-inherit" })] }), _jsxs("div", { className: "mt-1 relative", children: [_jsx("img", { src: note.user?.avatar, alt: note.user?.username, className: "w-11 h-11 md:w-12 md:h-12 rounded-full border-2 border-white dark:border-white/10 shadow-sm" }), note.isMe && (_jsx("div", { className: "absolute -top-1 -right-1 w-4 h-4 bg-gray-200 dark:bg-zinc-800 rounded-full border-2 border-white dark:border-zinc-900 flex items-center justify-center text-[10px] font-bold text-gray-600 dark:text-gray-400", children: "+" }))] })] }), _jsx("span", { className: `text-[10px] text-armoyu-text-muted font-medium truncate w-14 text-center ${note.isMe ? 'italic' : ''}`, children: note.isMe ? 'Hikayen' : note.user?.displayName || note.user?.username })] }));
|
|
11
|
+
}
|
|
12
12
|
//# sourceMappingURL=ChatNotes.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useRef, useEffect } from 'react';
|
|
3
|
-
export function GroupHeader({ group, isMember, onJoin, onLeave, onReport }) {
|
|
4
|
-
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
5
|
-
const menuRef = useRef(null);
|
|
6
|
-
// Close menu on click outside
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
function handleClickOutside(event) {
|
|
9
|
-
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
10
|
-
setIsMenuOpen(false);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
14
|
-
return () => document.removeEventListener('mousedown', handleClickOutside);
|
|
15
|
-
}, []);
|
|
16
|
-
return (_jsxs("div", { className: "relative h-64 md:h-80 lg:h-96 rounded-[60px] overflow-hidden mb-12 shadow-2xl animate-in fade-in slide-in-from-top-4 duration-700", children: [_jsx("img", { src: group.banner, className: "w-full h-full object-cover", alt: group.name }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/90 via-black/30 to-transparent" }), _jsxs("div", { className: "absolute bottom-10 left-10 right-10 flex flex-col md:flex-row items-end justify-between gap-6", children: [_jsxs("div", { className: "flex items-center gap-6", children: [_jsxs("div", { className: "relative", children: [_jsx("img", { src: group.logo, className: "w-24 h-24 md:w-32 md:h-32 rounded-[32px] border-4 border-armoyu-bg bg-white dark:bg-zinc-900 shadow-2xl object-cover", alt: "Logo" }), _jsx("div", { className: "absolute -bottom-2 -right-2 bg-blue-500 text-white p-2 rounded-xl border-4 border-armoyu-bg", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", children: _jsx("polyline", { points: "20 6 9 17 4 12" }) }) })] }), _jsxs("div", { className: "mb-2 text-left", children: [_jsxs("div", { className: "flex items-center gap-3 mb-1", children: [_jsx("h1", { className: "text-3xl md:text-5xl font-black text-white uppercase tracking-tighter italic drop-shadow-lg", children: group.name }), _jsx("span", { className: "px-3 py-1 bg-blue-600 text-white text-[10px] font-black uppercase tracking-widest rounded-lg shadow-lg", children: group.category })] }), _jsxs("p", { className: "text-white/70 font-bold text-lg uppercase tracking-tight", children: ["@", group.shortName, " \u2022 ", group.recruitment] })] })] }), _jsxs("div", { className: "flex gap-4 mb-2 relative", ref: menuRef, children: [!isMember && (_jsx("button", { onClick: onJoin, className: "px-10 py-4 bg-white text-blue-600 font-black text-xs uppercase tracking-[0.2em] rounded-2xl shadow-2xl hover:scale-105 active:scale-95 transition-all", children: "GRUBA KATIL" })), _jsx("button", { onClick: () => setIsMenuOpen(!isMenuOpen), className: `px-4 py-4 ${isMenuOpen ? 'bg-blue-600' : 'bg-white/10 backdrop-blur-md'} border border-white/20 text-white rounded-2xl hover:bg-white/20 transition-all group`, children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: `${isMenuOpen ? 'rotate-90' : 'group-hover:rotate-12'} transition-transform`, children: [_jsx("circle", { cx: "12", cy: "12", r: "1" }), _jsx("circle", { cx: "19", cy: "12", r: "1" }), _jsx("circle", { cx: "5", cy: "12", r: "1" })] }) }), isMenuOpen && (_jsx("div", { className: "absolute bottom-full right-0 mb-4 w-56 glass-panel p-3 rounded-2xl border border-white/20 bg-black/80 backdrop-blur-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 z-50", children: _jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("button", { className: "flex items-center gap-3 w-full p-3 rounded-xl hover:bg-white/10 text-white transition-all group text-left", children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "text-white/50 group-hover:text-white transition-colors", children: [_jsx("path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" }), _jsx("polyline", { points: "16 6 12 2 8 6" }), _jsx("line", { x1: "12", y1: "2", x2: "12", y2: "15" })] }), _jsx("span", { className: "text-[10px] font-black uppercase tracking-widest", children: "Grubu Payla\u015F" })] }), _jsxs("button", { onClick: () => { onReport?.(); setIsMenuOpen(false); }, className: "flex items-center gap-3 w-full p-3 rounded-xl hover:bg-red-500/10 text-red-500 transition-all group text-left", children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "text-red-500/50 group-hover:text-red-500 transition-colors", children: [_jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }), _jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }), _jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })] }), _jsx("span", { className: "text-[10px] font-black uppercase tracking-widest", children: "Grubu \u015Eikayet Et" })] }), isMember && (_jsxs(_Fragment, { children: [_jsx("div", { className: "h-px bg-white/10 my-1 mx-2" }), _jsxs("button", { onClick: () => { onLeave?.(); setIsMenuOpen(false); }, className: "flex items-center gap-3 w-full p-3 rounded-xl hover:bg-red-600 text-white transition-all group text-left bg-red-600/20", children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "text-white/70 group-hover:text-white transition-colors", children: [_jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }), _jsx("polyline", { points: "16 17 21 12 16 7" }), _jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })] }), _jsx("span", { className: "text-[10px] font-black uppercase tracking-widest", children: "Gruptan Ayr\u0131l" })] })] }))] }) }))] })] })] }));
|
|
17
|
-
}
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef, useEffect } from 'react';
|
|
3
|
+
export function GroupHeader({ group, isMember, onJoin, onLeave, onReport }) {
|
|
4
|
+
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
5
|
+
const menuRef = useRef(null);
|
|
6
|
+
// Close menu on click outside
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
function handleClickOutside(event) {
|
|
9
|
+
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
10
|
+
setIsMenuOpen(false);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
14
|
+
return () => document.removeEventListener('mousedown', handleClickOutside);
|
|
15
|
+
}, []);
|
|
16
|
+
return (_jsxs("div", { className: "relative h-64 md:h-80 lg:h-96 rounded-[60px] overflow-hidden mb-12 shadow-2xl animate-in fade-in slide-in-from-top-4 duration-700", children: [_jsx("img", { src: group.banner, className: "w-full h-full object-cover", alt: group.name }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/90 via-black/30 to-transparent" }), _jsxs("div", { className: "absolute bottom-10 left-10 right-10 flex flex-col md:flex-row items-end justify-between gap-6", children: [_jsxs("div", { className: "flex items-center gap-6", children: [_jsxs("div", { className: "relative", children: [_jsx("img", { src: group.logo, className: "w-24 h-24 md:w-32 md:h-32 rounded-[32px] border-4 border-armoyu-bg bg-white dark:bg-zinc-900 shadow-2xl object-cover", alt: "Logo" }), _jsx("div", { className: "absolute -bottom-2 -right-2 bg-blue-500 text-white p-2 rounded-xl border-4 border-armoyu-bg", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", children: _jsx("polyline", { points: "20 6 9 17 4 12" }) }) })] }), _jsxs("div", { className: "mb-2 text-left", children: [_jsxs("div", { className: "flex items-center gap-3 mb-1", children: [_jsx("h1", { className: "text-3xl md:text-5xl font-black text-white uppercase tracking-tighter italic drop-shadow-lg", children: group.name }), _jsx("span", { className: "px-3 py-1 bg-blue-600 text-white text-[10px] font-black uppercase tracking-widest rounded-lg shadow-lg", children: group.category })] }), _jsxs("p", { className: "text-white/70 font-bold text-lg uppercase tracking-tight", children: ["@", group.shortName, " \u2022 ", group.recruitment] })] })] }), _jsxs("div", { className: "flex gap-4 mb-2 relative", ref: menuRef, children: [!isMember && (_jsx("button", { onClick: onJoin, className: "px-10 py-4 bg-white text-blue-600 font-black text-xs uppercase tracking-[0.2em] rounded-2xl shadow-2xl hover:scale-105 active:scale-95 transition-all", children: "GRUBA KATIL" })), _jsx("button", { onClick: () => setIsMenuOpen(!isMenuOpen), className: `px-4 py-4 ${isMenuOpen ? 'bg-blue-600' : 'bg-white/10 backdrop-blur-md'} border border-white/20 text-white rounded-2xl hover:bg-white/20 transition-all group`, children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: `${isMenuOpen ? 'rotate-90' : 'group-hover:rotate-12'} transition-transform`, children: [_jsx("circle", { cx: "12", cy: "12", r: "1" }), _jsx("circle", { cx: "19", cy: "12", r: "1" }), _jsx("circle", { cx: "5", cy: "12", r: "1" })] }) }), isMenuOpen && (_jsx("div", { className: "absolute bottom-full right-0 mb-4 w-56 glass-panel p-3 rounded-2xl border border-white/20 bg-black/80 backdrop-blur-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 z-50", children: _jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("button", { className: "flex items-center gap-3 w-full p-3 rounded-xl hover:bg-white/10 text-white transition-all group text-left", children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "text-white/50 group-hover:text-white transition-colors", children: [_jsx("path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" }), _jsx("polyline", { points: "16 6 12 2 8 6" }), _jsx("line", { x1: "12", y1: "2", x2: "12", y2: "15" })] }), _jsx("span", { className: "text-[10px] font-black uppercase tracking-widest", children: "Grubu Payla\u015F" })] }), _jsxs("button", { onClick: () => { onReport?.(); setIsMenuOpen(false); }, className: "flex items-center gap-3 w-full p-3 rounded-xl hover:bg-red-500/10 text-red-500 transition-all group text-left", children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "text-red-500/50 group-hover:text-red-500 transition-colors", children: [_jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }), _jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }), _jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })] }), _jsx("span", { className: "text-[10px] font-black uppercase tracking-widest", children: "Grubu \u015Eikayet Et" })] }), isMember && (_jsxs(_Fragment, { children: [_jsx("div", { className: "h-px bg-white/10 my-1 mx-2" }), _jsxs("button", { onClick: () => { onLeave?.(); setIsMenuOpen(false); }, className: "flex items-center gap-3 w-full p-3 rounded-xl hover:bg-red-600 text-white transition-all group text-left bg-red-600/20", children: [_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "text-white/70 group-hover:text-white transition-colors", children: [_jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }), _jsx("polyline", { points: "16 17 21 12 16 7" }), _jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })] }), _jsx("span", { className: "text-[10px] font-black uppercase tracking-widest", children: "Gruptan Ayr\u0131l" })] })] }))] }) }))] })] })] }));
|
|
17
|
+
}
|
|
18
18
|
//# sourceMappingURL=GroupHeader.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import Link from 'next/link';
|
|
4
|
-
export function GroupMenu({ group, user, onLeave }) {
|
|
5
|
-
// Check if owner or moderator
|
|
6
|
-
const isOwner = group.owner?.username === user.username;
|
|
7
|
-
const isMod = group.moderators?.some(m => m.username === user.username);
|
|
8
|
-
const isAdmin = isOwner || isMod || user.role?.id === 'admin';
|
|
9
|
-
const menuItems = [
|
|
10
|
-
{ id: 'management', label: 'GRUP YÖNETİMİ', icon: 'shield', color: 'text-blue-500', permission: isAdmin },
|
|
11
|
-
{ id: 'members', label: 'ÜYE LİSTESİ', icon: 'users', color: 'text-armoyu-text' },
|
|
12
|
-
{ id: 'events', label: 'GRUP ETKİNLİKLERİ', icon: 'calendar', color: 'text-armoyu-text' },
|
|
13
|
-
{ id: 'settings', label: 'GRUP AYARLARI', icon: 'settings', color: 'text-armoyu-text', permission: isAdmin },
|
|
14
|
-
];
|
|
15
|
-
return (_jsxs("div", { className: "glass-panel p-8 rounded-[40px] border border-armoyu-card-border bg-armoyu-card-bg relative overflow-hidden", children: [_jsx("div", { className: "absolute top-0 right-0 w-32 h-32 bg-blue-500/10 blur-[60px] -mr-16 -mt-16 pointer-events-none" }), _jsxs("div", { className: "flex items-center justify-between mb-8", children: [_jsx("h4", { className: "text-xs font-black text-armoyu-text uppercase tracking-[0.2em] italic", children: "GRUP MEN\u00DCS\u00DC" }), _jsx("div", { className: "px-2 py-0.5 bg-emerald-500/10 border border-emerald-500/20 rounded-md", children: _jsx("span", { className: "text-[8px] font-black text-emerald-500 tracking-widest", children: "AKT\u0130F \u00DCYE" }) })] }), _jsx("div", { className: "space-y-4", children: menuItems.filter(item => item.permission !== false).map((item, idx) => (_jsxs(Link, { href: `${group.getGroupUrl()}/${item.id === 'management' || item.id === 'settings' ? 'yonetim' : item.id === 'members' ? 'uyeler' : 'etkinlikler'}`, className: "w-full flex items-center justify-between p-4 rounded-2xl bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/5 hover:border-blue-500/30 hover:bg-blue-500/5 transition-all group", children: [_jsxs("div", { className: "flex items-center gap-4", children: [_jsx("div", { className: `p-2.5 rounded-xl bg-white dark:bg-zinc-900 shadow-sm border border-black/5 dark:border-white/5 group-hover:scale-110 transition-transform ${item.color}`, children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [item.id === 'management' && _jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }), item.id === 'members' && _jsx("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }), item.id === 'members' && _jsx("circle", { cx: "9", cy: "7", r: "4" }), item.id === 'members' && _jsx("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }), item.id === 'members' && _jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" }), item.id === 'events' && _jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), item.id === 'events' && _jsx("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), item.id === 'events' && _jsx("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), item.id === 'events' && _jsx("line", { x1: "3", y1: "10", x2: "21", y2: "10" }), item.id === 'settings' && _jsx("circle", { cx: "12", cy: "12", r: "3" }), item.id === 'settings' && _jsx("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })] }) }), _jsx("span", { className: "text-[10px] font-black text-armoyu-text tracking-widest uppercase", children: item.label })] }), _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", className: "text-armoyu-text-muted opacity-0 group-hover:opacity-100 group-hover:translate-x-1 transition-all", children: _jsx("polyline", { points: "9 18 15 12 9 6" }) })] }, item.id))) }), _jsx("div", { className: "mt-8 pt-8 border-t border-black/5 dark:border-white/5", children: _jsx("button", { onClick: onLeave, className: "w-full text-[10px] font-black text-red-500 uppercase tracking-[0.2em] hover:text-red-600 transition-colors", children: "GRUPTAN AYRIL" }) })] }));
|
|
16
|
-
}
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
export function GroupMenu({ group, user, onLeave }) {
|
|
5
|
+
// Check if owner or moderator
|
|
6
|
+
const isOwner = group.owner?.username === user.username;
|
|
7
|
+
const isMod = group.moderators?.some(m => m.username === user.username);
|
|
8
|
+
const isAdmin = isOwner || isMod || user.role?.id === 'admin';
|
|
9
|
+
const menuItems = [
|
|
10
|
+
{ id: 'management', label: 'GRUP YÖNETİMİ', icon: 'shield', color: 'text-blue-500', permission: isAdmin },
|
|
11
|
+
{ id: 'members', label: 'ÜYE LİSTESİ', icon: 'users', color: 'text-armoyu-text' },
|
|
12
|
+
{ id: 'events', label: 'GRUP ETKİNLİKLERİ', icon: 'calendar', color: 'text-armoyu-text' },
|
|
13
|
+
{ id: 'settings', label: 'GRUP AYARLARI', icon: 'settings', color: 'text-armoyu-text', permission: isAdmin },
|
|
14
|
+
];
|
|
15
|
+
return (_jsxs("div", { className: "glass-panel p-8 rounded-[40px] border border-armoyu-card-border bg-armoyu-card-bg relative overflow-hidden", children: [_jsx("div", { className: "absolute top-0 right-0 w-32 h-32 bg-blue-500/10 blur-[60px] -mr-16 -mt-16 pointer-events-none" }), _jsxs("div", { className: "flex items-center justify-between mb-8", children: [_jsx("h4", { className: "text-xs font-black text-armoyu-text uppercase tracking-[0.2em] italic", children: "GRUP MEN\u00DCS\u00DC" }), _jsx("div", { className: "px-2 py-0.5 bg-emerald-500/10 border border-emerald-500/20 rounded-md", children: _jsx("span", { className: "text-[8px] font-black text-emerald-500 tracking-widest", children: "AKT\u0130F \u00DCYE" }) })] }), _jsx("div", { className: "space-y-4", children: menuItems.filter(item => item.permission !== false).map((item, idx) => (_jsxs(Link, { href: `${group.getGroupUrl()}/${item.id === 'management' || item.id === 'settings' ? 'yonetim' : item.id === 'members' ? 'uyeler' : 'etkinlikler'}`, className: "w-full flex items-center justify-between p-4 rounded-2xl bg-black/5 dark:bg-white/5 border border-black/5 dark:border-white/5 hover:border-blue-500/30 hover:bg-blue-500/5 transition-all group", children: [_jsxs("div", { className: "flex items-center gap-4", children: [_jsx("div", { className: `p-2.5 rounded-xl bg-white dark:bg-zinc-900 shadow-sm border border-black/5 dark:border-white/5 group-hover:scale-110 transition-transform ${item.color}`, children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [item.id === 'management' && _jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }), item.id === 'members' && _jsx("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }), item.id === 'members' && _jsx("circle", { cx: "9", cy: "7", r: "4" }), item.id === 'members' && _jsx("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }), item.id === 'members' && _jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" }), item.id === 'events' && _jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), item.id === 'events' && _jsx("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), item.id === 'events' && _jsx("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), item.id === 'events' && _jsx("line", { x1: "3", y1: "10", x2: "21", y2: "10" }), item.id === 'settings' && _jsx("circle", { cx: "12", cy: "12", r: "3" }), item.id === 'settings' && _jsx("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })] }) }), _jsx("span", { className: "text-[10px] font-black text-armoyu-text tracking-widest uppercase", children: item.label })] }), _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", className: "text-armoyu-text-muted opacity-0 group-hover:opacity-100 group-hover:translate-x-1 transition-all", children: _jsx("polyline", { points: "9 18 15 12 9 6" }) })] }, item.id))) }), _jsx("div", { className: "mt-8 pt-8 border-t border-black/5 dark:border-white/5", children: _jsx("button", { onClick: onLeave, className: "w-full text-[10px] font-black text-red-500 uppercase tracking-[0.2em] hover:text-red-600 transition-colors", children: "GRUPTAN AYRIL" }) })] }));
|
|
16
|
+
}
|
|
17
17
|
//# sourceMappingURL=GroupMenu.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import Link from 'next/link';
|
|
4
|
-
import { GraduationCap, Users, Trophy, ChevronRight, MapPin } from 'lucide-react';
|
|
5
|
-
export function SchoolCard({ school }) {
|
|
6
|
-
return (_jsx(Link, { href: `/egitim/${school.slug}`, className: "block group", children: _jsxs("div", { className: "glass-panel relative overflow-hidden rounded-[40px] border border-armoyu-card-border bg-armoyu-card-bg hover:border-blue-500/50 hover:shadow-2xl hover:shadow-blue-500/10 transition-all duration-500 group", children: [_jsx("div", { className: "absolute top-0 left-0 w-full h-32 bg-gradient-to-br from-blue-600/20 to-purple-600/20 opacity-30 group-hover:opacity-50 transition-opacity" }), _jsxs("div", { className: "relative p-8 pt-12", children: [_jsxs("div", { className: "flex items-start justify-between mb-8", children: [_jsxs("div", { className: "relative", children: [_jsx("div", { className: "w-24 h-24 rounded-3xl bg-white dark:bg-zinc-900 border-4 border-armoyu-bg overflow-hidden shadow-xl group-hover:scale-105 transition-transform duration-500", children: _jsx("img", { src: school.logo, alt: school.name, className: "w-full h-full object-contain p-2" }) }), _jsx("div", { className: "absolute -bottom-2 -right-2 px-3 py-1 bg-blue-600 text-white text-[10px] font-black italic rounded-lg shadow-lg uppercase tracking-widest border-2 border-armoyu-bg", children: "Onayl\u0131 Okul" })] }), _jsx("div", { className: "flex gap-2", children: _jsx("div", { className: "px-5 py-2.5 rounded-2xl bg-black/5 dark:bg-white/5 border border-armoyu-card-border text-[10px] font-black text-armoyu-text-muted uppercase tracking-[0.2em]", children: school.id.toUpperCase() }) })] }), _jsxs("div", { className: "space-y-4 mb-8", children: [_jsx("h3", { className: "text-2xl font-black text-armoyu-text uppercase tracking-tighter italic leading-none group-hover:text-blue-500 transition-colors", children: school.name }), _jsxs("div", { className: "flex items-center gap-2 text-armoyu-text-muted", children: [_jsx(MapPin, { size: 14, className: "text-blue-500" }), _jsx("span", { className: "text-[11px] font-bold uppercase tracking-widest opacity-60", children: "T\u00FCrkiye / \u0130stanbul" })] })] }), _jsxs("div", { className: "grid grid-cols-3 gap-2 py-4 border-y border-armoyu-card-border", children: [_jsxs("div", { className: "text-center group/stat", children: [_jsxs("div", { className: "flex items-center justify-center gap-1.5 text-armoyu-text-muted mb-1", children: [_jsx(Users, { size: 12, className: "group-hover/stat:text-blue-500 transition-colors" }), _jsx("span", { className: "text-[9px] font-black uppercase tracking-widest opacity-50", children: "\u00D6\u011Frenci" })] }), _jsx("div", { className: "text-sm font-black text-armoyu-text", children: school.memberCount })] }), _jsxs("div", { className: "text-center group/stat border-x border-armoyu-card-border px-2", children: [_jsxs("div", { className: "flex items-center justify-center gap-1.5 text-armoyu-text-muted mb-1", children: [_jsx(GraduationCap, { size: 12, className: "group-hover/stat:text-blue-500 transition-colors" }), _jsx("span", { className: "text-[9px] font-black uppercase tracking-widest opacity-50", children: "Fak\u00FClte" })] }), _jsx("div", { className: "text-sm font-black text-armoyu-text", children: (school.faculties || []).length })] }), _jsxs("div", { className: "text-center group/stat", children: [_jsxs("div", { className: "flex items-center justify-center gap-1.5 text-armoyu-text-muted mb-1", children: [_jsx(Trophy, { size: 12, className: "group-hover/stat:text-blue-500 transition-colors" }), _jsx("span", { className: "text-[9px] font-black uppercase tracking-widest opacity-50", children: "Tak\u0131mlar" })] }), _jsx("div", { className: "text-sm font-black text-armoyu-text", children: (school.teams || []).length })] })] }), _jsxs("div", { className: "mt-8 flex items-center justify-between", children: [_jsxs("div", { className: "flex -space-x-3", children: [[1, 2, 3, 4].map((i) => (_jsx("img", { src: `https://api.dicebear.com/7.x/avataaars/svg?seed=Armoyu${i + school.id}`, className: "w-8 h-8 rounded-full border-2 border-armoyu-bg", alt: "Member" }, i))), _jsxs("div", { className: "w-8 h-8 rounded-full bg-black/5 dark:bg-white/5 border-2 border-armoyu-bg flex items-center justify-center text-[8px] font-black text-armoyu-text-muted uppercase", children: ["+", (school.memberCount || 0) - 4] })] }), _jsxs("div", { className: "flex items-center gap-2 text-blue-500 text-[10px] font-black uppercase tracking-widest group-hover:translate-x-2 transition-transform", children: ["OKUL PORTALI ", _jsx(ChevronRight, { size: 16, strokeWidth: 3 })] })] })] }), _jsx("div", { className: "absolute -bottom-8 -right-8 w-32 h-32 bg-blue-500/5 blur-[40px] rounded-full group-hover:bg-blue-500/10 transition-colors" })] }) }));
|
|
7
|
-
}
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import { GraduationCap, Users, Trophy, ChevronRight, MapPin } from 'lucide-react';
|
|
5
|
+
export function SchoolCard({ school }) {
|
|
6
|
+
return (_jsx(Link, { href: `/egitim/${school.slug}`, className: "block group", children: _jsxs("div", { className: "glass-panel relative overflow-hidden rounded-[40px] border border-armoyu-card-border bg-armoyu-card-bg hover:border-blue-500/50 hover:shadow-2xl hover:shadow-blue-500/10 transition-all duration-500 group", children: [_jsx("div", { className: "absolute top-0 left-0 w-full h-32 bg-gradient-to-br from-blue-600/20 to-purple-600/20 opacity-30 group-hover:opacity-50 transition-opacity" }), _jsxs("div", { className: "relative p-8 pt-12", children: [_jsxs("div", { className: "flex items-start justify-between mb-8", children: [_jsxs("div", { className: "relative", children: [_jsx("div", { className: "w-24 h-24 rounded-3xl bg-white dark:bg-zinc-900 border-4 border-armoyu-bg overflow-hidden shadow-xl group-hover:scale-105 transition-transform duration-500", children: _jsx("img", { src: school.logo, alt: school.name, className: "w-full h-full object-contain p-2" }) }), _jsx("div", { className: "absolute -bottom-2 -right-2 px-3 py-1 bg-blue-600 text-white text-[10px] font-black italic rounded-lg shadow-lg uppercase tracking-widest border-2 border-armoyu-bg", children: "Onayl\u0131 Okul" })] }), _jsx("div", { className: "flex gap-2", children: _jsx("div", { className: "px-5 py-2.5 rounded-2xl bg-black/5 dark:bg-white/5 border border-armoyu-card-border text-[10px] font-black text-armoyu-text-muted uppercase tracking-[0.2em]", children: school.id.toUpperCase() }) })] }), _jsxs("div", { className: "space-y-4 mb-8", children: [_jsx("h3", { className: "text-2xl font-black text-armoyu-text uppercase tracking-tighter italic leading-none group-hover:text-blue-500 transition-colors", children: school.name }), _jsxs("div", { className: "flex items-center gap-2 text-armoyu-text-muted", children: [_jsx(MapPin, { size: 14, className: "text-blue-500" }), _jsx("span", { className: "text-[11px] font-bold uppercase tracking-widest opacity-60", children: "T\u00FCrkiye / \u0130stanbul" })] })] }), _jsxs("div", { className: "grid grid-cols-3 gap-2 py-4 border-y border-armoyu-card-border", children: [_jsxs("div", { className: "text-center group/stat", children: [_jsxs("div", { className: "flex items-center justify-center gap-1.5 text-armoyu-text-muted mb-1", children: [_jsx(Users, { size: 12, className: "group-hover/stat:text-blue-500 transition-colors" }), _jsx("span", { className: "text-[9px] font-black uppercase tracking-widest opacity-50", children: "\u00D6\u011Frenci" })] }), _jsx("div", { className: "text-sm font-black text-armoyu-text", children: school.memberCount })] }), _jsxs("div", { className: "text-center group/stat border-x border-armoyu-card-border px-2", children: [_jsxs("div", { className: "flex items-center justify-center gap-1.5 text-armoyu-text-muted mb-1", children: [_jsx(GraduationCap, { size: 12, className: "group-hover/stat:text-blue-500 transition-colors" }), _jsx("span", { className: "text-[9px] font-black uppercase tracking-widest opacity-50", children: "Fak\u00FClte" })] }), _jsx("div", { className: "text-sm font-black text-armoyu-text", children: (school.faculties || []).length })] }), _jsxs("div", { className: "text-center group/stat", children: [_jsxs("div", { className: "flex items-center justify-center gap-1.5 text-armoyu-text-muted mb-1", children: [_jsx(Trophy, { size: 12, className: "group-hover/stat:text-blue-500 transition-colors" }), _jsx("span", { className: "text-[9px] font-black uppercase tracking-widest opacity-50", children: "Tak\u0131mlar" })] }), _jsx("div", { className: "text-sm font-black text-armoyu-text", children: (school.teams || []).length })] })] }), _jsxs("div", { className: "mt-8 flex items-center justify-between", children: [_jsxs("div", { className: "flex -space-x-3", children: [[1, 2, 3, 4].map((i) => (_jsx("img", { src: `https://api.dicebear.com/7.x/avataaars/svg?seed=Armoyu${i + school.id}`, className: "w-8 h-8 rounded-full border-2 border-armoyu-bg", alt: "Member" }, i))), _jsxs("div", { className: "w-8 h-8 rounded-full bg-black/5 dark:bg-white/5 border-2 border-armoyu-bg flex items-center justify-center text-[8px] font-black text-armoyu-text-muted uppercase", children: ["+", (school.memberCount || 0) - 4] })] }), _jsxs("div", { className: "flex items-center gap-2 text-blue-500 text-[10px] font-black uppercase tracking-widest group-hover:translate-x-2 transition-transform", children: ["OKUL PORTALI ", _jsx(ChevronRight, { size: 16, strokeWidth: 3 })] })] })] }), _jsx("div", { className: "absolute -bottom-8 -right-8 w-32 h-32 bg-blue-500/5 blur-[40px] rounded-full group-hover:bg-blue-500/10 transition-colors" })] }) }));
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=SchoolCard.js.map
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { SurveyAnswer } from '@armoyu/core';
|
|
5
|
-
import { CheckCircle2, Users, Calendar, BarChart3 } from 'lucide-react';
|
|
6
|
-
export function SurveyCard({ survey }) {
|
|
7
|
-
const [hasVoted, setHasVoted] = useState(survey.hasVoted);
|
|
8
|
-
const [myVoteId, setMyVoteId] = useState(survey.myVoteId);
|
|
9
|
-
const [options, setOptions] = useState(survey.options);
|
|
10
|
-
const [totalVotes, setTotalVotes] = useState(survey.totalVotes);
|
|
11
|
-
const handleVote = (optionId) => {
|
|
12
|
-
if (hasVoted)
|
|
13
|
-
return;
|
|
14
|
-
// Optimistic Update
|
|
15
|
-
setHasVoted(true);
|
|
16
|
-
setMyVoteId(optionId);
|
|
17
|
-
setTotalVotes(prev => prev + 1);
|
|
18
|
-
setOptions(prev => prev.map(opt => {
|
|
19
|
-
if (opt.id === optionId) {
|
|
20
|
-
return new SurveyAnswer({ ...opt, votes: opt.votes + 1 });
|
|
21
|
-
}
|
|
22
|
-
return opt;
|
|
23
|
-
}));
|
|
24
|
-
};
|
|
25
|
-
const getPercentage = (votes) => {
|
|
26
|
-
if (totalVotes === 0)
|
|
27
|
-
return 0;
|
|
28
|
-
return Math.round((votes / totalVotes) * 100);
|
|
29
|
-
};
|
|
30
|
-
return (_jsxs("div", { className: "glass-panel p-6 md:p-8 rounded-[40px] border border-armoyu-card-border bg-armoyu-card-bg shadow-xl hover:shadow-2xl transition-all duration-500 overflow-hidden relative group", children: [_jsx("div", { className: "absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-blue-500 via-indigo-500 to-purple-500 opacity-70" }), _jsxs("div", { className: "flex flex-col md:flex-row md:items-start justify-between gap-6 mb-8", children: [_jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3 mb-4", children: [_jsx("div", { className: "w-10 h-10 rounded-2xl bg-blue-500/10 flex items-center justify-center text-blue-500", children: _jsx(BarChart3, { size: 20 }) }), _jsxs("div", { children: [_jsx("p", { className: "text-[10px] font-black text-armoyu-text-muted uppercase tracking-widest leading-none mb-1", children: "Topluluk Anketi" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("img", { src: survey.author?.avatar, className: "w-4 h-4 rounded-full", alt: "" }), _jsxs("p", { className: "text-[10px] font-bold text-armoyu-text/60 uppercase", children: [survey.author?.displayName, " taraf\u0131ndan"] })] })] })] }), _jsx("h3", { className: "text-xl md:text-2xl font-black text-armoyu-text uppercase tracking-tight italic leading-tight mb-3", children: survey.question }), survey.description && (_jsx("p", { className: "text-xs font-medium text-armoyu-text-muted leading-relaxed max-w-2xl", children: survey.description }))] }), _jsxs("div", { className: "flex flex-col md:items-end gap-2 shrink-0", children: [_jsxs("div", { className: "flex items-center gap-2 px-3 py-1.5 bg-black/5 dark:bg-white/5 rounded-xl border border-black/5 dark:border-white/5", children: [_jsx(Users, { size: 14, className: "text-blue-500" }), _jsxs("span", { className: "text-[10px] font-black text-armoyu-text uppercase tracking-widest", children: [totalVotes, " Toplam Oy"] })] }), survey.expiresAt && (_jsxs("div", { className: "flex items-center gap-2 px-3 py-1.5 bg-black/5 dark:bg-white/5 rounded-xl border border-black/5 dark:border-white/5", children: [_jsx(Calendar, { size: 14, className: "text-orange-500" }), _jsxs("span", { className: "text-[10px] font-black text-armoyu-text uppercase tracking-widest", children: ["Biti\u015F: ", survey.expiresAt] })] }))] })] }), _jsx("div", { className: "space-y-4", children: options.map((opt) => {
|
|
31
|
-
const percentage = getPercentage(opt.votes);
|
|
32
|
-
const isSelected = myVoteId === opt.id;
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { SurveyAnswer } from '@armoyu/core';
|
|
5
|
+
import { CheckCircle2, Users, Calendar, BarChart3 } from 'lucide-react';
|
|
6
|
+
export function SurveyCard({ survey }) {
|
|
7
|
+
const [hasVoted, setHasVoted] = useState(survey.hasVoted);
|
|
8
|
+
const [myVoteId, setMyVoteId] = useState(survey.myVoteId);
|
|
9
|
+
const [options, setOptions] = useState(survey.options);
|
|
10
|
+
const [totalVotes, setTotalVotes] = useState(survey.totalVotes);
|
|
11
|
+
const handleVote = (optionId) => {
|
|
12
|
+
if (hasVoted)
|
|
13
|
+
return;
|
|
14
|
+
// Optimistic Update
|
|
15
|
+
setHasVoted(true);
|
|
16
|
+
setMyVoteId(optionId);
|
|
17
|
+
setTotalVotes(prev => prev + 1);
|
|
18
|
+
setOptions(prev => prev.map(opt => {
|
|
19
|
+
if (opt.id === optionId) {
|
|
20
|
+
return new SurveyAnswer({ ...opt, votes: opt.votes + 1 });
|
|
21
|
+
}
|
|
22
|
+
return opt;
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
const getPercentage = (votes) => {
|
|
26
|
+
if (totalVotes === 0)
|
|
27
|
+
return 0;
|
|
28
|
+
return Math.round((votes / totalVotes) * 100);
|
|
29
|
+
};
|
|
30
|
+
return (_jsxs("div", { className: "glass-panel p-6 md:p-8 rounded-[40px] border border-armoyu-card-border bg-armoyu-card-bg shadow-xl hover:shadow-2xl transition-all duration-500 overflow-hidden relative group", children: [_jsx("div", { className: "absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-blue-500 via-indigo-500 to-purple-500 opacity-70" }), _jsxs("div", { className: "flex flex-col md:flex-row md:items-start justify-between gap-6 mb-8", children: [_jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3 mb-4", children: [_jsx("div", { className: "w-10 h-10 rounded-2xl bg-blue-500/10 flex items-center justify-center text-blue-500", children: _jsx(BarChart3, { size: 20 }) }), _jsxs("div", { children: [_jsx("p", { className: "text-[10px] font-black text-armoyu-text-muted uppercase tracking-widest leading-none mb-1", children: "Topluluk Anketi" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("img", { src: survey.author?.avatar, className: "w-4 h-4 rounded-full", alt: "" }), _jsxs("p", { className: "text-[10px] font-bold text-armoyu-text/60 uppercase", children: [survey.author?.displayName, " taraf\u0131ndan"] })] })] })] }), _jsx("h3", { className: "text-xl md:text-2xl font-black text-armoyu-text uppercase tracking-tight italic leading-tight mb-3", children: survey.question }), survey.description && (_jsx("p", { className: "text-xs font-medium text-armoyu-text-muted leading-relaxed max-w-2xl", children: survey.description }))] }), _jsxs("div", { className: "flex flex-col md:items-end gap-2 shrink-0", children: [_jsxs("div", { className: "flex items-center gap-2 px-3 py-1.5 bg-black/5 dark:bg-white/5 rounded-xl border border-black/5 dark:border-white/5", children: [_jsx(Users, { size: 14, className: "text-blue-500" }), _jsxs("span", { className: "text-[10px] font-black text-armoyu-text uppercase tracking-widest", children: [totalVotes, " Toplam Oy"] })] }), survey.expiresAt && (_jsxs("div", { className: "flex items-center gap-2 px-3 py-1.5 bg-black/5 dark:bg-white/5 rounded-xl border border-black/5 dark:border-white/5", children: [_jsx(Calendar, { size: 14, className: "text-orange-500" }), _jsxs("span", { className: "text-[10px] font-black text-armoyu-text uppercase tracking-widest", children: ["Biti\u015F: ", survey.expiresAt] })] }))] })] }), _jsx("div", { className: "space-y-4", children: options.map((opt) => {
|
|
31
|
+
const percentage = getPercentage(opt.votes);
|
|
32
|
+
const isSelected = myVoteId === opt.id;
|
|
33
33
|
return (_jsxs("div", { className: "relative group/opt", onClick: () => handleVote(opt.id), children: [_jsxs("div", { className: `flex items-center justify-between p-4 md:p-5 rounded-2xl border transition-all cursor-pointer relative z-10
|
|
34
34
|
${isSelected ? 'bg-blue-500/10 border-blue-500/50' : 'bg-black/5 dark:bg-white/5 border-transparent hover:border-blue-500/20'}`, children: [_jsxs("div", { className: "flex items-center gap-4 flex-1", children: [_jsx("div", { className: `w-6 h-6 rounded-lg border-2 flex items-center justify-center transition-all
|
|
35
|
-
${isSelected ? 'bg-blue-500 border-blue-500 text-white' : 'border-armoyu-card-border group-hover/opt:border-blue-500/50'}`, children: isSelected && _jsx(CheckCircle2, { size: 14 }) }), _jsx("span", { className: `text-sm md:text-base font-black uppercase tracking-tight ${isSelected ? 'text-blue-500' : 'text-armoyu-text'}`, children: opt.text })] }), hasVoted && (_jsxs("div", { className: "flex items-center gap-3", children: [_jsxs("span", { className: "text-xs font-black text-armoyu-text/40", children: [opt.votes, " OY"] }), _jsxs("span", { className: "text-lg font-black text-armoyu-text italic", children: ["%", percentage] })] }))] }), hasVoted && (_jsx("div", { className: "absolute inset-0 z-0 p-1", children: _jsx("div", { className: "h-full bg-blue-500/10 rounded-xl transition-all duration-1000 ease-out", style: { width: `${percentage}%` } }) }))] }, opt.id));
|
|
36
|
-
}) }), !hasVoted && (_jsx("div", { className: "mt-8 pt-6 border-t border-armoyu-card-border flex items-center justify-center", children: _jsx("p", { className: "text-[10px] font-black text-armoyu-text-muted uppercase tracking-[0.2em] animate-pulse", children: "Se\u00E7iminizi yapmak i\u00E7in bir se\u00E7ene\u011Fe t\u0131klay\u0131n" }) })), hasVoted && (_jsxs("div", { className: "mt-8 pt-6 border-t border-armoyu-card-border flex items-center justify-between", children: [_jsxs("p", { className: "text-[10px] font-black text-emerald-500 uppercase tracking-widest flex items-center gap-2", children: [_jsx(CheckCircle2, { size: 12 }), " Kat\u0131l\u0131m\u0131n\u0131z i\u00E7in te\u015Fekk\u00FCrler"] }), _jsx("button", { className: "text-[9px] font-black text-armoyu-text-muted hover:text-blue-500 uppercase tracking-widest transition-colors", onClick: () => window.location.reload(), children: "ANKET\u0130 SIFIRLA (TEST)" })] }))] }));
|
|
37
|
-
}
|
|
35
|
+
${isSelected ? 'bg-blue-500 border-blue-500 text-white' : 'border-armoyu-card-border group-hover/opt:border-blue-500/50'}`, children: isSelected && _jsx(CheckCircle2, { size: 14 }) }), _jsx("span", { className: `text-sm md:text-base font-black uppercase tracking-tight ${isSelected ? 'text-blue-500' : 'text-armoyu-text'}`, children: opt.text })] }), hasVoted && (_jsxs("div", { className: "flex items-center gap-3", children: [_jsxs("span", { className: "text-xs font-black text-armoyu-text/40", children: [opt.votes, " OY"] }), _jsxs("span", { className: "text-lg font-black text-armoyu-text italic", children: ["%", percentage] })] }))] }), hasVoted && (_jsx("div", { className: "absolute inset-0 z-0 p-1", children: _jsx("div", { className: "h-full bg-blue-500/10 rounded-xl transition-all duration-1000 ease-out", style: { width: `${percentage}%` } }) }))] }, opt.id));
|
|
36
|
+
}) }), !hasVoted && (_jsx("div", { className: "mt-8 pt-6 border-t border-armoyu-card-border flex items-center justify-center", children: _jsx("p", { className: "text-[10px] font-black text-armoyu-text-muted uppercase tracking-[0.2em] animate-pulse", children: "Se\u00E7iminizi yapmak i\u00E7in bir se\u00E7ene\u011Fe t\u0131klay\u0131n" }) })), hasVoted && (_jsxs("div", { className: "mt-8 pt-6 border-t border-armoyu-card-border flex items-center justify-between", children: [_jsxs("p", { className: "text-[10px] font-black text-emerald-500 uppercase tracking-widest flex items-center gap-2", children: [_jsx(CheckCircle2, { size: 12 }), " Kat\u0131l\u0131m\u0131n\u0131z i\u00E7in te\u015Fekk\u00FCrler"] }), _jsx("button", { className: "text-[9px] font-black text-armoyu-text-muted hover:text-blue-500 uppercase tracking-widest transition-colors", onClick: () => window.location.reload(), children: "ANKET\u0130 SIFIRLA (TEST)" })] }))] }));
|
|
37
|
+
}
|
|
38
38
|
//# sourceMappingURL=SurveyCard.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface ForumBoardProps {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
desc: string;
|
|
6
|
-
topicCount: number;
|
|
7
|
-
postCount: number;
|
|
8
|
-
lastPost?: {
|
|
9
|
-
topicTitle: string;
|
|
10
|
-
author: string;
|
|
11
|
-
avatar: string;
|
|
12
|
-
time: string;
|
|
13
|
-
};
|
|
14
|
-
icon?: React.ReactNode;
|
|
15
|
-
}
|
|
16
|
-
export declare function ForumBoard({ id, name, desc, topicCount, postCount, lastPost, icon }: ForumBoardProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ForumBoardProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
desc: string;
|
|
6
|
+
topicCount: number;
|
|
7
|
+
postCount: number;
|
|
8
|
+
lastPost?: {
|
|
9
|
+
topicTitle: string;
|
|
10
|
+
author: string;
|
|
11
|
+
avatar: string;
|
|
12
|
+
time: string;
|
|
13
|
+
};
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function ForumBoard({ id, name, desc, topicCount, postCount, lastPost, icon }: ForumBoardProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
//# sourceMappingURL=ForumBoard.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import Link from 'next/link';
|
|
4
|
-
export function ForumBoard({ id, name, desc, topicCount, postCount, lastPost, icon }) {
|
|
5
|
-
return (_jsx(Link, { href: `/forum/${id}`, className: "block", children: _jsxs("div", { className: "group flex flex-col md:flex-row items-center gap-6 p-6 md:p-8 glass-panel bg-armoyu-card-bg border border-armoyu-card-border hover:shadow-2xl transition-all duration-300 hover:border-blue-500/30", children: [_jsx("div", { className: "w-16 h-16 rounded-[22px] bg-blue-500/10 dark:bg-white/5 flex items-center justify-center text-blue-500 group-hover:bg-blue-600 group-hover:text-white transition-all shrink-0", children: icon || _jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: _jsx("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" }) }) }), _jsxs("div", { className: "flex-1 min-w-0 text-center md:text-left", children: [_jsx("h3", { className: "text-xl font-black text-armoyu-text mb-1 uppercase tracking-tight group-hover:text-blue-500 transition-colors", children: name }), _jsx("p", { className: "text-sm text-armoyu-text-muted font-medium line-clamp-2 leading-relaxed opacity-80", children: desc })] }), _jsxs("div", { className: "hidden lg:flex items-center gap-10 px-8 border-x border-armoyu-card-border/50", children: [_jsxs("div", { className: "text-center", children: [_jsx("span", { className: "block text-xl font-black text-armoyu-text", children: topicCount }), _jsx("span", { className: "text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest", children: "KONU" })] }), _jsxs("div", { className: "text-center", children: [_jsx("span", { className: "block text-xl font-black text-armoyu-text", children: postCount }), _jsx("span", { className: "text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest", children: "MESAJ" })] })] }), _jsx("div", { className: "hidden xl:flex items-center gap-4 w-64 shrink-0", children: lastPost ? (_jsxs(_Fragment, { children: [_jsx("img", { src: lastPost.avatar, alt: lastPost.author, className: "w-10 h-10 rounded-full border border-blue-500/20" }), _jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "text-xs font-bold text-armoyu-text truncate hover:text-blue-500 cursor-pointer", children: lastPost.topicTitle }), _jsxs("p", { className: "text-[10px] font-medium text-armoyu-text-muted mt-0.5 uppercase tracking-tighter", children: [_jsx("span", { className: "text-blue-500 font-bold", children: lastPost.author }), " \u2022 ", lastPost.time] })] })] })) : (_jsx("span", { className: "text-xs font-bold text-armoyu-text-muted italic opacity-50 uppercase tracking-widest", children: "HEN\u00DCZ KONU YOK" })) }), _jsx("div", { className: "md:hidden lg:flex shrink-0 w-10 h-10 rounded-full bg-black/5 dark:bg-white/5 items-center justify-center opacity-0 group-hover:opacity-100 group-hover:translate-x-1 transition-all", 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: "5", y1: "12", x2: "19", y2: "12" }), _jsx("polyline", { points: "12 5 19 12 12 19" })] }) })] }) }));
|
|
6
|
-
}
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
export function ForumBoard({ id, name, desc, topicCount, postCount, lastPost, icon }) {
|
|
5
|
+
return (_jsx(Link, { href: `/forum/${id}`, className: "block", children: _jsxs("div", { className: "group flex flex-col md:flex-row items-center gap-6 p-6 md:p-8 glass-panel bg-armoyu-card-bg border border-armoyu-card-border hover:shadow-2xl transition-all duration-300 hover:border-blue-500/30", children: [_jsx("div", { className: "w-16 h-16 rounded-[22px] bg-blue-500/10 dark:bg-white/5 flex items-center justify-center text-blue-500 group-hover:bg-blue-600 group-hover:text-white transition-all shrink-0", children: icon || _jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: _jsx("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" }) }) }), _jsxs("div", { className: "flex-1 min-w-0 text-center md:text-left", children: [_jsx("h3", { className: "text-xl font-black text-armoyu-text mb-1 uppercase tracking-tight group-hover:text-blue-500 transition-colors", children: name }), _jsx("p", { className: "text-sm text-armoyu-text-muted font-medium line-clamp-2 leading-relaxed opacity-80", children: desc })] }), _jsxs("div", { className: "hidden lg:flex items-center gap-10 px-8 border-x border-armoyu-card-border/50", children: [_jsxs("div", { className: "text-center", children: [_jsx("span", { className: "block text-xl font-black text-armoyu-text", children: topicCount }), _jsx("span", { className: "text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest", children: "KONU" })] }), _jsxs("div", { className: "text-center", children: [_jsx("span", { className: "block text-xl font-black text-armoyu-text", children: postCount }), _jsx("span", { className: "text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest", children: "MESAJ" })] })] }), _jsx("div", { className: "hidden xl:flex items-center gap-4 w-64 shrink-0", children: lastPost ? (_jsxs(_Fragment, { children: [_jsx("img", { src: lastPost.avatar, alt: lastPost.author, className: "w-10 h-10 rounded-full border border-blue-500/20" }), _jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "text-xs font-bold text-armoyu-text truncate hover:text-blue-500 cursor-pointer", children: lastPost.topicTitle }), _jsxs("p", { className: "text-[10px] font-medium text-armoyu-text-muted mt-0.5 uppercase tracking-tighter", children: [_jsx("span", { className: "text-blue-500 font-bold", children: lastPost.author }), " \u2022 ", lastPost.time] })] })] })) : (_jsx("span", { className: "text-xs font-bold text-armoyu-text-muted italic opacity-50 uppercase tracking-widest", children: "HEN\u00DCZ KONU YOK" })) }), _jsx("div", { className: "md:hidden lg:flex shrink-0 w-10 h-10 rounded-full bg-black/5 dark:bg-white/5 items-center justify-center opacity-0 group-hover:opacity-100 group-hover:translate-x-1 transition-all", 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: "5", y1: "12", x2: "19", y2: "12" }), _jsx("polyline", { points: "12 5 19 12 12 19" })] }) })] }) }));
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=ForumBoard.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export interface ForumPostProps {
|
|
2
|
-
id: string;
|
|
3
|
-
author: string;
|
|
4
|
-
authorAvatar: string;
|
|
5
|
-
authorRank: string;
|
|
6
|
-
authorRankColor: string;
|
|
7
|
-
authorJoined: string;
|
|
8
|
-
authorPosts: number;
|
|
9
|
-
content: string;
|
|
10
|
-
time: string;
|
|
11
|
-
isMainPost?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare function ForumPost({ author, authorAvatar, authorRank, authorRankColor, authorJoined, authorPosts, content, time, isMainPost }: ForumPostProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export interface ForumPostProps {
|
|
2
|
+
id: string;
|
|
3
|
+
author: string;
|
|
4
|
+
authorAvatar: string;
|
|
5
|
+
authorRank: string;
|
|
6
|
+
authorRankColor: string;
|
|
7
|
+
authorJoined: string;
|
|
8
|
+
authorPosts: number;
|
|
9
|
+
content: string;
|
|
10
|
+
time: string;
|
|
11
|
+
isMainPost?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function ForumPost({ author, authorAvatar, authorRank, authorRankColor, authorJoined, authorPosts, content, time, isMainPost }: ForumPostProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
//# sourceMappingURL=ForumPost.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
export function ForumPost({ author, authorAvatar, authorRank, authorRankColor, authorJoined, authorPosts, content, time, isMainPost }) {
|
|
4
|
-
return (_jsxs("div", { className: `flex flex-col lg:flex-row gap-0 glass-panel bg-armoyu-card-bg border border-armoyu-card-border rounded-[40px] overflow-hidden ${isMainPost ? 'border-blue-500/30' : ''}`, children: [_jsxs("div", { className: "w-full lg:w-48 xl:w-64 bg-black/5 dark:bg-white/5 p-8 flex flex-col items-center border-b lg:border-r border-armoyu-card-border shrink-0", children: [_jsx("img", { src: authorAvatar, alt: author, className: "w-20 h-20 rounded-full border-4 border-armoyu-bg mb-4 shadow-xl" }), _jsx("h3", { className: "text-sm font-black text-armoyu-text mb-2 uppercase tracking-tight text-center", children: author }), _jsx("span", { className: `px-4 py-1.5 rounded-full text-[8px] font-black uppercase tracking-widest text-white mb-6 shadow-lg shadow-${authorRankColor}-500/20 bg-${authorRankColor}-500`, children: authorRank }), _jsxs("div", { className: "space-y-4 w-full", children: [_jsxs("div", { className: "flex flex-col items-center", children: [_jsx("span", { className: "text-[10px] font-black text-armoyu-text", children: "\u00DCyelik" }), _jsx("span", { className: "text-[8px] font-bold text-armoyu-text-muted uppercase tracking-widest", children: authorJoined })] }), _jsxs("div", { className: "flex flex-col items-center", children: [_jsx("span", { className: "text-[10px] font-black text-armoyu-text", children: "Toplam Mesaj" }), _jsx("span", { className: "text-[8px] font-bold text-armoyu-text-muted uppercase tracking-widest font-black text-blue-500", children: authorPosts })] })] })] }), _jsxs("div", { className: "flex-1 p-8 md:p-12 relative flex flex-col", children: [_jsxs("div", { className: "pb-6 mb-8 border-b border-armoyu-card-border flex justify-between items-center opacity-40", children: [_jsx("p", { className: "text-[8px] font-black uppercase tracking-widest", children: time }), _jsxs("div", { className: "flex gap-4", children: [_jsx("button", { className: "text-[8px] font-black uppercase tracking-widest hover:text-blue-500 transition-colors", children: "#1" }), _jsx("button", { className: "text-[8px] font-black uppercase tracking-widest hover:text-blue-500 transition-colors", children: "\u015E\u0130KAYET ET" })] })] }), _jsx("div", { className: "prose prose-sm dark:prose-invert max-w-none flex-1 text-armoyu-text text-md font-medium leading-[1.8] opacity-90 whitespace-pre-wrap", children: content }), _jsxs("div", { className: "mt-12 pt-8 border-t border-armoyu-card-border flex flex-wrap gap-4", children: [_jsxs("button", { className: "flex items-center gap-2 px-6 py-3 bg-blue-600 hover:bg-blue-500 text-white font-black text-[10px] uppercase tracking-widest rounded-2xl transition-all shadow-xl shadow-blue-500/20 active:scale-95", children: [_jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", children: _jsx("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) }), "ALINTILA"] }), _jsxs("button", { className: "flex items-center gap-2 px-6 py-3 bg-black/5 dark:bg-white/5 border border-armoyu-card-border hover:bg-black/10 text-armoyu-text font-black text-[10px] uppercase tracking-widest rounded-2xl transition-all active:scale-95", children: [_jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", 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" }) }), "BE\u011EEN"] })] })] })] }));
|
|
5
|
-
}
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
export function ForumPost({ author, authorAvatar, authorRank, authorRankColor, authorJoined, authorPosts, content, time, isMainPost }) {
|
|
4
|
+
return (_jsxs("div", { className: `flex flex-col lg:flex-row gap-0 glass-panel bg-armoyu-card-bg border border-armoyu-card-border rounded-[40px] overflow-hidden ${isMainPost ? 'border-blue-500/30' : ''}`, children: [_jsxs("div", { className: "w-full lg:w-48 xl:w-64 bg-black/5 dark:bg-white/5 p-8 flex flex-col items-center border-b lg:border-r border-armoyu-card-border shrink-0", children: [_jsx("img", { src: authorAvatar, alt: author, className: "w-20 h-20 rounded-full border-4 border-armoyu-bg mb-4 shadow-xl" }), _jsx("h3", { className: "text-sm font-black text-armoyu-text mb-2 uppercase tracking-tight text-center", children: author }), _jsx("span", { className: `px-4 py-1.5 rounded-full text-[8px] font-black uppercase tracking-widest text-white mb-6 shadow-lg shadow-${authorRankColor}-500/20 bg-${authorRankColor}-500`, children: authorRank }), _jsxs("div", { className: "space-y-4 w-full", children: [_jsxs("div", { className: "flex flex-col items-center", children: [_jsx("span", { className: "text-[10px] font-black text-armoyu-text", children: "\u00DCyelik" }), _jsx("span", { className: "text-[8px] font-bold text-armoyu-text-muted uppercase tracking-widest", children: authorJoined })] }), _jsxs("div", { className: "flex flex-col items-center", children: [_jsx("span", { className: "text-[10px] font-black text-armoyu-text", children: "Toplam Mesaj" }), _jsx("span", { className: "text-[8px] font-bold text-armoyu-text-muted uppercase tracking-widest font-black text-blue-500", children: authorPosts })] })] })] }), _jsxs("div", { className: "flex-1 p-8 md:p-12 relative flex flex-col", children: [_jsxs("div", { className: "pb-6 mb-8 border-b border-armoyu-card-border flex justify-between items-center opacity-40", children: [_jsx("p", { className: "text-[8px] font-black uppercase tracking-widest", children: time }), _jsxs("div", { className: "flex gap-4", children: [_jsx("button", { className: "text-[8px] font-black uppercase tracking-widest hover:text-blue-500 transition-colors", children: "#1" }), _jsx("button", { className: "text-[8px] font-black uppercase tracking-widest hover:text-blue-500 transition-colors", children: "\u015E\u0130KAYET ET" })] })] }), _jsx("div", { className: "prose prose-sm dark:prose-invert max-w-none flex-1 text-armoyu-text text-md font-medium leading-[1.8] opacity-90 whitespace-pre-wrap", children: content }), _jsxs("div", { className: "mt-12 pt-8 border-t border-armoyu-card-border flex flex-wrap gap-4", children: [_jsxs("button", { className: "flex items-center gap-2 px-6 py-3 bg-blue-600 hover:bg-blue-500 text-white font-black text-[10px] uppercase tracking-widest rounded-2xl transition-all shadow-xl shadow-blue-500/20 active:scale-95", children: [_jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", children: _jsx("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) }), "ALINTILA"] }), _jsxs("button", { className: "flex items-center gap-2 px-6 py-3 bg-black/5 dark:bg-white/5 border border-armoyu-card-border hover:bg-black/10 text-armoyu-text font-black text-[10px] uppercase tracking-widest rounded-2xl transition-all active:scale-95", children: [_jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", 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" }) }), "BE\u011EEN"] })] })] })] }));
|
|
5
|
+
}
|
|
6
6
|
//# sourceMappingURL=ForumPost.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
interface NewTopicModalProps {
|
|
2
|
-
isOpen: boolean;
|
|
3
|
-
onClose: () => void;
|
|
4
|
-
defaultBoard?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function NewTopicModal({ isOpen, onClose, defaultBoard }: NewTopicModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export {};
|
|
1
|
+
interface NewTopicModalProps {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
defaultBoard?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function NewTopicModal({ isOpen, onClose, defaultBoard }: NewTopicModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export {};
|
|
8
8
|
//# sourceMappingURL=NewTopicModal.d.ts.map
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect } from 'react';
|
|
4
|
-
const BOARDS = [
|
|
5
|
-
"Duyurular & Haberler",
|
|
6
|
-
"Kurallar & Rehberler",
|
|
7
|
-
"Minecraft",
|
|
8
|
-
"Counter-Strike",
|
|
9
|
-
"Assetto Corsa",
|
|
10
|
-
"Web Geliştirme",
|
|
11
|
-
"Python & AI",
|
|
12
|
-
"Genel Sohbet"
|
|
13
|
-
];
|
|
14
|
-
export function NewTopicModal({ isOpen, onClose, defaultBoard }) {
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
const handleEsc = (e) => {
|
|
17
|
-
if (e.key === 'Escape')
|
|
18
|
-
onClose();
|
|
19
|
-
};
|
|
20
|
-
window.addEventListener('keydown', handleEsc);
|
|
21
|
-
return () => window.removeEventListener('keydown', handleEsc);
|
|
22
|
-
}, [onClose]);
|
|
23
|
-
if (!isOpen)
|
|
24
|
-
return null;
|
|
25
|
-
return (_jsxs("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [_jsx("div", { className: "absolute inset-0 bg-black/80 backdrop-blur-sm animate-in fade-in duration-300", onClick: onClose }), _jsxs("div", { className: "relative w-full max-w-2xl bg-white dark:bg-[#12121a] border border-gray-200 dark:border-white/10 rounded-[40px] shadow-2xl overflow-hidden animate-in zoom-in-95 fade-in duration-300", children: [_jsxs("div", { className: "p-8 border-b border-gray-100 dark:border-white/5 flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-2xl font-black text-gray-900 dark:text-white uppercase tracking-tighter italic", children: "YEN\u0130 KONU OLU\u015ETUR" }), _jsx("p", { className: "text-[10px] font-bold text-blue-500 uppercase tracking-widest mt-1", children: "TOPLULUKLA PAYLA\u015EIMA BA\u015ELA" })] }), _jsx("button", { onClick: onClose, className: "w-10 h-10 rounded-full bg-gray-100 dark:bg-white/5 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-white/10 transition-colors", children: _jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", className: "text-gray-900 dark:text-white", children: [_jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), _jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) })] }), _jsxs("form", { className: "p-8 space-y-6", onSubmit: (e) => { e.preventDefault(); alert('Konunuz başarıyla oluşturuldu!'); onClose(); }, children: [_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-[10px] font-black uppercase tracking-widest text-gray-500 dark:text-gray-400 ml-1", children: "KATEGOR\u0130 SE\u00C7\u0130N" }), _jsxs("div", { className: "relative", children: [_jsx("select", { defaultValue: defaultBoard || "Genel Sohbet", className: "w-full bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-2xl px-5 py-4 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all font-bold text-sm appearance-none cursor-pointer", children: BOARDS.map(board => (_jsx("option", { value: board, className: "bg-white dark:bg-[#12121a]", children: board }, board))) }), _jsx("div", { className: "absolute right-5 top-1/2 -translate-y-1/2 pointer-events-none text-gray-400", children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", children: _jsx("polyline", { points: "6 9 12 15 18 9" }) }) })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-[10px] font-black uppercase tracking-widest text-gray-500 dark:text-gray-400 ml-1", children: "ET\u0130KETLER (OPS\u0130YONEL)" }), _jsx("input", { type: "text", className: "w-full bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-2xl px-5 py-4 text-gray-900 dark:text-white placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all font-bold text-sm", placeholder: "soru, minecraft, hata..." })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-[10px] font-black uppercase tracking-widest text-gray-500 dark:text-gray-400 ml-1", children: "KONU BA\u015ELI\u011EI" }), _jsx("input", { required: true, type: "text", className: "w-full bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-2xl px-5 py-4 text-gray-900 dark:text-white placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all font-bold text-sm", placeholder: "Konunuzu \u00F6zetleyen k\u0131sa bir ba\u015Fl\u0131k..." })] }), _jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-[10px] font-black uppercase tracking-widest text-gray-500 dark:text-gray-400 ml-1", children: "KONU \u0130\u00C7ER\u0130\u011E\u0130" }), _jsxs("div", { className: "relative group", children: [_jsx("textarea", { required: true, rows: 8, className: "w-full bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-3xl px-6 py-5 text-gray-900 dark:text-white placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all font-bold text-sm no-scrollbar leading-relaxed", placeholder: "Konu detaylar\u0131n\u0131 buraya yaz\u0131n..." }), _jsx("div", { className: "absolute bottom-4 right-6 flex items-center gap-2 opacity-50 text-[10px] font-bold uppercase tracking-widest pointer-events-none", children: _jsx("span", { children: "Markdown Desteklenir" }) })] })] })] }), _jsxs("div", { className: "flex flex-col sm:flex-row gap-4 pt-4", children: [_jsx("button", { type: "button", onClick: onClose, className: "flex-1 py-5 bg-gray-100 dark:bg-white/5 hover:bg-gray-200 dark:hover:bg-white/10 text-gray-900 dark:text-white font-black text-xs uppercase tracking-widest rounded-2xl transition-all", children: "\u0130PTAL ET" }), _jsx("button", { className: "flex-[2] py-5 bg-blue-600 hover:bg-blue-500 text-white font-black text-xs uppercase tracking-widest rounded-2xl shadow-xl shadow-blue-500/30 transition-all active:scale-95", children: "KONUYU YAYINLA" })] })] })] })] }));
|
|
26
|
-
}
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
const BOARDS = [
|
|
5
|
+
"Duyurular & Haberler",
|
|
6
|
+
"Kurallar & Rehberler",
|
|
7
|
+
"Minecraft",
|
|
8
|
+
"Counter-Strike",
|
|
9
|
+
"Assetto Corsa",
|
|
10
|
+
"Web Geliştirme",
|
|
11
|
+
"Python & AI",
|
|
12
|
+
"Genel Sohbet"
|
|
13
|
+
];
|
|
14
|
+
export function NewTopicModal({ isOpen, onClose, defaultBoard }) {
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const handleEsc = (e) => {
|
|
17
|
+
if (e.key === 'Escape')
|
|
18
|
+
onClose();
|
|
19
|
+
};
|
|
20
|
+
window.addEventListener('keydown', handleEsc);
|
|
21
|
+
return () => window.removeEventListener('keydown', handleEsc);
|
|
22
|
+
}, [onClose]);
|
|
23
|
+
if (!isOpen)
|
|
24
|
+
return null;
|
|
25
|
+
return (_jsxs("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [_jsx("div", { className: "absolute inset-0 bg-black/80 backdrop-blur-sm animate-in fade-in duration-300", onClick: onClose }), _jsxs("div", { className: "relative w-full max-w-2xl bg-white dark:bg-[#12121a] border border-gray-200 dark:border-white/10 rounded-[40px] shadow-2xl overflow-hidden animate-in zoom-in-95 fade-in duration-300", children: [_jsxs("div", { className: "p-8 border-b border-gray-100 dark:border-white/5 flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-2xl font-black text-gray-900 dark:text-white uppercase tracking-tighter italic", children: "YEN\u0130 KONU OLU\u015ETUR" }), _jsx("p", { className: "text-[10px] font-bold text-blue-500 uppercase tracking-widest mt-1", children: "TOPLULUKLA PAYLA\u015EIMA BA\u015ELA" })] }), _jsx("button", { onClick: onClose, className: "w-10 h-10 rounded-full bg-gray-100 dark:bg-white/5 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-white/10 transition-colors", children: _jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", className: "text-gray-900 dark:text-white", children: [_jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), _jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) })] }), _jsxs("form", { className: "p-8 space-y-6", onSubmit: (e) => { e.preventDefault(); alert('Konunuz başarıyla oluşturuldu!'); onClose(); }, children: [_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-[10px] font-black uppercase tracking-widest text-gray-500 dark:text-gray-400 ml-1", children: "KATEGOR\u0130 SE\u00C7\u0130N" }), _jsxs("div", { className: "relative", children: [_jsx("select", { defaultValue: defaultBoard || "Genel Sohbet", className: "w-full bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-2xl px-5 py-4 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all font-bold text-sm appearance-none cursor-pointer", children: BOARDS.map(board => (_jsx("option", { value: board, className: "bg-white dark:bg-[#12121a]", children: board }, board))) }), _jsx("div", { className: "absolute right-5 top-1/2 -translate-y-1/2 pointer-events-none text-gray-400", children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", children: _jsx("polyline", { points: "6 9 12 15 18 9" }) }) })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-[10px] font-black uppercase tracking-widest text-gray-500 dark:text-gray-400 ml-1", children: "ET\u0130KETLER (OPS\u0130YONEL)" }), _jsx("input", { type: "text", className: "w-full bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-2xl px-5 py-4 text-gray-900 dark:text-white placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all font-bold text-sm", placeholder: "soru, minecraft, hata..." })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-[10px] font-black uppercase tracking-widest text-gray-500 dark:text-gray-400 ml-1", children: "KONU BA\u015ELI\u011EI" }), _jsx("input", { required: true, type: "text", className: "w-full bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-2xl px-5 py-4 text-gray-900 dark:text-white placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all font-bold text-sm", placeholder: "Konunuzu \u00F6zetleyen k\u0131sa bir ba\u015Fl\u0131k..." })] }), _jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-[10px] font-black uppercase tracking-widest text-gray-500 dark:text-gray-400 ml-1", children: "KONU \u0130\u00C7ER\u0130\u011E\u0130" }), _jsxs("div", { className: "relative group", children: [_jsx("textarea", { required: true, rows: 8, className: "w-full bg-gray-50 dark:bg-white/5 border border-gray-200 dark:border-white/10 rounded-3xl px-6 py-5 text-gray-900 dark:text-white placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all font-bold text-sm no-scrollbar leading-relaxed", placeholder: "Konu detaylar\u0131n\u0131 buraya yaz\u0131n..." }), _jsx("div", { className: "absolute bottom-4 right-6 flex items-center gap-2 opacity-50 text-[10px] font-bold uppercase tracking-widest pointer-events-none", children: _jsx("span", { children: "Markdown Desteklenir" }) })] })] })] }), _jsxs("div", { className: "flex flex-col sm:flex-row gap-4 pt-4", children: [_jsx("button", { type: "button", onClick: onClose, className: "flex-1 py-5 bg-gray-100 dark:bg-white/5 hover:bg-gray-200 dark:hover:bg-white/10 text-gray-900 dark:text-white font-black text-xs uppercase tracking-widest rounded-2xl transition-all", children: "\u0130PTAL ET" }), _jsx("button", { className: "flex-[2] py-5 bg-blue-600 hover:bg-blue-500 text-white font-black text-xs uppercase tracking-widest rounded-2xl shadow-xl shadow-blue-500/30 transition-all active:scale-95", children: "KONUYU YAYINLA" })] })] })] })] }));
|
|
26
|
+
}
|
|
27
27
|
//# sourceMappingURL=NewTopicModal.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export interface TopicItemProps {
|
|
2
|
-
id: string;
|
|
3
|
-
boardId: string;
|
|
4
|
-
title: string;
|
|
5
|
-
author: string;
|
|
6
|
-
authorAvatar: string;
|
|
7
|
-
replies: number;
|
|
8
|
-
views: number;
|
|
9
|
-
lastActivity: string;
|
|
10
|
-
lastAuthor: string;
|
|
11
|
-
isPinned?: boolean;
|
|
12
|
-
isHot?: boolean;
|
|
13
|
-
isSolved?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare function TopicItem({ id, boardId, title, author, authorAvatar, replies, views, lastActivity, lastAuthor, isPinned, isHot, isSolved }: TopicItemProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export interface TopicItemProps {
|
|
2
|
+
id: string;
|
|
3
|
+
boardId: string;
|
|
4
|
+
title: string;
|
|
5
|
+
author: string;
|
|
6
|
+
authorAvatar: string;
|
|
7
|
+
replies: number;
|
|
8
|
+
views: number;
|
|
9
|
+
lastActivity: string;
|
|
10
|
+
lastAuthor: string;
|
|
11
|
+
isPinned?: boolean;
|
|
12
|
+
isHot?: boolean;
|
|
13
|
+
isSolved?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function TopicItem({ id, boardId, title, author, authorAvatar, replies, views, lastActivity, lastAuthor, isPinned, isHot, isSolved }: TopicItemProps): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
//# sourceMappingURL=TopicItem.d.ts.map
|