@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.
Files changed (140) hide show
  1. package/dist/app/api/proxy/[...path]/route.d.ts +22 -0
  2. package/dist/app/api/proxy/[...path]/route.d.ts.map +1 -0
  3. package/dist/app/api/proxy/[...path]/route.js +89 -0
  4. package/dist/app/api/proxy/[...path]/route.js.map +1 -0
  5. package/dist/app/layout.d.ts.map +1 -1
  6. package/dist/app/layout.js +2 -5
  7. package/dist/app/layout.js.map +1 -1
  8. package/dist/components/RollingNumber.d.ts +6 -6
  9. package/dist/components/RollingNumber.js +23 -23
  10. package/dist/components/RollingNumber.js.map +1 -1
  11. package/dist/components/StatsGrid.d.ts +5 -5
  12. package/dist/components/modules/auth/Dashboard.d.ts +1 -1
  13. package/dist/components/modules/auth/PostCard.d.ts +24 -24
  14. package/dist/components/modules/auth/PostInteractionsModal.d.ts +11 -11
  15. package/dist/components/modules/auth/RepostModal.d.ts +21 -21
  16. package/dist/components/modules/auth/SidebarLeft.d.ts +1 -1
  17. package/dist/components/modules/auth/Stories.d.ts +1 -1
  18. package/dist/components/modules/auth/StoryViewer.d.ts +9 -9
  19. package/dist/components/modules/chat/ChatContainer.d.ts +1 -1
  20. package/dist/components/modules/chat/ChatInput.d.ts +4 -4
  21. package/dist/components/modules/chat/ChatList.d.ts +6 -6
  22. package/dist/components/modules/chat/ChatNotes.d.ts +1 -1
  23. package/dist/components/modules/community/GroupHeader.d.ts +10 -10
  24. package/dist/components/modules/community/GroupMenu.d.ts +9 -9
  25. package/dist/components/modules/community/SchoolCard.d.ts +6 -6
  26. package/dist/components/modules/community/SurveyCard.d.ts +6 -6
  27. package/dist/components/modules/guest/Introduction.d.ts +1 -1
  28. package/dist/components/modules/magaza/BackToStore.d.ts +1 -1
  29. package/dist/components/modules/magaza/StoreHeader.d.ts +5 -5
  30. package/dist/components/modules/news/NewsCard.d.ts +11 -11
  31. package/dist/components/modules/news/NewsComments.d.ts +1 -1
  32. package/dist/components/modules/profile/ProfileContent.d.ts +4 -4
  33. package/dist/components/modules/profile/ProfileHeader.d.ts +7 -7
  34. package/dist/components/modules/profile/ProfileStats.d.ts +1 -1
  35. package/dist/components/modules/profile/ProfileStats.js +14 -14
  36. package/dist/components/modules/profile/ProfileStats.js.map +1 -1
  37. package/dist/components/modules/profile/TeamSelectorModal.d.ts +10 -10
  38. package/dist/components/modules/stations/StationCard.d.ts +2 -2
  39. package/dist/components/modules/stations/StationQRModal.d.ts +9 -9
  40. package/dist/components/shared/FloatingChatButton.d.ts +4 -4
  41. package/dist/components/shared/Header.d.ts +1 -1
  42. package/dist/components/shared/LoginModal.d.ts +4 -4
  43. package/dist/components/shared/LoginModal.d.ts.map +1 -1
  44. package/dist/components/shared/LoginModal.js +65 -69
  45. package/dist/components/shared/LoginModal.js.map +1 -1
  46. package/dist/components/shared/MainLayoutWrapper.d.ts +3 -3
  47. package/dist/components/showcase/SocialTab.d.ts.map +1 -1
  48. package/dist/components/showcase/SocialTab.js +47 -2
  49. package/dist/components/showcase/SocialTab.js.map +1 -1
  50. package/dist/context/AuthContext.d.ts +18 -18
  51. package/dist/context/AuthContext.d.ts.map +1 -1
  52. package/dist/context/AuthContext.js +93 -74
  53. package/dist/context/AuthContext.js.map +1 -1
  54. package/dist/context/CartContext.d.ts +16 -16
  55. package/dist/context/SocketContext.d.ts +12 -12
  56. package/dist/index.d.ts +65 -65
  57. package/dist/lib/constants/educationData.d.ts +7 -7
  58. package/dist/lib/constants/seedData.d.ts +164 -164
  59. package/dist/lib/constants/stationData.d.ts +13 -13
  60. package/dist/lib/constants/surveyData.d.ts +2 -2
  61. package/dist/lib/constants/teamData.d.ts +12 -12
  62. package/package.json +13 -11
  63. package/next.config.ts +0 -13
  64. package/postcss.config.js +0 -6
  65. package/src/app/layout.tsx +0 -67
  66. package/src/app/page.tsx +0 -101
  67. package/src/components/Button.tsx +0 -41
  68. package/src/components/GenderStatsBar.tsx +0 -66
  69. package/src/components/RollingNumber.tsx +0 -50
  70. package/src/components/Slider.tsx +0 -114
  71. package/src/components/StatsGrid.tsx +0 -35
  72. package/src/components/ViewModeToggle.tsx +0 -39
  73. package/src/components/modules/auth/Dashboard.tsx +0 -649
  74. package/src/components/modules/auth/MediaLightbox.tsx +0 -112
  75. package/src/components/modules/auth/PostCard.tsx +0 -556
  76. package/src/components/modules/auth/PostInteractionsModal.tsx +0 -138
  77. package/src/components/modules/auth/RepostModal.tsx +0 -167
  78. package/src/components/modules/auth/SidebarLeft.tsx +0 -237
  79. package/src/components/modules/auth/Stories.tsx +0 -69
  80. package/src/components/modules/auth/StoryViewer.tsx +0 -146
  81. package/src/components/modules/chat/ChatContainer.tsx +0 -332
  82. package/src/components/modules/chat/ChatInput.tsx +0 -57
  83. package/src/components/modules/chat/ChatList.tsx +0 -179
  84. package/src/components/modules/chat/ChatMessage.tsx +0 -43
  85. package/src/components/modules/chat/ChatNotes.tsx +0 -58
  86. package/src/components/modules/community/GroupHeader.tsx +0 -111
  87. package/src/components/modules/community/GroupMenu.tsx +0 -82
  88. package/src/components/modules/community/SchoolCard.tsx +0 -104
  89. package/src/components/modules/community/SurveyCard.tsx +0 -149
  90. package/src/components/modules/forum/ForumBoard.tsx +0 -78
  91. package/src/components/modules/forum/ForumPost.tsx +0 -71
  92. package/src/components/modules/forum/NewTopicModal.tsx +0 -112
  93. package/src/components/modules/forum/TopicItem.tsx +0 -72
  94. package/src/components/modules/galleries/GalleryCard.tsx +0 -66
  95. package/src/components/modules/giveaways/GiveawayCard.tsx +0 -76
  96. package/src/components/modules/groups/ApplicationModal.tsx +0 -133
  97. package/src/components/modules/groups/GroupCard.tsx +0 -96
  98. package/src/components/modules/guest/Introduction.tsx +0 -60
  99. package/src/components/modules/magaza/BackToStore.tsx +0 -53
  100. package/src/components/modules/magaza/StoreHeader.tsx +0 -74
  101. package/src/components/modules/news/NewsCard.tsx +0 -66
  102. package/src/components/modules/news/NewsComments.tsx +0 -141
  103. package/src/components/modules/profile/CloudStorageModal.tsx +0 -200
  104. package/src/components/modules/profile/EditProfileModal.tsx +0 -191
  105. package/src/components/modules/profile/ProfileContent.tsx +0 -491
  106. package/src/components/modules/profile/ProfileHeader.tsx +0 -128
  107. package/src/components/modules/profile/ProfileStats.tsx +0 -72
  108. package/src/components/modules/profile/TeamSelectorModal.tsx +0 -129
  109. package/src/components/modules/stations/StationCard.tsx +0 -95
  110. package/src/components/modules/stations/StationQRModal.tsx +0 -102
  111. package/src/components/shared/FloatingChatButton.tsx +0 -57
  112. package/src/components/shared/Footer.tsx +0 -77
  113. package/src/components/shared/Header.tsx +0 -799
  114. package/src/components/shared/LoginModal.tsx +0 -208
  115. package/src/components/shared/MainLayoutWrapper.tsx +0 -15
  116. package/src/components/shared/PageWidth.tsx +0 -22
  117. package/src/components/showcase/CommunityTab.tsx +0 -22
  118. package/src/components/showcase/CorporateTab.tsx +0 -38
  119. package/src/components/showcase/GeneralTab.tsx +0 -41
  120. package/src/components/showcase/MessagesTab.tsx +0 -26
  121. package/src/components/showcase/ProfileTab.tsx +0 -20
  122. package/src/components/showcase/ShopTab.tsx +0 -24
  123. package/src/components/showcase/SocialTab.tsx +0 -28
  124. package/src/context/AuthContext.tsx +0 -104
  125. package/src/context/CartContext.tsx +0 -93
  126. package/src/context/ChatContext.tsx +0 -32
  127. package/src/context/LayoutContext.tsx +0 -29
  128. package/src/context/SocketContext.tsx +0 -50
  129. package/src/context/ThemeContext.tsx +0 -52
  130. package/src/index.ts +0 -96
  131. package/src/lib/constants/educationData.ts +0 -124
  132. package/src/lib/constants/punishmentData.ts +0 -201
  133. package/src/lib/constants/seedData.ts +0 -758
  134. package/src/lib/constants/stationData.ts +0 -170
  135. package/src/lib/constants/surveyData.ts +0 -53
  136. package/src/lib/constants/teamData.ts +0 -69
  137. package/src/lib/utils/numberFormat.ts +0 -16
  138. package/src/lib/utils/odpUtils.ts +0 -51
  139. package/src/types/index.ts +0 -1
  140. package/src/types/stats.ts +0 -17
