@armoyu/ui 1.0.1 → 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.d.ts.map +1 -1
- package/dist/app/layout.js +2 -5
- package/dist/app/layout.js.map +1 -1
- package/dist/components/RollingNumber.d.ts +6 -6
- package/dist/components/RollingNumber.js +23 -23
- package/dist/components/RollingNumber.js.map +1 -1
- package/dist/components/StatsGrid.d.ts +5 -5
- package/dist/components/modules/auth/Dashboard.d.ts +1 -1
- package/dist/components/modules/auth/PostCard.d.ts +24 -24
- package/dist/components/modules/auth/PostInteractionsModal.d.ts +11 -11
- package/dist/components/modules/auth/RepostModal.d.ts +21 -21
- package/dist/components/modules/auth/SidebarLeft.d.ts +1 -1
- package/dist/components/modules/auth/Stories.d.ts +1 -1
- package/dist/components/modules/auth/StoryViewer.d.ts +9 -9
- package/dist/components/modules/chat/ChatContainer.d.ts +1 -1
- package/dist/components/modules/chat/ChatInput.d.ts +4 -4
- package/dist/components/modules/chat/ChatList.d.ts +6 -6
- package/dist/components/modules/chat/ChatNotes.d.ts +1 -1
- package/dist/components/modules/community/GroupHeader.d.ts +10 -10
- package/dist/components/modules/community/GroupMenu.d.ts +9 -9
- package/dist/components/modules/community/SchoolCard.d.ts +6 -6
- package/dist/components/modules/community/SurveyCard.d.ts +6 -6
- package/dist/components/modules/guest/Introduction.d.ts +1 -1
- package/dist/components/modules/magaza/BackToStore.d.ts +1 -1
- package/dist/components/modules/magaza/StoreHeader.d.ts +5 -5
- package/dist/components/modules/news/NewsCard.d.ts +11 -11
- package/dist/components/modules/news/NewsComments.d.ts +1 -1
- package/dist/components/modules/profile/ProfileContent.d.ts +4 -4
- package/dist/components/modules/profile/ProfileHeader.d.ts +7 -7
- package/dist/components/modules/profile/ProfileStats.d.ts +1 -1
- package/dist/components/modules/profile/ProfileStats.js +14 -14
- package/dist/components/modules/profile/ProfileStats.js.map +1 -1
- package/dist/components/modules/profile/TeamSelectorModal.d.ts +10 -10
- package/dist/components/modules/stations/StationCard.d.ts +2 -2
- package/dist/components/modules/stations/StationQRModal.d.ts +9 -9
- package/dist/components/shared/FloatingChatButton.d.ts +4 -4
- package/dist/components/shared/Header.d.ts +1 -1
- package/dist/components/shared/LoginModal.d.ts +4 -4
- package/dist/components/shared/LoginModal.d.ts.map +1 -1
- package/dist/components/shared/LoginModal.js +65 -69
- package/dist/components/shared/LoginModal.js.map +1 -1
- package/dist/components/shared/MainLayoutWrapper.d.ts +3 -3
- 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 +18 -18
- package/dist/context/AuthContext.d.ts.map +1 -1
- package/dist/context/AuthContext.js +93 -74
- package/dist/context/AuthContext.js.map +1 -1
- package/dist/context/CartContext.d.ts +16 -16
- package/dist/context/SocketContext.d.ts +12 -12
- package/dist/index.d.ts +65 -65
- package/dist/lib/constants/educationData.d.ts +7 -7
- package/dist/lib/constants/seedData.d.ts +164 -164
- package/dist/lib/constants/stationData.d.ts +13 -13
- package/dist/lib/constants/surveyData.d.ts +2 -2
- package/dist/lib/constants/teamData.d.ts +12 -12
- package/package.json +13 -11
- package/next.config.ts +0 -13
- package/postcss.config.js +0 -6
- package/src/app/layout.tsx +0 -67
- 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,799 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { useState, useEffect, use } from 'react';
|
|
5
|
-
import { LoginModal } from './LoginModal';
|
|
6
|
-
import { useAuth } from '../../context/AuthContext';
|
|
7
|
-
import { useChat } from '../../context/ChatContext';
|
|
8
|
-
import { useLayout } from '../../context/LayoutContext';
|
|
9
|
-
import { useTheme } from '../../context/ThemeContext';
|
|
10
|
-
import { useSocket } from '../../context/SocketContext';
|
|
11
|
-
import { useRouter } from 'next/navigation';
|
|
12
|
-
import Link from 'next/link';
|
|
13
|
-
import { userList, groupList, schoolList } from '../../lib/constants/seedData';
|
|
14
|
-
import { Search, X, Users, MessageSquare, Bell, User, Flag, ShieldAlert, ShieldCheck, Crown, LogOut, Moon, Sun, ArrowRight, Menu, ArrowLeft, GraduationCap } from 'lucide-react';
|
|
15
|
-
|
|
16
|
-
interface NavItem {
|
|
17
|
-
name: string;
|
|
18
|
-
href: string;
|
|
19
|
-
submenu?: { name: string; href: string }[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const navItems: NavItem[] = [
|
|
23
|
-
{
|
|
24
|
-
name: 'Gruplar',
|
|
25
|
-
href: '/gruplar',
|
|
26
|
-
},
|
|
27
|
-
{ name: 'Galeriler', href: '/galeriler' },
|
|
28
|
-
{ name: 'Haberler', href: '/haberler' },
|
|
29
|
-
{ name: 'Çekilişler', href: '/cekilisler' },
|
|
30
|
-
{ name: 'Projeler', href: '/projeler' },
|
|
31
|
-
{
|
|
32
|
-
name: 'Ekibimiz',
|
|
33
|
-
href: '#',
|
|
34
|
-
submenu: [
|
|
35
|
-
{ name: 'Çalışma Ekibi', href: '/ekibimiz/ekip' },
|
|
36
|
-
{ name: 'İnsan Kaynakları', href: '/ekibimiz/ik' },
|
|
37
|
-
{ name: 'Topluluk Kuralları', href: '/kurallar' },
|
|
38
|
-
{ name: 'Hakkımızda', href: '/ekibimiz/hakkimizda' },
|
|
39
|
-
{ name: 'Gizlilik Politikası', href: '/ekibimiz/gizlilik' }
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{ name: 'Forum', href: '/forum' },
|
|
43
|
-
{ name: 'Modlar', href: '/modlar' },
|
|
44
|
-
{ name: 'Etkinlikler', href: '/etkinlikler' },
|
|
45
|
-
{ name: 'Mağaza', href: '/magaza' },
|
|
46
|
-
];
|
|
47
|
-
|
|
48
|
-
export function Header() {
|
|
49
|
-
const { user, session, login, logout, isLoading, isLoginModalOpen, setIsLoginModalOpen } = useAuth();
|
|
50
|
-
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
|
51
|
-
const [isUserMenuOpen, setIsUserMenuOpen] = useState(false);
|
|
52
|
-
const [isNotificationOpen, setIsNotificationOpen] = useState(false);
|
|
53
|
-
const [isGroupsSubmenuOpen, setIsGroupsSubmenuOpen] = useState(false);
|
|
54
|
-
|
|
55
|
-
// Search States
|
|
56
|
-
const [searchQuery, setSearchQuery] = useState('');
|
|
57
|
-
const [isSearchOpen, setIsSearchOpen] = useState(false);
|
|
58
|
-
const [searchResults, setSearchResults] = useState<{ users: any[], groups: any[], schools: any[] }>({ users: [], groups: [], schools: [] });
|
|
59
|
-
|
|
60
|
-
const { theme, toggleTheme } = useTheme();
|
|
61
|
-
const { openChat } = useChat();
|
|
62
|
-
const router = useRouter();
|
|
63
|
-
|
|
64
|
-
// Search Logic
|
|
65
|
-
useEffect(() => {
|
|
66
|
-
if (searchQuery.trim().length < 2) {
|
|
67
|
-
setSearchResults({ users: [], groups: [], schools: [] });
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const query = searchQuery.toLocaleLowerCase('tr-TR');
|
|
72
|
-
const filteredUsers = userList.filter((u: any) =>
|
|
73
|
-
u.displayName.toLocaleLowerCase('tr-TR').includes(query) ||
|
|
74
|
-
u.username.toLocaleLowerCase('tr-TR').includes(query)
|
|
75
|
-
).slice(0, 5);
|
|
76
|
-
|
|
77
|
-
const filteredGroups = groupList.filter((g: any) =>
|
|
78
|
-
g.name.toLocaleLowerCase('tr-TR').includes(query)
|
|
79
|
-
).slice(0, 5);
|
|
80
|
-
|
|
81
|
-
const filteredSchools = schoolList.filter((s: any) =>
|
|
82
|
-
s.name.toLocaleLowerCase('tr-TR').includes(query)
|
|
83
|
-
).slice(0, 5);
|
|
84
|
-
|
|
85
|
-
setSearchResults({ users: filteredUsers, groups: filteredGroups, schools: filteredSchools });
|
|
86
|
-
}, [searchQuery]);
|
|
87
|
-
|
|
88
|
-
const unreadCount = session?.notifications?.filter((n: any) => !n.isRead).length || 0;
|
|
89
|
-
|
|
90
|
-
const markAllAsRead = () => {
|
|
91
|
-
if (session?.notifications) {
|
|
92
|
-
session.notifications.forEach((n: any) => n.isRead = true);
|
|
93
|
-
setIsNotificationOpen(false);
|
|
94
|
-
setTimeout(() => setIsNotificationOpen(true), 10);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const closeSearch = () => {
|
|
99
|
-
setSearchQuery('');
|
|
100
|
-
setIsSearchOpen(false);
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
const goToMyProfile = () => {
|
|
104
|
-
if (user?.username) {
|
|
105
|
-
router.push(`/oyuncular/${user.username}`);
|
|
106
|
-
setIsUserMenuOpen(false);
|
|
107
|
-
setIsMobileMenuOpen(false);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
const handleNotificationClick = (notif: any) => {
|
|
112
|
-
notif.isRead = true;
|
|
113
|
-
if (notif.isClickable && notif.link) {
|
|
114
|
-
router.push(notif.link);
|
|
115
|
-
setIsNotificationOpen(false);
|
|
116
|
-
} else {
|
|
117
|
-
setIsNotificationOpen(false);
|
|
118
|
-
setTimeout(() => setIsNotificationOpen(true), 10);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
return (
|
|
123
|
-
<>
|
|
124
|
-
<header className="sticky top-0 z-40 w-full border-b border-armoyu-header-border bg-armoyu-header-bg transition-all duration-500 backdrop-blur-md">
|
|
125
|
-
<div className="flex items-center justify-between px-4 md:px-8 h-16 w-full max-w-[100vw]">
|
|
126
|
-
|
|
127
|
-
{/* Mobile Hamburger Button */}
|
|
128
|
-
<button
|
|
129
|
-
className="md:hidden flex items-center justify-center w-10 h-10 text-armoyu-text hover:text-blue-500 transition-colors border border-transparent hover:border-armoyu-header-border rounded-lg bg-transparent hover:bg-black/5 dark:hover:bg-white/5"
|
|
130
|
-
onClick={() => setIsMobileMenuOpen(true)}
|
|
131
|
-
title="Menü"
|
|
132
|
-
>
|
|
133
|
-
<Menu size={24} />
|
|
134
|
-
</button>
|
|
135
|
-
|
|
136
|
-
{/* Logo */}
|
|
137
|
-
<div className="flex-shrink-0 flex items-center pr-4 md:pr-8 md:border-r border-armoyu-header-border ml-2 md:ml-0">
|
|
138
|
-
<Link href="/" className="text-xl font-black tracking-tighter bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-indigo-600 dark:from-white dark:to-gray-400 hover:opacity-80 transition-opacity uppercase italic">
|
|
139
|
-
ARMOYU
|
|
140
|
-
</Link>
|
|
141
|
-
</div>
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
{/* Desktop Navigation */}
|
|
146
|
-
<nav className="hidden md:flex items-center gap-1 xl:gap-2 mx-4">
|
|
147
|
-
{navItems.map((item) => (
|
|
148
|
-
<div key={item.name} className="relative group">
|
|
149
|
-
<Link
|
|
150
|
-
href={item.href}
|
|
151
|
-
className="px-3 xl:px-4 py-2 rounded-xl text-sm font-bold text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5 transition-all flex items-center gap-1.5 whitespace-nowrap"
|
|
152
|
-
>
|
|
153
|
-
{item.name}
|
|
154
|
-
{item.submenu && (
|
|
155
|
-
<Menu size={14} className="opacity-50 group-hover:rotate-90 transition-transform" />
|
|
156
|
-
)}
|
|
157
|
-
</Link>
|
|
158
|
-
|
|
159
|
-
{/* Submenu Dropdown */}
|
|
160
|
-
{item.submenu && (
|
|
161
|
-
<div className="absolute top-full left-0 pt-3 opacity-0 translate-y-4 pointer-events-none group-hover:opacity-100 group-hover:translate-y-0 group-hover:pointer-events-auto transition-all duration-300 z-50">
|
|
162
|
-
<div className="bg-white/95 dark:bg-[#12121a]/95 backdrop-blur-xl border border-gray-200 dark:border-white/10 rounded-[28px] shadow-2xl p-2 w-56 overflow-hidden animate-in fade-in slide-in-from-top-2 duration-200">
|
|
163
|
-
{item.submenu.map((sub) => (
|
|
164
|
-
<Link
|
|
165
|
-
key={sub.name}
|
|
166
|
-
href={sub.href}
|
|
167
|
-
className="flex items-center gap-2.5 px-4 py-3 rounded-xl text-xs font-black uppercase tracking-widest text-armoyu-text-muted hover:text-blue-600 dark:hover:text-blue-400 hover:bg-blue-500/5 transition-all decoration-0 group/sub"
|
|
168
|
-
>
|
|
169
|
-
<div className="w-1.5 h-1.5 rounded-full bg-blue-500/40 group-hover/sub:bg-blue-500 transition-colors" />
|
|
170
|
-
{sub.name}
|
|
171
|
-
</Link>
|
|
172
|
-
))}
|
|
173
|
-
</div>
|
|
174
|
-
</div>
|
|
175
|
-
)}
|
|
176
|
-
</div>
|
|
177
|
-
))}
|
|
178
|
-
</nav>
|
|
179
|
-
|
|
180
|
-
{/* Search Bar (Desktop) - Aligned to Right */}
|
|
181
|
-
<div className="hidden lg:flex items-center flex-1 max-w-[280px] ml-auto relative">
|
|
182
|
-
<div className="relative w-full group">
|
|
183
|
-
<div className="absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none">
|
|
184
|
-
<Search size={16} className="text-armoyu-text-muted group-focus-within:text-blue-500 transition-colors" />
|
|
185
|
-
</div>
|
|
186
|
-
<input
|
|
187
|
-
type="text"
|
|
188
|
-
className="block w-full pl-11 pr-4 py-2.5 bg-black/5 dark:bg-white/5 border border-transparent focus:border-blue-500/50 rounded-2xl text-sm font-bold text-armoyu-text placeholder:text-armoyu-text-muted/50 focus:outline-none focus:ring-4 focus:ring-blue-500/10 transition-all"
|
|
189
|
-
placeholder="Ara..."
|
|
190
|
-
value={searchQuery}
|
|
191
|
-
onChange={(e) => setSearchQuery(e.target.value)}
|
|
192
|
-
onFocus={() => setIsSearchOpen(true)}
|
|
193
|
-
/>
|
|
194
|
-
|
|
195
|
-
{/* Desktop Search Results */}
|
|
196
|
-
{isSearchOpen && (searchQuery.length > 0) && (
|
|
197
|
-
<>
|
|
198
|
-
<div className="fixed inset-0 z-40" onClick={() => setIsSearchOpen(false)} />
|
|
199
|
-
<div className="absolute top-full right-0 mt-3 bg-white/95 dark:bg-[#12121a]/95 backdrop-blur-xl border border-gray-200 dark:border-white/10 rounded-[28px] shadow-2xl z-50 overflow-hidden animate-in fade-in zoom-in-95 duration-200 w-[350px]">
|
|
200
|
-
{searchResults.users.length === 0 && searchResults.groups.length === 0 && searchResults.schools.length === 0 ? (
|
|
201
|
-
<div className="p-8 text-center">
|
|
202
|
-
<div className="w-12 h-12 bg-black/5 dark:bg-white/5 rounded-full flex items-center justify-center mx-auto mb-3">
|
|
203
|
-
<Search size={20} className="text-armoyu-text-muted opacity-50" />
|
|
204
|
-
</div>
|
|
205
|
-
<p className="text-xs font-black text-armoyu-text uppercase tracking-widest">Sonuç Bulunamadı</p>
|
|
206
|
-
<p className="text-[10px] text-armoyu-text-muted mt-1">Farklı bir anahtar kelime dene.</p>
|
|
207
|
-
</div>
|
|
208
|
-
) : (
|
|
209
|
-
<div className="max-h-[70vh] overflow-y-auto p-2 space-y-4 py-4">
|
|
210
|
-
{searchResults.users.length > 0 && (
|
|
211
|
-
<div>
|
|
212
|
-
<h5 className="px-4 mb-2 text-[10px] font-black text-armoyu-text-muted uppercase tracking-[0.2em] flex items-center gap-2">
|
|
213
|
-
<User size={12} /> Oyuncular
|
|
214
|
-
</h5>
|
|
215
|
-
<div className="space-y-1">
|
|
216
|
-
{searchResults.users.map((u) => (
|
|
217
|
-
<Link
|
|
218
|
-
key={u.username}
|
|
219
|
-
href={`/oyuncular/${u.username}`}
|
|
220
|
-
onClick={closeSearch}
|
|
221
|
-
className="flex items-center gap-3 p-3 rounded-2xl hover:bg-blue-500/10 transition-colors group"
|
|
222
|
-
>
|
|
223
|
-
<img src={u.avatar} className="w-10 h-10 rounded-xl object-cover ring-2 ring-transparent group-hover:ring-blue-500/30 transition-all" alt={u.displayName} />
|
|
224
|
-
<div>
|
|
225
|
-
<div className="text-sm font-black text-armoyu-text group-hover:text-blue-500 transition-colors">{u.displayName}</div>
|
|
226
|
-
<div className="text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest">@{u.username}</div>
|
|
227
|
-
</div>
|
|
228
|
-
<ArrowRight size={14} className="ml-auto opacity-0 group-hover:opacity-100 -translate-x-2 group-hover:translate-x-0 transition-all text-blue-500" />
|
|
229
|
-
</Link>
|
|
230
|
-
))}
|
|
231
|
-
</div>
|
|
232
|
-
</div>
|
|
233
|
-
)}
|
|
234
|
-
|
|
235
|
-
{searchResults.groups.length > 0 && (
|
|
236
|
-
<div>
|
|
237
|
-
<h5 className="px-4 mb-2 text-[10px] font-black text-armoyu-text-muted uppercase tracking-[0.2em] flex items-center gap-2">
|
|
238
|
-
<Users size={12} /> Gruplar
|
|
239
|
-
</h5>
|
|
240
|
-
<div className="space-y-1">
|
|
241
|
-
{searchResults.groups.map((g) => (
|
|
242
|
-
<Link
|
|
243
|
-
key={g.id}
|
|
244
|
-
href={`/gruplar/${g.id}`}
|
|
245
|
-
onClick={closeSearch}
|
|
246
|
-
className="flex items-center gap-3 p-3 rounded-2xl hover:bg-emerald-500/10 transition-colors group"
|
|
247
|
-
>
|
|
248
|
-
<img src={g.logo} className="w-10 h-10 rounded-xl object-cover ring-2 ring-transparent group-hover:ring-emerald-500/30 transition-all" alt={g.name} />
|
|
249
|
-
<div>
|
|
250
|
-
<div className="text-sm font-black text-armoyu-text group-hover:text-emerald-500 transition-colors">{g.name}</div>
|
|
251
|
-
<div className="text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest">{g.memberCount || 0} Üye</div>
|
|
252
|
-
</div>
|
|
253
|
-
<ArrowRight size={14} className="ml-auto opacity-0 group-hover:opacity-100 -translate-x-2 group-hover:translate-x-0 transition-all text-emerald-500" />
|
|
254
|
-
</Link>
|
|
255
|
-
))}
|
|
256
|
-
</div>
|
|
257
|
-
</div>
|
|
258
|
-
)}
|
|
259
|
-
|
|
260
|
-
{searchResults.schools.length > 0 && (
|
|
261
|
-
<div>
|
|
262
|
-
<h5 className="px-4 mb-2 text-[10px] font-black text-armoyu-text-muted uppercase tracking-[0.2em] flex items-center gap-2">
|
|
263
|
-
<GraduationCap size={12} /> Okullar
|
|
264
|
-
</h5>
|
|
265
|
-
<div className="space-y-1">
|
|
266
|
-
{searchResults.schools.map((s) => (
|
|
267
|
-
<Link
|
|
268
|
-
key={s.id}
|
|
269
|
-
href={`/egitim/${s.slug}`}
|
|
270
|
-
onClick={closeSearch}
|
|
271
|
-
className="flex items-center gap-3 p-3 rounded-2xl hover:bg-blue-500/10 transition-colors group"
|
|
272
|
-
>
|
|
273
|
-
<img src={s.logo} className="w-10 h-10 rounded-xl object-contain bg-white p-1 ring-2 ring-transparent group-hover:ring-blue-500/30 transition-all" alt={s.name} />
|
|
274
|
-
<div>
|
|
275
|
-
<div className="text-sm font-black text-armoyu-text group-hover:text-blue-500 transition-colors">{s.name}</div>
|
|
276
|
-
<div className="text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest">{s.memberCount || 0} Üye</div>
|
|
277
|
-
</div>
|
|
278
|
-
<ArrowRight size={14} className="ml-auto opacity-0 group-hover:opacity-100 -translate-x-2 group-hover:translate-x-0 transition-all text-blue-500" />
|
|
279
|
-
</Link>
|
|
280
|
-
))}
|
|
281
|
-
</div>
|
|
282
|
-
</div>
|
|
283
|
-
)}
|
|
284
|
-
</div>
|
|
285
|
-
)}
|
|
286
|
-
<div className="p-3 bg-black/5 dark:bg-white/5 border-t border-gray-200 dark:border-white/10 text-center">
|
|
287
|
-
<span className="text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest">Arama modunu kapatmak için dışarı tıkla</span>
|
|
288
|
-
</div>
|
|
289
|
-
</div>
|
|
290
|
-
</>
|
|
291
|
-
)}
|
|
292
|
-
</div>
|
|
293
|
-
</div>
|
|
294
|
-
|
|
295
|
-
{/* User Actions */}
|
|
296
|
-
<div className="flex-shrink-0 pl-4 md:pl-8 border-l border-armoyu-header-border flex items-center gap-2 md:gap-4 h-full ml-auto md:ml-0">
|
|
297
|
-
|
|
298
|
-
{/* Mobile Search Trigger */}
|
|
299
|
-
<button
|
|
300
|
-
className="lg:hidden p-2 rounded-xl text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5 transition-all"
|
|
301
|
-
onClick={() => setIsSearchOpen(true)}
|
|
302
|
-
>
|
|
303
|
-
<Search size={22} />
|
|
304
|
-
</button>
|
|
305
|
-
|
|
306
|
-
{user && (
|
|
307
|
-
<div className="relative">
|
|
308
|
-
<button
|
|
309
|
-
onClick={() => setIsNotificationOpen(!isNotificationOpen)}
|
|
310
|
-
className={`relative p-2 rounded-xl transition-all ${isNotificationOpen ? 'bg-blue-500 text-white shadow-lg shadow-blue-500/30' : 'text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5'}`}
|
|
311
|
-
title="Bildirimler"
|
|
312
|
-
>
|
|
313
|
-
<Bell size={22} />
|
|
314
|
-
{unreadCount > 0 && (
|
|
315
|
-
<span className="absolute -top-0.5 -right-0.5 w-5 h-5 bg-red-500 text-white text-[10px] font-black flex items-center justify-center rounded-full border-2 border-armoyu-header-bg animate-bounce">
|
|
316
|
-
{unreadCount}
|
|
317
|
-
</span>
|
|
318
|
-
)}
|
|
319
|
-
</button>
|
|
320
|
-
|
|
321
|
-
{/* Notifications Popover */}
|
|
322
|
-
{isNotificationOpen && (
|
|
323
|
-
<>
|
|
324
|
-
<div className="fixed inset-0 z-40" onClick={() => setIsNotificationOpen(false)} />
|
|
325
|
-
<div className="absolute right-0 mt-3 w-80 md:w-96 bg-white/95 dark:bg-[#12121a]/95 backdrop-blur-xl border border-gray-200 dark:border-white/10 rounded-[32px] shadow-2xl z-50 overflow-hidden animate-in fade-in zoom-in-95 duration-200">
|
|
326
|
-
<div className="p-5 border-b border-gray-200 dark:border-white/10 flex justify-between items-center bg-gray-50/50 dark:bg-white/5">
|
|
327
|
-
<h4 className="text-[11px] font-black text-armoyu-text uppercase tracking-[0.2em]">BİLDİRİMLER</h4>
|
|
328
|
-
<button
|
|
329
|
-
onClick={markAllAsRead}
|
|
330
|
-
className="text-[10px] font-bold text-blue-500 hover:text-blue-400 transition-colors uppercase tracking-widest"
|
|
331
|
-
>
|
|
332
|
-
Hepsini Oku
|
|
333
|
-
</button>
|
|
334
|
-
</div>
|
|
335
|
-
|
|
336
|
-
<div className="max-h-[450px] overflow-y-auto p-1.5">
|
|
337
|
-
{(session?.notifications || []).length > 0 ? (
|
|
338
|
-
(session?.notifications || []).map((notif: any) => (
|
|
339
|
-
<div
|
|
340
|
-
key={notif.id}
|
|
341
|
-
onClick={() => handleNotificationClick(notif)}
|
|
342
|
-
className={`p-4 rounded-2xl hover:bg-black/5 dark:hover:bg-white/5 transition-all group flex gap-4 ${!notif.isRead ? 'bg-blue-500/5' : ''}`}
|
|
343
|
-
>
|
|
344
|
-
<div className="relative shrink-0">
|
|
345
|
-
<img src={notif.sender?.avatar} className="w-11 h-11 rounded-2xl object-cover ring-2 ring-black/5 dark:ring-white/5 shadow-sm" alt="Sender" />
|
|
346
|
-
<div className="absolute -bottom-1 -right-1 w-5 h-5 rounded-lg bg-blue-500 border-2 border-white dark:border-[#12121a] flex items-center justify-center text-white shadow-sm">
|
|
347
|
-
{(notif.type === 'POST_LIKE') && <Flag size={10} fill="currentColor" />}
|
|
348
|
-
{(notif.type === 'POST_COMMENT') && <MessageSquare size={10} fill="currentColor" />}
|
|
349
|
-
{(notif.type === 'GROUP_INVITE') && <Users size={10} fill="currentColor" />}
|
|
350
|
-
{(notif.category === 'SYSTEM') && <ShieldAlert size={10} fill="currentColor" />}
|
|
351
|
-
</div>
|
|
352
|
-
</div>
|
|
353
|
-
<div className="flex-1 min-w-0">
|
|
354
|
-
<div className="flex justify-between items-start mb-0.5">
|
|
355
|
-
<p className="text-sm font-black text-armoyu-text truncate">{notif.title}</p>
|
|
356
|
-
<span className="text-[9px] font-bold text-armoyu-text-muted uppercase tracking-tighter">{notif.createdAt}</span>
|
|
357
|
-
</div>
|
|
358
|
-
<p className="text-[11px] font-medium text-armoyu-text-muted leading-relaxed line-clamp-2">{notif.message}</p>
|
|
359
|
-
</div>
|
|
360
|
-
{!notif.isRead && <div className="w-2.5 h-2.5 rounded-full bg-blue-500 mt-2 shadow-[0_0_10px_rgba(59,130,246,0.6)]" />}
|
|
361
|
-
</div>
|
|
362
|
-
))
|
|
363
|
-
) : (
|
|
364
|
-
<div className="py-16 text-center">
|
|
365
|
-
<Bell size={40} className="mx-auto text-armoyu-text-muted/20 mb-4" />
|
|
366
|
-
<p className="text-xs font-black text-armoyu-text uppercase tracking-widest">Bildirim Bulunmuyor</p>
|
|
367
|
-
</div>
|
|
368
|
-
)}
|
|
369
|
-
</div>
|
|
370
|
-
</div>
|
|
371
|
-
</>
|
|
372
|
-
)}
|
|
373
|
-
</div>
|
|
374
|
-
)}
|
|
375
|
-
|
|
376
|
-
{!isLoading && (
|
|
377
|
-
user ? (
|
|
378
|
-
<button
|
|
379
|
-
onClick={() => setIsUserMenuOpen(true)}
|
|
380
|
-
className="flex items-center gap-3 p-1 rounded-full hover:bg-black/5 dark:hover:bg-white/5 transition-colors border border-transparent hover:border-armoyu-header-border focus:outline-none"
|
|
381
|
-
title="Profilim"
|
|
382
|
-
>
|
|
383
|
-
<img
|
|
384
|
-
src={user.avatar || "https://api.dicebear.com/7.x/avataaars/svg?seed=Armoyu"}
|
|
385
|
-
alt="Avatar"
|
|
386
|
-
className="w-8 h-8 rounded-full border border-blue-500/50 shadow-[0_0_10px_rgba(59,130,246,0.5)] object-cover bg-white/5"
|
|
387
|
-
/>
|
|
388
|
-
<span className="text-sm font-bold text-armoyu-text hidden md:inline-block pr-2">
|
|
389
|
-
{user.displayName.split(' ')[0]}
|
|
390
|
-
</span>
|
|
391
|
-
</button>
|
|
392
|
-
) : (
|
|
393
|
-
<button
|
|
394
|
-
onClick={() => setIsLoginModalOpen(true)}
|
|
395
|
-
className="flex items-center justify-center w-10 h-10 rounded-full bg-black/5 dark:bg-white/5 hover:bg-black/10 dark:hover:bg-white/10 text-armoyu-text-muted hover:text-blue-600 dark:hover:text-blue-400 transition-all border border-armoyu-header-border shadow-sm"
|
|
396
|
-
title="Giriş Yap"
|
|
397
|
-
>
|
|
398
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
|
|
399
|
-
</button>
|
|
400
|
-
)
|
|
401
|
-
)}
|
|
402
|
-
|
|
403
|
-
{isLoading && (
|
|
404
|
-
<div className="w-8 h-8 rounded-full bg-black/5 dark:bg-white/5 animate-pulse border border-armoyu-header-border" />
|
|
405
|
-
)}
|
|
406
|
-
</div>
|
|
407
|
-
|
|
408
|
-
</div>
|
|
409
|
-
</header>
|
|
410
|
-
|
|
411
|
-
{/* Mobile Search Overlay */}
|
|
412
|
-
{isSearchOpen && (
|
|
413
|
-
<div className="fixed inset-0 z-[100] bg-white dark:bg-[#0a0a0b] flex flex-col lg:hidden animate-in fade-in slide-in-from-top duration-300">
|
|
414
|
-
<div className="flex items-center gap-4 p-4 border-b border-gray-200 dark:border-white/10">
|
|
415
|
-
<button onClick={closeSearch} className="p-2 text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5 rounded-xl transition-colors">
|
|
416
|
-
<ArrowLeft size={24} />
|
|
417
|
-
</button>
|
|
418
|
-
<input
|
|
419
|
-
autoFocus
|
|
420
|
-
type="text"
|
|
421
|
-
className="flex-1 bg-transparent border-none text-lg font-bold text-armoyu-text focus:outline-none placeholder:text-armoyu-text-muted/30"
|
|
422
|
-
placeholder="Kimi aramıştın?"
|
|
423
|
-
value={searchQuery}
|
|
424
|
-
onChange={(e) => setSearchQuery(e.target.value)}
|
|
425
|
-
/>
|
|
426
|
-
{searchQuery.length > 0 && (
|
|
427
|
-
<button onClick={() => setSearchQuery('')} className="p-2 text-armoyu-text-muted hover:text-red-500 transition-colors">
|
|
428
|
-
<X size={20} />
|
|
429
|
-
</button>
|
|
430
|
-
)}
|
|
431
|
-
</div>
|
|
432
|
-
|
|
433
|
-
<div className="flex-1 overflow-y-auto p-4 hide-scrollbar">
|
|
434
|
-
{searchQuery.length > 0 ? (
|
|
435
|
-
searchResults.users.length === 0 && searchResults.groups.length === 0 && searchResults.schools.length === 0 ? (
|
|
436
|
-
<div className="py-20 text-center">
|
|
437
|
-
<Search size={48} className="mx-auto text-armoyu-text-muted/10 mb-4" />
|
|
438
|
-
<p className="text-sm font-black text-armoyu-text uppercase tracking-widest">Sonuç Bulunamadı</p>
|
|
439
|
-
</div>
|
|
440
|
-
) : (
|
|
441
|
-
<div className="space-y-8">
|
|
442
|
-
{searchResults.users.length > 0 && (
|
|
443
|
-
<div>
|
|
444
|
-
<h5 className="mb-4 text-[11px] font-black text-armoyu-text-muted uppercase tracking-[0.3em] flex items-center gap-2">
|
|
445
|
-
<User size={14} /> Oyuncular ({searchResults.users.length})
|
|
446
|
-
</h5>
|
|
447
|
-
<div className="space-y-2">
|
|
448
|
-
{searchResults.users.map((u) => (
|
|
449
|
-
<Link
|
|
450
|
-
key={u.username}
|
|
451
|
-
href={`/oyuncular/${u.username}`}
|
|
452
|
-
onClick={closeSearch}
|
|
453
|
-
className="flex items-center gap-4 p-3 rounded-[24px] bg-black/5 dark:bg-white/5 border border-transparent active:scale-95 transition-all"
|
|
454
|
-
>
|
|
455
|
-
<img src={u.avatar} className="w-12 h-12 rounded-2xl object-cover shadow-lg" alt={u.displayName} />
|
|
456
|
-
<div className="flex-1 min-w-0">
|
|
457
|
-
<div className="font-black text-armoyu-text truncate">{u.displayName}</div>
|
|
458
|
-
<div className="text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest">@{u.username}</div>
|
|
459
|
-
</div>
|
|
460
|
-
<ArrowRight size={18} className="text-blue-500" />
|
|
461
|
-
</Link>
|
|
462
|
-
))}
|
|
463
|
-
</div>
|
|
464
|
-
</div>
|
|
465
|
-
)}
|
|
466
|
-
|
|
467
|
-
{searchResults.groups.length > 0 && (
|
|
468
|
-
<div>
|
|
469
|
-
<h5 className="mb-4 text-[11px] font-black text-armoyu-text-muted uppercase tracking-[0.3em] flex items-center gap-2">
|
|
470
|
-
<Users size={14} /> Gruplar ({searchResults.groups.length})
|
|
471
|
-
</h5>
|
|
472
|
-
<div className="space-y-2">
|
|
473
|
-
{searchResults.groups.map((g) => (
|
|
474
|
-
<Link
|
|
475
|
-
key={g.id}
|
|
476
|
-
href={`/gruplar/${g.id}`}
|
|
477
|
-
onClick={closeSearch}
|
|
478
|
-
className="flex items-center gap-4 p-3 rounded-[24px] bg-black/5 dark:bg-white/5 border border-transparent active:scale-95 transition-all"
|
|
479
|
-
>
|
|
480
|
-
<img src={g.logo} className="w-12 h-12 rounded-2xl object-cover shadow-lg" alt={g.name} />
|
|
481
|
-
<div className="flex-1 min-w-0">
|
|
482
|
-
<div className="font-black text-armoyu-text truncate">{g.name}</div>
|
|
483
|
-
<div className="text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest">{g.memberCount || 0} Üye</div>
|
|
484
|
-
</div>
|
|
485
|
-
<ArrowRight size={18} className="text-emerald-500" />
|
|
486
|
-
</Link>
|
|
487
|
-
))}
|
|
488
|
-
</div>
|
|
489
|
-
</div>
|
|
490
|
-
)}
|
|
491
|
-
|
|
492
|
-
{searchResults.schools.length > 0 && (
|
|
493
|
-
<div>
|
|
494
|
-
<h5 className="mb-4 text-[11px] font-black text-armoyu-text-muted uppercase tracking-[0.3em] flex items-center gap-2">
|
|
495
|
-
<GraduationCap size={14} /> Okullar ({searchResults.schools.length})
|
|
496
|
-
</h5>
|
|
497
|
-
<div className="space-y-2">
|
|
498
|
-
{searchResults.schools.map((s) => (
|
|
499
|
-
<Link
|
|
500
|
-
key={s.id}
|
|
501
|
-
href={`/egitim/${s.slug}`}
|
|
502
|
-
onClick={closeSearch}
|
|
503
|
-
className="flex items-center gap-4 p-3 rounded-[32px] bg-black/5 dark:bg-white/5 border border-transparent active:scale-95 transition-all"
|
|
504
|
-
>
|
|
505
|
-
<img src={s.logo} className="w-14 h-14 rounded-2xl object-contain bg-white p-2 shadow-lg" alt={s.name} />
|
|
506
|
-
<div className="flex-1 min-w-0">
|
|
507
|
-
<div className="font-black text-armoyu-text truncate italic">{s.name}</div>
|
|
508
|
-
<div className="text-[10px] font-bold text-armoyu-text-muted uppercase tracking-widest">{s.memberCount || 0} Üye</div>
|
|
509
|
-
</div>
|
|
510
|
-
<ArrowRight size={20} className="text-blue-500" />
|
|
511
|
-
</Link>
|
|
512
|
-
))}
|
|
513
|
-
</div>
|
|
514
|
-
</div>
|
|
515
|
-
)}
|
|
516
|
-
</div>
|
|
517
|
-
)
|
|
518
|
-
) : (
|
|
519
|
-
<div className="py-12 text-center text-armoyu-text-muted">
|
|
520
|
-
<p className="text-xs font-bold uppercase tracking-widest">Aramak için yazmaya başla...</p>
|
|
521
|
-
</div>
|
|
522
|
-
)}
|
|
523
|
-
</div>
|
|
524
|
-
</div>
|
|
525
|
-
)}
|
|
526
|
-
|
|
527
|
-
{/* Mobile Menu Drawer Overlay */}
|
|
528
|
-
{isMobileMenuOpen && (
|
|
529
|
-
<div className="fixed inset-0 z-50 flex animate-in fade-in duration-200">
|
|
530
|
-
<div className="absolute inset-0 bg-black/60 backdrop-blur-sm" onClick={() => setIsMobileMenuOpen(false)} />
|
|
531
|
-
<div className="relative w-[280px] max-w-[80vw] h-full glass-panel bg-armoyu-drawer-bg border-r border-armoyu-drawer-border shadow-2xl flex flex-col pt-6 pb-8 px-6 animate-in slide-in-from-left duration-300">
|
|
532
|
-
<div className="flex items-center justify-between mb-8 border-b border-armoyu-drawer-border pb-4">
|
|
533
|
-
<Link href="/" onClick={() => setIsMobileMenuOpen(false)} className="text-xl font-extrabold tracking-wider text-armoyu-text hover:text-blue-500 transition-colors">
|
|
534
|
-
ARMOYU
|
|
535
|
-
</Link>
|
|
536
|
-
<button onClick={() => setIsMobileMenuOpen(false)} className="text-armoyu-text-muted hover:text-armoyu-text transition-colors bg-black/5 dark:bg-white/5 p-2 rounded-lg hover:bg-black/10 dark:hover:bg-white/10 border border-armoyu-drawer-border">
|
|
537
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
538
|
-
</button>
|
|
539
|
-
</div>
|
|
540
|
-
|
|
541
|
-
<nav className="flex-1 overflow-y-auto hide-scrollbar space-y-1 pr-2">
|
|
542
|
-
{user && (
|
|
543
|
-
<button
|
|
544
|
-
onClick={goToMyProfile}
|
|
545
|
-
className="w-full flex items-center gap-3 py-3.5 px-4 rounded-xl text-blue-600 dark:text-blue-400 bg-blue-500/5 hover:bg-blue-500/10 transition-all text-sm font-black border border-blue-500/10 mb-2 group/mobprof"
|
|
546
|
-
>
|
|
547
|
-
<User size={20} className="group-hover/mobprof:scale-110 transition-transform" />
|
|
548
|
-
Profilim
|
|
549
|
-
<ArrowRight size={16} className="ml-auto opacity-40 group-hover/mobprof:opacity-100 group-hover/mobprof:translate-x-1 transition-all" />
|
|
550
|
-
</button>
|
|
551
|
-
)}
|
|
552
|
-
{navItems.map((item, idx) => (
|
|
553
|
-
<div key={idx}>
|
|
554
|
-
{item.submenu ? (
|
|
555
|
-
<div className="space-y-1">
|
|
556
|
-
<div className="w-full flex items-center justify-between px-4 py-3.5 rounded-xl text-sm font-bold text-armoyu-text-muted">
|
|
557
|
-
<span>{item.name}</span>
|
|
558
|
-
</div>
|
|
559
|
-
<div className="pl-3 space-y-1 border-l border-black/5 dark:border-white/10 ml-4">
|
|
560
|
-
{item.submenu.map((sub, sidx) => (
|
|
561
|
-
<Link
|
|
562
|
-
key={sidx}
|
|
563
|
-
href={sub.href}
|
|
564
|
-
onClick={() => setIsMobileMenuOpen(false)}
|
|
565
|
-
className="w-full text-left px-4 py-2.5 rounded-xl text-sm font-bold text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5 transition-all block"
|
|
566
|
-
>
|
|
567
|
-
{sub.name}
|
|
568
|
-
</Link>
|
|
569
|
-
))}
|
|
570
|
-
</div>
|
|
571
|
-
</div>
|
|
572
|
-
) : (
|
|
573
|
-
<Link
|
|
574
|
-
href={item.href}
|
|
575
|
-
onClick={() => setIsMobileMenuOpen(false)}
|
|
576
|
-
className="block py-3.5 px-4 rounded-xl text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5 transition-all text-sm font-bold border border-transparent"
|
|
577
|
-
>
|
|
578
|
-
{item.name}
|
|
579
|
-
</Link>
|
|
580
|
-
)}
|
|
581
|
-
</div>
|
|
582
|
-
))}
|
|
583
|
-
</nav>
|
|
584
|
-
|
|
585
|
-
<div className="mt-6 pt-6 border-t border-armoyu-drawer-border space-y-3">
|
|
586
|
-
<button
|
|
587
|
-
onClick={toggleTheme}
|
|
588
|
-
className="w-full py-3 px-4 rounded-xl bg-black/5 dark:bg-white/5 border border-armoyu-drawer-border text-armoyu-text-muted hover:text-armoyu-text flex items-center justify-between transition-colors font-bold text-sm"
|
|
589
|
-
>
|
|
590
|
-
<span>Tema Değiştir</span>
|
|
591
|
-
{theme === 'dark' ? (
|
|
592
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>
|
|
593
|
-
) : (
|
|
594
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
|
|
595
|
-
)}
|
|
596
|
-
</button>
|
|
597
|
-
|
|
598
|
-
{user ? (
|
|
599
|
-
<button
|
|
600
|
-
onClick={() => { setIsMobileMenuOpen(false); setIsUserMenuOpen(true); }}
|
|
601
|
-
className="w-full py-4 px-4 rounded-xl font-bold bg-black/5 dark:bg-white/5 border border-armoyu-drawer-border text-armoyu-text flex justify-center items-center gap-2 hover:bg-black/10 dark:hover:bg-white/10 transition-colors"
|
|
602
|
-
>
|
|
603
|
-
Profil Menüsü
|
|
604
|
-
</button>
|
|
605
|
-
) : (
|
|
606
|
-
<button
|
|
607
|
-
onClick={() => { setIsMobileMenuOpen(false); setIsLoginModalOpen(true); }}
|
|
608
|
-
className="w-full py-4 px-4 rounded-xl bg-gradient-to-r from-blue-600 to-blue-500 text-white transition-all text-md font-bold shadow-[0_0_15px_rgba(37,99,235,0.4)]"
|
|
609
|
-
>
|
|
610
|
-
Giriş Yap / Kayıt Ol
|
|
611
|
-
</button>
|
|
612
|
-
)}
|
|
613
|
-
</div>
|
|
614
|
-
</div>
|
|
615
|
-
</div>
|
|
616
|
-
)}
|
|
617
|
-
|
|
618
|
-
{/* User Actions Drawer Overlay */}
|
|
619
|
-
{isUserMenuOpen && user && (
|
|
620
|
-
<div className="fixed inset-0 z-[60] flex justify-end animate-in fade-in duration-200">
|
|
621
|
-
<div
|
|
622
|
-
className="absolute inset-0 bg-black/40 backdrop-blur-sm"
|
|
623
|
-
onClick={() => setIsUserMenuOpen(false)}
|
|
624
|
-
/>
|
|
625
|
-
<div className="relative w-[340px] max-w-[85vw] h-full glass-panel bg-armoyu-drawer-bg border-l border-armoyu-drawer-border shadow-2xl flex flex-col animate-in slide-in-from-right duration-300">
|
|
626
|
-
|
|
627
|
-
{/* Profil Üst Bilgi */}
|
|
628
|
-
<div className="p-6 border-b border-armoyu-drawer-border flex justify-between items-start relative overflow-hidden group">
|
|
629
|
-
<div className="absolute top-0 right-0 w-32 h-32 bg-blue-500/20 blur-[50px] -z-10 rounded-full" />
|
|
630
|
-
|
|
631
|
-
<div className="flex gap-4 items-center">
|
|
632
|
-
<img
|
|
633
|
-
src={user.avatar || "https://api.dicebear.com/7.x/avataaars/svg?seed=Armoyu"}
|
|
634
|
-
alt="Avatar"
|
|
635
|
-
className="w-14 h-14 rounded-full border-2 border-blue-500 shadow-[0_0_15px_rgba(59,130,246,0.4)] object-cover bg-white/5"
|
|
636
|
-
/>
|
|
637
|
-
<div>
|
|
638
|
-
<h3 className="text-armoyu-text font-bold text-lg leading-tight truncate max-w-[150px]">{user.displayName}</h3>
|
|
639
|
-
<span className="text-blue-600 dark:text-blue-400 text-sm font-medium">@{user.username}</span>
|
|
640
|
-
</div>
|
|
641
|
-
</div>
|
|
642
|
-
<button onClick={() => setIsUserMenuOpen(false)} className="text-armoyu-text-muted hover:text-armoyu-text transition-colors bg-black/5 dark:bg-white/5 p-1.5 rounded-lg hover:bg-black/10 dark:hover:bg-white/10 border border-armoyu-drawer-border">
|
|
643
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
644
|
-
</button>
|
|
645
|
-
</div>
|
|
646
|
-
|
|
647
|
-
{/* Menü İkonları / Linkleri */}
|
|
648
|
-
<nav className="flex-1 overflow-y-auto p-4 space-y-1.5 mt-2 hide-scrollbar">
|
|
649
|
-
<button
|
|
650
|
-
onClick={goToMyProfile}
|
|
651
|
-
className="w-full flex items-center gap-3 p-3 text-blue-600 dark:text-blue-400 bg-blue-500/5 hover:bg-blue-500/10 rounded-xl transition-all font-black border border-blue-500/20 text-left focus:outline-none group/prof mb-1"
|
|
652
|
-
>
|
|
653
|
-
<User size={18} className="group-hover/prof:scale-110 transition-transform" />
|
|
654
|
-
Profilime Git
|
|
655
|
-
<ArrowRight size={14} className="ml-auto opacity-40 group-hover/prof:opacity-100 group-hover/prof:translate-x-1 transition-all" />
|
|
656
|
-
</button>
|
|
657
|
-
|
|
658
|
-
{/* Management Panel Link (Conditional) */}
|
|
659
|
-
{['admin', 'member_mgmt', 'discipline', 'event_mgmt'].includes(user.role?.id || '') && (
|
|
660
|
-
<Link
|
|
661
|
-
href="/yonetim"
|
|
662
|
-
onClick={() => setIsUserMenuOpen(false)}
|
|
663
|
-
className="flex items-center gap-3 p-3 bg-blue-500/10 dark:bg-blue-500/20 text-blue-600 dark:text-blue-400 border border-blue-500/30 rounded-xl transition-all font-black shadow-[0_0_15px_rgba(59,130,246,0.15)] mb-2 group animate-in slide-in-from-right-4 duration-500"
|
|
664
|
-
>
|
|
665
|
-
<ShieldCheck size={18} className="group-hover:scale-110 transition-transform" />
|
|
666
|
-
Yönetim Paneli
|
|
667
|
-
<Crown size={14} className="ml-auto opacity-50" />
|
|
668
|
-
</Link>
|
|
669
|
-
)}
|
|
670
|
-
|
|
671
|
-
<Link href="/yazilarim" onClick={() => setIsUserMenuOpen(false)} className="flex items-center gap-3 p-3 text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5 rounded-xl transition-all font-medium border border-transparent hover:border-armoyu-drawer-border">
|
|
672
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>
|
|
673
|
-
Yazılarım
|
|
674
|
-
</Link>
|
|
675
|
-
|
|
676
|
-
<Link
|
|
677
|
-
href="/yazilarim"
|
|
678
|
-
|
|
679
|
-
onClick={() => setIsUserMenuOpen(false)}
|
|
680
|
-
|
|
681
|
-
className="flex items-center gap-3 p-3 text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5 rounded-xl transition-all font-medium border border-transparent hover:border-armoyu-drawer-border"
|
|
682
|
-
>
|
|
683
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>
|
|
684
|
-
Yorumlarım
|
|
685
|
-
</Link>
|
|
686
|
-
|
|
687
|
-
<Link
|
|
688
|
-
href="/anketler"
|
|
689
|
-
onClick={() => setIsUserMenuOpen(false)}
|
|
690
|
-
className="flex items-center gap-3 p-3 text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5 rounded-xl transition-all font-medium border border-transparent hover:border-armoyu-drawer-border"
|
|
691
|
-
>
|
|
692
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="12" y2="16"></line><line x1="16" y1="10" x2="16" y2="16"></line></svg>
|
|
693
|
-
Anketler
|
|
694
|
-
</Link>
|
|
695
|
-
|
|
696
|
-
<div className="space-y-1">
|
|
697
|
-
<button
|
|
698
|
-
onClick={() => setIsGroupsSubmenuOpen(!isGroupsSubmenuOpen)}
|
|
699
|
-
className={`w-full flex items-center gap-3 p-3 rounded-xl transition-all font-medium border border-transparent hover:border-armoyu-drawer-border text-left focus:outline-none ${isGroupsSubmenuOpen ? 'text-blue-500 bg-blue-500/5' : 'text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5'}`}
|
|
700
|
-
>
|
|
701
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>
|
|
702
|
-
Gruplarım
|
|
703
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" className={`ml-auto transition-transform duration-300 ${isGroupsSubmenuOpen ? 'rotate-180' : ''}`}><polyline points="6 9 12 15 18 9"></polyline></svg>
|
|
704
|
-
</button>
|
|
705
|
-
|
|
706
|
-
{isGroupsSubmenuOpen && (
|
|
707
|
-
<div className="pl-4 space-y-1 mt-1 animate-in slide-in-from-top-2 duration-200">
|
|
708
|
-
{(user.groups || []).length > 0 ? (
|
|
709
|
-
(user.groups || []).map((group: any, gidx: number) => (
|
|
710
|
-
<Link
|
|
711
|
-
key={gidx}
|
|
712
|
-
href={`/gruplar/${group.name.toLowerCase().replace(/\s+/g, '-')}`}
|
|
713
|
-
onClick={() => setIsUserMenuOpen(false)}
|
|
714
|
-
className="flex items-center gap-3 p-2.5 rounded-xl text-xs font-bold text-armoyu-text-muted hover:text-blue-500 hover:bg-black/5 dark:hover:bg-white/5 transition-all"
|
|
715
|
-
>
|
|
716
|
-
<img src={group.logo} className="w-7 h-7 rounded-lg bg-white dark:bg-zinc-800 border border-armoyu-drawer-border" />
|
|
717
|
-
<span className="truncate">{group.name}</span>
|
|
718
|
-
</Link>
|
|
719
|
-
))
|
|
720
|
-
) : (
|
|
721
|
-
<div className="py-3 px-4 text-center bg-black/5 dark:bg-white/5 rounded-xl border border-dashed border-armoyu-drawer-border mx-2">
|
|
722
|
-
<span className="text-[10px] font-bold text-armoyu-text-muted opacity-60 block leading-tight">Henüz bir gruba<br />dahil değilsin</span>
|
|
723
|
-
</div>
|
|
724
|
-
)}
|
|
725
|
-
<Link
|
|
726
|
-
href="/gruplar"
|
|
727
|
-
onClick={() => setIsUserMenuOpen(false)}
|
|
728
|
-
className="flex items-center justify-center p-2.5 rounded-xl text-[10px] font-black text-blue-500/60 hover:text-blue-500 hover:bg-blue-500/5 transition-all uppercase tracking-widest"
|
|
729
|
-
>
|
|
730
|
-
Tüm Grupları Gör
|
|
731
|
-
</Link>
|
|
732
|
-
</div>
|
|
733
|
-
)}
|
|
734
|
-
</div>
|
|
735
|
-
|
|
736
|
-
<Link
|
|
737
|
-
href="/cekilisler"
|
|
738
|
-
onClick={() => setIsUserMenuOpen(false)}
|
|
739
|
-
className="flex items-center gap-3 p-3 text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5 rounded-xl transition-all font-medium border border-transparent hover:border-armoyu-drawer-border"
|
|
740
|
-
>
|
|
741
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path></svg>
|
|
742
|
-
Çekiliş
|
|
743
|
-
</Link>
|
|
744
|
-
|
|
745
|
-
<Link
|
|
746
|
-
href="/egitim"
|
|
747
|
-
onClick={() => setIsUserMenuOpen(false)}
|
|
748
|
-
className="flex items-center gap-3 p-3 text-armoyu-text-muted hover:text-armoyu-text hover:bg-black/5 dark:hover:bg-white/5 rounded-xl transition-all font-medium border border-transparent hover:border-armoyu-drawer-border"
|
|
749
|
-
>
|
|
750
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path></svg>
|
|
751
|
-
Eğitim
|
|
752
|
-
</Link>
|
|
753
|
-
|
|
754
|
-
<Link
|
|
755
|
-
href="/destek"
|
|
756
|
-
onClick={() => setIsUserMenuOpen(false)}
|
|
757
|
-
className="flex items-center gap-3 p-3 text-emerald-600 dark:text-emerald-400 hover:bg-emerald-500/10 rounded-xl transition-all font-bold border border-transparent hover:border-emerald-500/20 mt-2"
|
|
758
|
-
>
|
|
759
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>
|
|
760
|
-
Destek Bildirimleri
|
|
761
|
-
</Link>
|
|
762
|
-
|
|
763
|
-
</nav>
|
|
764
|
-
|
|
765
|
-
{/* Tema Butonu & Çıkış */}
|
|
766
|
-
<div className="p-4 border-t border-armoyu-drawer-border space-y-3">
|
|
767
|
-
<button
|
|
768
|
-
onClick={toggleTheme}
|
|
769
|
-
className="w-full py-3 px-4 rounded-xl bg-black/5 dark:bg-white/5 border border-armoyu-drawer-border text-armoyu-text-muted hover:text-armoyu-text flex items-center justify-between transition-colors font-bold text-sm"
|
|
770
|
-
>
|
|
771
|
-
<span>Koyu / Açık Tema Değiştir</span>
|
|
772
|
-
{theme === 'dark' ? (
|
|
773
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>
|
|
774
|
-
) : (
|
|
775
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
|
|
776
|
-
)}
|
|
777
|
-
</button>
|
|
778
|
-
|
|
779
|
-
<button
|
|
780
|
-
onClick={() => {
|
|
781
|
-
logout();
|
|
782
|
-
setIsUserMenuOpen(false);
|
|
783
|
-
}}
|
|
784
|
-
className="flex items-center gap-3 w-full p-4 text-white hover:text-white bg-red-600 hover:bg-red-500 hover:shadow-[0_0_15px_rgba(239,68,68,0.5)] border border-transparent rounded-xl transition-all font-bold"
|
|
785
|
-
>
|
|
786
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
|
|
787
|
-
Sistemden Çıkış Yap
|
|
788
|
-
</button>
|
|
789
|
-
</div>
|
|
790
|
-
|
|
791
|
-
</div>
|
|
792
|
-
</div>
|
|
793
|
-
)}
|
|
794
|
-
|
|
795
|
-
{/* Misafirler için Login Popup */}
|
|
796
|
-
<LoginModal isOpen={!user && isLoginModalOpen} onClose={() => setIsLoginModalOpen(false)} />
|
|
797
|
-
</>
|
|
798
|
-
);
|
|
799
|
-
}
|