From a959bdce0495f91b9afa2704d2e65e3c2b5c7c81 Mon Sep 17 00:00:00 2001 From: DuckieTM Date: Sat, 28 Mar 2026 08:36:11 +0100 Subject: [PATCH] =?UTF-8?q?=E2=AD=90=20Start=20the=20forum=20framework?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MainView.tsx | 2 + .../groups/views/GroupInformationView.tsx | 5 + .../views/forums/GroupForumListView.tsx | 114 +++++++ .../views/forums/GroupForumNewThreadView.tsx | 95 ++++++ .../views/forums/GroupForumSettingsView.tsx | 113 +++++++ .../views/forums/GroupForumThreadListView.tsx | 187 ++++++++++++ .../views/forums/GroupForumThreadView.tsx | 286 ++++++++++++++++++ .../groups/views/forums/GroupForumView.tsx | 167 ++++++++++ src/components/groups/views/forums/index.ts | 6 + src/components/toolbar/ToolbarMeView.tsx | 3 +- src/css/index.css | 10 +- src/layout/InfiniteGrid.tsx | 7 +- 12 files changed, 988 insertions(+), 7 deletions(-) create mode 100644 src/components/groups/views/forums/GroupForumListView.tsx create mode 100644 src/components/groups/views/forums/GroupForumNewThreadView.tsx create mode 100644 src/components/groups/views/forums/GroupForumSettingsView.tsx create mode 100644 src/components/groups/views/forums/GroupForumThreadListView.tsx create mode 100644 src/components/groups/views/forums/GroupForumThreadView.tsx create mode 100644 src/components/groups/views/forums/GroupForumView.tsx create mode 100644 src/components/groups/views/forums/index.ts diff --git a/src/components/MainView.tsx b/src/components/MainView.tsx index b03d21d..b1660a5 100644 --- a/src/components/MainView.tsx +++ b/src/components/MainView.tsx @@ -12,6 +12,7 @@ import { FloorplanEditorView } from './floorplan-editor/FloorplanEditorView'; import { FriendsView } from './friends/FriendsView'; import { GameCenterView } from './game-center/GameCenterView'; import { GroupsView } from './groups/GroupsView'; +import { GroupForumView } from './groups/views/forums/GroupForumView'; import { GuideToolView } from './guide-tool/GuideToolView'; import { HcCenterView } from './hc-center/HcCenterView'; import { HelpView } from './help/HelpView'; @@ -112,6 +113,7 @@ export const MainView: FC<{}> = props => + diff --git a/src/components/groups/views/GroupInformationView.tsx b/src/components/groups/views/GroupInformationView.tsx index d2f8a80..5da2719 100644 --- a/src/components/groups/views/GroupInformationView.tsx +++ b/src/components/groups/views/GroupInformationView.tsx @@ -94,6 +94,9 @@ export const GroupInformationView: FC = props => case 'popular_groups': CreateLinkEvent('navigator/search/groups'); break; + case 'forum': + CreateLinkEvent('groupforum/' + groupInformation.id); + break; } }; @@ -134,6 +137,8 @@ export const GroupInformationView: FC = props => handleAction('homeroom') }>{ LocalizeText('group.linktobase') } handleAction('furniture') }>{ LocalizeText('group.buyfurni') } handleAction('popular_groups') }>{ LocalizeText('group.showgroups') } + { groupInformation.hasForum && + handleAction('forum') }>{ LocalizeText('group.showforum') } } { (groupInformation.type !== GroupType.PRIVATE || groupInformation.type === GroupType.PRIVATE && groupInformation.membershipType === GroupMembershipType.MEMBER) &&