mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
7535cd823f
- Updated Sidebar component to consolidate navigation items under new categories: Moderation, Content, and Operations. - Removed outdated pages and integrated their functionalities into tabs under Players, Activity, Content, and Settings. - Introduced new Activity and Content pages to house Audit, Player Logs, Community Board, and Loading Tips with tabbed navigation. - Created a unified Moderation page combining Players, Bans, and Reports with tabbed navigation. - Refactored individual pages (e.g., Audit, Bans, CommunityBoard, etc.) to support embedded mode for better integration within modals. - Added Tabs component for consistent tab navigation across multiple pages. - Updated README to reflect changes in navigation and settings structure. - Removed Grants page as it is not yet implemented.
32 lines
1.2 KiB
TypeScript
32 lines
1.2 KiB
TypeScript
import { Players } from './Players';
|
|
import { Bans } from './Bans';
|
|
import { Reports } from './Reports';
|
|
import { PageHeader } from '../components/PageHeader';
|
|
import { Tabs, useTabParam } from '../components/Tabs';
|
|
|
|
// Unified moderation hub. The account directory (with its per-player
|
|
// detail / ban / grant / gift / password modal), the active-ban list,
|
|
// and the open-report queue were three separate sidebar entries — they
|
|
// describe one workflow, so they're tabs of one page now. The old
|
|
// /bans and /reports routes redirect here with ?tab= preselected.
|
|
export function Moderation() {
|
|
const [tab, setTab] = useTabParam<'directory' | 'bans' | 'reports'>('directory', ['directory', 'bans', 'reports']);
|
|
return (
|
|
<div>
|
|
<PageHeader title="Players" blurb="Search and moderate accounts, review active bans, and triage open reports." />
|
|
<Tabs
|
|
tabs={[
|
|
{ key: 'directory', label: 'Directory' },
|
|
{ key: 'bans', label: 'Bans' },
|
|
{ key: 'reports', label: 'Reports' },
|
|
]}
|
|
active={tab}
|
|
onChange={setTab}
|
|
/>
|
|
{tab === 'directory' && <Players embedded />}
|
|
{tab === 'bans' && <Bans embedded />}
|
|
{tab === 'reports' && <Reports embedded />}
|
|
</div>
|
|
);
|
|
}
|