Realmlist switcher next to PLAY, and a Modules page

- Named realmlists (e.g. Solo, PTR): a drop-down by the PLAY button switches the game client by writing the chosen text into every
  locale's realmlist.wtf (the replaced file is saved first); add / edit / remove with a name and the realmlist text (or just an
  address). First use offers 'Solo' (127.0.0.1) and, if the client held another realmlist, 'Previous'.
- Modules page: bundled catalog (modules/catalog.json) of the optional modules built into the server; switch each on or off (its
  Enable setting), open its page on GitHub, edit its configuration with the module's own documentation. Nine modules to start with.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Sonnet 5.5 committed 2026-10-01 16:10:45 +05:00
1 parent a79c26ed49
commit 81aacdf5bb
17 files changed
+1208 -5

No files matched your search

+6 -2
View File
@@ -1,5 +1,5 @@
import { useEffect, useState } from "react";
import { Archive, Bot, Bug, Gauge, Globe, Server, Settings, Terminal, Users, type LucideIcon } from "lucide-react";
import { Archive, Bot, Bug, Gauge, Globe, Puzzle, Server, Settings, Terminal, Users, type LucideIcon } from "lucide-react";
import { type ServerSummary } from "@/lib/api";
import { useT, type Key } from "@/i18n";
import logo from "@/assets/logo.png";
@@ -12,17 +12,19 @@ import { PlayersPage } from "@/screens/PlayersPage";
import { SettingsHome } from "@/screens/SettingsHome";
import { FriendsPage } from "@/screens/FriendsPage";
import { ReportPage } from "@/screens/ReportPage";
import { ModulesPage } from "@/screens/ModulesPage";
import { ConsolePage } from "@/screens/ConsolePage";
import { Button } from "@/components/ui/button";
import { startServerUpdatePolling, useServerUpdate } from "@/lib/serverUpdate";
import { startClientPolling } from "@/lib/clientUpdate";
type Page = "overview" | "bots" | "server" | "players" | "friends" | "backups" | "console" | "report" | "settings";
type Page = "overview" | "bots" | "server" | "modules" | "players" | "friends" | "backups" | "console" | "report" | "settings";
const NAV: { id: Page; label: Key; icon: LucideIcon; question: Key }[] = [
{ id: "overview", label: "nav.overview", icon: Gauge, question: "q.overview" },
{ id: "bots", label: "nav.bots", icon: Bot, question: "q.bots" },
{ id: "server", label: "nav.server", icon: Server, question: "q.server" },
{ id: "modules", label: "nav.modules", icon: Puzzle, question: "q.modules" },
{ id: "players", label: "nav.players", icon: Users, question: "q.players" },
{ id: "friends", label: "nav.friends", icon: Globe, question: "q.friends" },
{ id: "backups", label: "nav.backups", icon: Archive, question: "q.backups" },
@@ -110,6 +112,8 @@ export function Shell(props: {
<SettingsPage key={`${server.id}-${page}`} serverId={server.id} scope={page} title={t(current.label)} question={t(current.question)} />
) : page === "console" ? (
<ConsolePage key={server.id} serverId={server.id} />
) : page === "modules" ? (
<ModulesPage key={server.id} serverId={server.id} />
) : page === "report" ? (
<ReportPage key={server.id} serverId={server.id} />
) : page === "friends" ? (