@@ -1,32 +0,0 @@
1
- 'use client';
2
-
3
- import React, { createContext, useContext, useState } from 'react';
4
-
5
- interface ChatContextType {
6
- isChatOpen: boolean;
7
- toggleChat: () => void;
8
- openChat: () => void;
9
- closeChat: () => void;
10
- }
11
-
12
- const ChatContext = createContext<ChatContextType | undefined>(undefined);
13
-
14
- export function ChatProvider({ children }: { children: React.ReactNode }) {
15
- const [isChatOpen, setIsChatOpen] = useState(false);
16
-
17
- const toggleChat = () => setIsChatOpen(!isChatOpen);
18
- const openChat = () => setIsChatOpen(true);
19
- const closeChat = () => setIsChatOpen(false);
20
-
21
- return (
22
- <ChatContext.Provider value={{ isChatOpen, toggleChat, openChat, closeChat }}>
23
- {children}
24
- </ChatContext.Provider>
25
- );
26
- }
27
-
28
- export function useChat() {
29
- const context = useContext(ChatContext);
30
- if (!context) throw new Error('useChat must be used within ChatProvider');
31
- return context;
32
- }
@@ -1,29 +0,0 @@
1
- 'use client';
2
-
3
- import React, { createContext, useContext, useState, ReactNode } from 'react';
4
-
5
- type LayoutContextType = {
6
- pageWidth: string; // Tailwind class like max-w-7xl or max-w-[80vw]
7
- setPageWidth: (width: string) => void;
8
- };
9
-
10
- const LayoutContext = createContext<LayoutContextType | undefined>(undefined);
11
-
12
- export function LayoutProvider({ children }: { children: ReactNode }) {
13
- // Varsayılan masaüstü değeri %80 olarak ayarlanmıştır.
14
- const [pageWidth, setPageWidth] = useState('max-w-[80%]');
15
-
16
- return (
17
- <LayoutContext.Provider value={{ pageWidth, setPageWidth }}>
18
- {children}
19
- </LayoutContext.Provider>
20
- );
21
- }
22
-
23
- export function useLayout() {
24
- const context = useContext(LayoutContext);
25
- if (!context) {
26
- throw new Error('useLayout must be used within a LayoutProvider');
27
- }
28
- return context;
29
- }
@@ -1,50 +0,0 @@
1
- 'use client';
2
-
3
- import React, { createContext, useContext, useState, useEffect } from 'react';
4
- import { socketService, SocketEvent } from '@armoyu/core';
5
-
6
-
7
- interface SocketContextType {
8
- isConnected: boolean;
9
- emit: (event: SocketEvent, data: any) => void;
10
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
- on: (event: SocketEvent, callback: (data: any) => void) => () => void;
12
- }
13
-
14
- const SocketContext = createContext<SocketContextType | undefined>(undefined);
15
-
16
- export function SocketProvider({ children }: { children: React.ReactNode }) {
17
- const [isConnected, setIsConnected] = useState(socketService.isConnected);
18
-
19
- useEffect(() => {
20
- const handleConnect = () => setIsConnected(true);
21
- const handleDisconnect = () => setIsConnected(false);
22
-
23
- const offConnect = socketService.on('connect', handleConnect);
24
- const offDisconnect = socketService.on('disconnect', handleDisconnect);
25
-
26
- return () => {
27
- offConnect();
28
- offDisconnect();
29
- };
30
- }, []);
31
-
32
- return (
33
- <SocketContext.Provider value={{
34
- isConnected,
35
- emit: socketService.emit.bind(socketService),
36
- on: socketService.on.bind(socketService)
37
- }}>
38
- {children}
39
- </SocketContext.Provider>
40
- );
41
- }
42
-
43
- export function useSocket() {
44
- const context = useContext(SocketContext);
45
- if (context === undefined) {
46
- throw new Error('useSocket must be used within a SocketProvider');
47
- }
48
- return context;
49
- }
50
-
@@ -1,52 +0,0 @@
1
- 'use client';
2
-
3
- import React, { createContext, useContext, useState, useEffect } from 'react';
4
-
5
- interface ThemeContextType {
6
- theme: 'dark' | 'light';
7
- toggleTheme: () => void;
8
- }
9
-
10
- const ThemeContext = createContext<ThemeContextType | undefined>(undefined);
11
-
12
- export function ThemeProvider({ children }: { children: React.ReactNode }) {
13
- const [theme, setTheme] = useState<'dark' | 'light'>('dark');
14
-
15
- // Tarayıcı hafızasını okuyarak temayı yükleme (Local Storage)
16
- useEffect(() => {
17
- const savedTheme = localStorage.getItem('armoyu_theme') as 'dark' | 'light';
18
- if (savedTheme === 'light') {
19
- setTheme('light');
20
- document.documentElement.classList.remove('dark');
21
- } else {
22
- setTheme('dark');
23
- document.documentElement.classList.add('dark');
24
- // İlk girişte varsayılan olarak depolanır
25
- localStorage.setItem('armoyu_theme', 'dark');
26
- }
27
- }, []);
28
-
29
- const toggleTheme = () => {
30
- const newTheme = theme === 'dark' ? 'light' : 'dark';
31
- setTheme(newTheme);
32
- localStorage.setItem('armoyu_theme', newTheme);
33
-
34
- if (newTheme === 'dark') {
35
- document.documentElement.classList.add('dark');
36
- } else {
37
- document.documentElement.classList.remove('dark');
38
- }
39
- };
40
-
41
- return (
42
- <ThemeContext.Provider value={{ theme, toggleTheme }}>
43
- {children}
44
- </ThemeContext.Provider>
45
- );
46
- }
47
-
48
- export function useTheme() {
49
- const context = useContext(ThemeContext);
50
- if (!context) throw new Error('useTheme hooks must be used inside ThemeProvider!');
51
- return context;
52
- }
package/src/index.ts DELETED
@@ -1,96 +0,0 @@
1
- export * from './components/Button';
2
- export * from './components/Slider';
3
- export * from './components/RollingNumber';
4
- export * from './components/ViewModeToggle';
5
- export * from './components/GenderStatsBar';
6
- export * from './components/StatsGrid';
7
-
8
- // Contexts
9
- export * from './context/AuthContext';
10
- export * from './context/CartContext';
11
- export * from './context/ChatContext';
12
- export * from './context/LayoutContext';
13
- export * from './context/SocketContext';
14
- export * from './context/ThemeContext';
15
-
16
- // Types & Constants
17
- export * from './types';
18
- export * from './lib/constants/seedData';
19
- export * from './lib/constants/educationData';
20
- export * from './lib/constants/punishmentData';
21
- export * from './lib/constants/stationData';
22
- export * from './lib/constants/surveyData';
23
- export * from './lib/constants/teamData';
24
- export * from './lib/utils/odpUtils';
25
-
26
-
27
- // Shared Components
28
- export { Header } from './components/shared/Header';
29
- export { Footer } from './components/shared/Footer';
30
- export { LoginModal } from './components/shared/LoginModal';
31
- export { FloatingChatButton } from './components/shared/FloatingChatButton';
32
- export { MainLayoutWrapper } from './components/shared/MainLayoutWrapper';
33
- export { PageWidth } from './components/shared/PageWidth';
34
-
35
- // Auth Module
36
- export { Dashboard as AuthDashboard } from './components/modules/auth/Dashboard';
37
- export { Dashboard } from './components/modules/auth/Dashboard';
38
- export { PostCard } from './components/modules/auth/PostCard';
39
- export { PostInteractionsModal } from './components/modules/auth/PostInteractionsModal';
40
- export { RepostModal } from './components/modules/auth/RepostModal';
41
- export { SidebarLeft as AuthSidebarLeft } from './components/modules/auth/SidebarLeft';
42
- export { Stories } from './components/modules/auth/Stories';
43
- export { StoryViewer } from './components/modules/auth/StoryViewer';
44
- export { MediaLightbox, type PostMedia } from './components/modules/auth/MediaLightbox';
45
-
46
- // Chat Module
47
- export { ChatContainer } from './components/modules/chat/ChatContainer';
48
- export { ChatInput } from './components/modules/chat/ChatInput';
49
- export { ChatList } from './components/modules/chat/ChatList';
50
- export { ChatMessage } from './components/modules/chat/ChatMessage';
51
- export { ChatNotes } from './components/modules/chat/ChatNotes';
52
-
53
- // Community Module
54
- export { GroupHeader } from './components/modules/community/GroupHeader';
55
- export { GroupMenu } from './components/modules/community/GroupMenu';
56
- export { SchoolCard } from './components/modules/community/SchoolCard';
57
- export { SurveyCard } from './components/modules/community/SurveyCard';
58
-
59
- // Forum Module
60
- export { ForumBoard } from './components/modules/forum/ForumBoard';
61
- export { ForumPost } from './components/modules/forum/ForumPost';
62
- export { NewTopicModal } from './components/modules/forum/NewTopicModal';
63
- export { TopicItem } from './components/modules/forum/TopicItem';
64
-
65
- // Galleries Module
66
- export { GalleryCard } from './components/modules/galleries/GalleryCard';
67
-
68
- // Giveaways Module
69
- export { GiveawayCard } from './components/modules/giveaways/GiveawayCard';
70
-
71
- // Groups Module
72
- export { GroupCard } from './components/modules/groups/GroupCard';
73
- export { ApplicationModal as GroupApplicationModal } from './components/modules/groups/ApplicationModal';
74
-
75
- // Guest Module
76
- export { Introduction } from './components/modules/guest/Introduction';
77
-
78
- // Magaza Module
79
- export { BackToStore } from './components/modules/magaza/BackToStore';
80
- export { StoreHeader } from './components/modules/magaza/StoreHeader';
81
-
82
- // News Module
83
- export { NewsCard } from './components/modules/news/NewsCard';
84
- export { NewsComments } from './components/modules/news/NewsComments';
85
-
86
- // Profile Module
87
- export { ProfileHeader } from './components/modules/profile/ProfileHeader';
88
- export { ProfileStats } from './components/modules/profile/ProfileStats';
89
- export { ProfileContent } from './components/modules/profile/ProfileContent';
90
- export { EditProfileModal } from './components/modules/profile/EditProfileModal';
91
- export { TeamSelectorModal } from './components/modules/profile/TeamSelectorModal';
92
- export { CloudStorageModal } from './components/modules/profile/CloudStorageModal';
93
-
94
- // Stations Module
95
- export { StationCard } from './components/modules/stations/StationCard';
96
- export { StationQRModal } from './components/modules/stations/StationQRModal';
@@ -1,124 +0,0 @@
1
- import { School, Faculty, Classroom, SchoolTeam, User } from '@armoyu/core';
2
-
3
-
4
- export const MOCK_EDUCATION_DATA = (userList: any[]) => {
5
- // 1. School Teams (Traditional & Esports)
6
- const teams = [
7
- new SchoolTeam({
8
- id: 'st1',
9
- name: 'ARMOYU CS2 Team',
10
- gameOrSport: 'Counter-Strike 2',
11
- type: 'ESPORTS',
12
- schoolId: 'sch1',
13
- captain: userList[0]
14
- }),
15
- new SchoolTeam({
16
- id: 'st2',
17
- name: 'UAV Football Varsity',
18
- gameOrSport: 'Football',
19
- type: 'TRADITIONAL_SPORTS',
20
- schoolId: 'sch1',
21
- captain: userList[11]
22
- }),
23
- new SchoolTeam({
24
- id: 'st3',
25
- name: 'Code Masters LoL',
26
- gameOrSport: 'League of Legends',
27
- type: 'ESPORTS',
28
- schoolId: 'sch2',
29
- captain: userList[1]
30
- })
31
- ];
32
-
33
- // 2. Faculties
34
- const faculties = [
35
- new Faculty({ id: 'f1', name: 'Mühendislik Fakültesi', schoolId: 'sch1', representative: userList[14] }),
36
- new Faculty({ id: 'f2', name: 'İktisadi ve İdari Bilimler Fakültesi', schoolId: 'sch1', representative: userList[12] }),
37
- new Faculty({ id: 'f3', name: 'Fen Edebiyat Fakültesi', schoolId: 'sch2', representative: userList[3] })
38
- ];
39
-
40
- // 3. Classrooms
41
- const classrooms = [
42
- new Classroom({ id: 'c1', name: 'Web Geliştirme 101', schoolId: 'sch1', teacher: userList[0], password: 'armoyu_learn' }),
43
- new Classroom({ id: 'c2', name: 'Algoritma ve Veri Yapıları', schoolId: 'sch1', teacher: userList[14] }),
44
- new Classroom({ id: 'c3', name: 'Dijital Tasarım', schoolId: 'sch2', teacher: userList[1] })
45
- ];
46
-
47
- // 4. Schools
48
- const schools = [
49
- new School({
50
- id: 'sch1',
51
- name: 'İstanbul Teknik Üniversitesi',
52
- slug: 'itu',
53
- logo: 'https://upload.wikimedia.org/wikipedia/tr/a/ae/%C4%B0T%C3%9C_Logo.png',
54
- representative: userList[0],
55
- faculties: faculties.filter(f => f.schoolId === 'sch1'),
56
- teams: teams.filter(t => t.schoolId === 'sch1'),
57
- classrooms: classrooms.filter(cl => cl.schoolId === 'sch1'),
58
- memberCount: 1250
59
- }),
60
- new School({
61
- id: 'sch2',
62
- name: 'Boğaziçi Üniversitesi',
63
- slug: 'bogazici',
64
- logo: 'https://upload.wikimedia.org/wikipedia/tr/b/b3/Bo%C4%9Fazi%C3%A7i_%C3%9Cniversitesi_Logosu.png',
65
- representative: userList[1],
66
- faculties: faculties.filter(f => f.schoolId === 'sch2'),
67
- teams: teams.filter(t => t.schoolId === 'sch2'),
68
- classrooms: classrooms.filter(cl => cl.schoolId === 'sch2'),
69
- memberCount: 890
70
- }),
71
- new School({
72
- id: 'sch3',
73
- name: 'Sivas Cumhuriyet Üniversitesi',
74
- slug: 'cumhuriyet',
75
- logo: 'https://upload.wikimedia.org/wikipedia/tr/a/ac/Cumhuriyet_%C3%9Cniversitesi_Logosu.png',
76
- representative: userList[2],
77
- faculties: [
78
- new Faculty({ id: 'f4', name: 'Tıp Fakültesi', schoolId: 'sch3', representative: userList[4] }),
79
- new Faculty({ id: 'f5', name: 'Eğitim Fakültesi', schoolId: 'sch3', representative: userList[5] })
80
- ],
81
- teams: [
82
- new SchoolTeam({ id: 'st4', name: 'CU Eagles Volleyball', gameOrSport: 'Volleyball', type: 'TRADITIONAL_SPORTS', schoolId: 'sch3', captain: userList[2] }),
83
- new SchoolTeam({ id: 'st5', name: 'CU Valorant', gameOrSport: 'Valorant', type: 'ESPORTS', schoolId: 'sch3', captain: userList[4] })
84
- ],
85
- classrooms: [
86
- new Classroom({ id: 'c4', name: 'Temel Programlama', schoolId: 'sch3', teacher: userList[2] })
87
- ],
88
- memberCount: 2100
89
- }),
90
- new School({
91
- id: 'sch4',
92
- name: 'Tokat Gaziosmanpaşa Üniversitesi',
93
- slug: 'gop',
94
- logo: 'https://upload.wikimedia.org/wikipedia/tr/5/5e/Tokat_Gaziosmanpa%C5%9Fa_%C3%9Cniversitesi_Logosu.png',
95
- representative: userList[3],
96
- faculties: [
97
- new Faculty({ id: 'f6', name: 'Ziraat Fakültesi', schoolId: 'sch4', representative: userList[3] })
98
- ],
99
- teams: [
100
- new SchoolTeam({ id: 'st6', name: 'GOP Football', gameOrSport: 'Football', type: 'TRADITIONAL_SPORTS', schoolId: 'sch4', captain: userList[3] })
101
- ],
102
- classrooms: [],
103
- memberCount: 1450
104
- }),
105
- new School({
106
- id: 'sch5',
107
- name: 'Samsun Ondokuz Mayıs Üniversitesi',
108
- slug: 'omu',
109
- logo: 'https://upload.wikimedia.org/wikipedia/tr/6/6d/Ondokuz_May%C4%B1s_%C3%9Cniversitesi_Logosu.png',
110
- representative: userList[10],
111
- faculties: [
112
- new Faculty({ id: 'f7', name: 'Hukuk Fakültesi', schoolId: 'sch5', representative: userList[10] })
113
- ],
114
- teams: [
115
- new SchoolTeam({ id: 'st7', name: 'OMU Cyber Sports', gameOrSport: 'DotA 2', type: 'ESPORTS', schoolId: 'sch5', captain: userList[11] })
116
- ],
117
- classrooms: [],
118
- memberCount: 3200
119
- })
120
- ];
121
-
122
- return { schools, faculties, teams, classrooms };
123
- };
124
-
@@ -1,201 +0,0 @@
1
- export type RestrictionType = 'CHAT_BAN' | 'POST_BAN' | 'PROFILE_EDIT_BAN' | 'LOGIN_BAN' | 'PERMANENT_BAN';
2
-
3
- export type RuleCategory = 'SOHBET' | 'GÜVENLİK' | 'İÇERİK' | 'HESAP' | 'ETKİNLİK';
4
-
5
- export interface PunishmentRule {
6
- id: string;
7
- article: string; // e.g., "M1.1"
8
- name: string;
9
- category: RuleCategory;
10
- description: string;
11
- duration: number; // in hours, 0 for permanent
12
- restrictions: RestrictionType[];
13
- severity: 'low' | 'medium' | 'high' | 'critical';
14
- isMajor?: boolean; // If true, escalation is stricter. If false, it's educational.
15
- }
16
-
17
- export const PUNISHMENT_RULES: PunishmentRule[] = [
18
- // SOHBET (M1.X)
19
- {
20
- id: 'spam-flood',
21
- article: 'M1.1',
22
- category: 'SOHBET',
23
- name: 'Spam / Flood',
24
- description: 'Sohbet veya yorum alanlarında tekrarlayıcı ve rahatsız edici içerik paylaşımı.',
25
- duration: 24,
26
- restrictions: ['CHAT_BAN'],
27
- severity: 'low',
28
- isMajor: false
29
- },
30
- {
31
- id: 'inappropriate-lang',
32
- article: 'M1.2',
33
- category: 'SOHBET',
34
- name: 'Uygunsuz Dil / Küfür',
35
- description: 'Diğer kullanıcılara yönelik hakaret, küfür veya aşağılayıcı ifadeler.',
36
- duration: 72,
37
- restrictions: ['CHAT_BAN'],
38
- severity: 'medium',
39
- isMajor: true
40
- },
41
- {
42
- id: 'toxic-behavior',
43
- article: 'M1.3',
44
- category: 'SOHBET',
45
- name: 'Toksik Davranış / Kışkırtma',
46
- description: 'Topluluk huzurunu bozmaya yönelik kışkırtmalar ve huzursuzluk çıkarma.',
47
- duration: 48,
48
- restrictions: ['CHAT_BAN'],
49
- severity: 'low',
50
- isMajor: false
51
- },
52
-
53
- // İÇERİK (M2.X)
54
- {
55
- id: 'misleading-content',
56
- article: 'M2.1',
57
- category: 'İÇERİK',
58
- name: 'Hatalı Paylaşım / Clickbait',
59
- description: 'Topluluğu yanıltıcı veya gereksiz (çöp) içerik üretimi.',
60
- duration: 48,
61
- restrictions: ['POST_BAN'],
62
- severity: 'low',
63
- isMajor: false
64
- },
65
- {
66
- id: 'illegal-content',
67
- article: 'M2.2',
68
- category: 'İÇERİK',
69
- name: 'İllegal / Uygunsuz Paylaşım',
70
- description: 'Yasal olmayan içeriklerin, korsan yazılım veya uygunsuz medyanın paylaşımı.',
71
- duration: 0,
72
- restrictions: ['PERMANENT_BAN'],
73
- severity: 'critical',
74
- isMajor: true
75
- },
76
- {
77
- id: 'ad-sharing',
78
- article: 'M2.3',
79
- category: 'İÇERİK',
80
- name: 'İzinsiz Reklam / Tanıtım',
81
- description: 'Yönetimden izin almadan yapılan topluluk, yayıncı veya ürün reklamları.',
82
- duration: 168,
83
- restrictions: ['POST_BAN', 'CHAT_BAN'],
84
- severity: 'medium',
85
- isMajor: false
86
- },
87
-
88
- // GÜVENLİK (M3.X)
89
- {
90
- id: 'harassment',
91
- article: 'M3.1',
92
- category: 'GÜVENLİK',
93
- name: 'Kullanıcı Taciz / Rahatsızlık',
94
- description: 'Kullanıcıları sistematik olarak rahatsız etme veya taciz etme.',
95
- duration: 168,
96
- restrictions: ['CHAT_BAN', 'POST_BAN', 'PROFILE_EDIT_BAN'],
97
- severity: 'high',
98
- isMajor: true
99
- },
100
- {
101
- id: 'doxxing',
102
- article: 'M3.2',
103
- category: 'GÜVENLİK',
104
- name: 'Kişisel Veri İhlali / Doxxing',
105
- description: 'Bir kullanıcının gerçek hayat verilerini, adresini veya telefonunu izinsiz paylaşma.',
106
- duration: 0,
107
- restrictions: ['PERMANENT_BAN'],
108
- severity: 'critical',
109
- isMajor: true
110
- },
111
- {
112
- id: 'bug-abuse',
113
- article: 'M3.3',
114
- category: 'GÜVENLİK',
115
- name: 'Sistem Odaklı Hata Kullanımı',
116
- description: 'Platformdaki hataları (bug) bildirmek yerine kendi çıkarı için kullanma.',
117
- duration: 720, // 1 month
118
- restrictions: ['LOGIN_BAN', 'POST_BAN'],
119
- severity: 'high',
120
- isMajor: true
121
- },
122
-
123
- // HESAP (M4.X)
124
- {
125
- id: 'fake-identity',
126
- article: 'M4.1',
127
- category: 'HESAP',
128
- name: 'Sahte Kimlik / Taklit',
129
- description: 'Başka bir kullanıcıyı veya yetkiliyi taklit etme.',
130
- duration: 0,
131
- restrictions: ['PERMANENT_BAN'],
132
- severity: 'critical',
133
- isMajor: true
134
- },
135
- {
136
- id: 'hate-speech',
137
- article: 'M4.2',
138
- category: 'HESAP',
139
- name: 'Nefret Söylemi / Değerlere Hakaret',
140
- description: 'Dini, milli veya manevi değerlere yönelik ağır hakaret ve saldırı.',
141
- duration: 0,
142
- restrictions: ['PERMANENT_BAN'],
143
- severity: 'critical',
144
- isMajor: true
145
- },
146
- {
147
- id: 'fraud',
148
- article: 'M4.3',
149
- category: 'HESAP',
150
- name: 'Dolandırıcılık / Sahtekarlık',
151
- description: 'Hizmet veya ürün alımlarında kullanıcıları veya sistemi dolandırma girişimi.',
152
- duration: 0,
153
- restrictions: ['PERMANENT_BAN'],
154
- severity: 'critical',
155
- isMajor: true
156
- },
157
- {
158
- id: 'multi-account',
159
- article: 'M4.4',
160
- category: 'HESAP',
161
- name: 'Çoklu Hesap / Multi Account',
162
- description: 'Yasaklandığı halde farklı hesaplarla sisteme tekrar dahil olma girişimi.',
163
- duration: 0,
164
- restrictions: ['PERMANENT_BAN'],
165
- severity: 'critical',
166
- isMajor: true
167
- }
168
- ];
169
-
170
- export const getRestrictionLabel = (type: RestrictionType): string => {
171
- switch (type) {
172
- case 'CHAT_BAN': return 'Sohbet Yasağı';
173
- case 'POST_BAN': return 'Paylaşım Yasağı';
174
- case 'PROFILE_EDIT_BAN': return 'Profil Düzenleme Yasağı';
175
- case 'LOGIN_BAN': return 'Giriş Yasağı';
176
- case 'PERMANENT_BAN': return 'Kalıcı Yasaklama (Ban)';
177
- default: return 'Bilinmeyen Kısıtlama';
178
- }
179
- };
180
-
181
- /**
182
- * Calculates the escalated duration based on the number of previous punishments.
183
- * Formula: base * multiplier
184
- */
185
- export const calculateEscalatedDuration = (baseDuration: number, punishmentCount: number): number => {
186
- if (baseDuration === 0) return 0; // Permanent stays permanent
187
-
188
- const level = getCommunityComplianceLevel(punishmentCount);
189
- return Math.round(baseDuration * level.multiplier);
190
- };
191
-
192
- /**
193
- * Returns the community compliance level details based on involvement count.
194
- */
195
- export const getCommunityComplianceLevel = (count: number) => {
196
- if (count === 0) return { label: 'Tam Uyumlu', color: '#10b981', multiplier: 1.0, severity: 'safe' };
197
- if (count < 3) return { label: 'Biliyor', color: '#3b82f6', multiplier: 1.1, severity: 'low' };
198
- if (count < 6) return { label: 'Dikkat Etmeli', color: '#eab308', multiplier: 1.3, severity: 'medium' };
199
- if (count < 9) return { label: 'Rehberlik Gerekli', color: '#f97316', multiplier: 1.6, severity: 'high' };
200
- return { label: 'İnceleme Altında', color: '#ef4444', multiplier: 2.0, severity: 'critical' };
201
- };