Files

43 lines
4.1 KiB
Markdown

# Page Contracts
## Shared Visual Contract
All first-party pages inherit the platform_web game-operations style with black-mecha default materials and a selectable magical-girl theme. Page implementations must use shared theme tokens and surface classes so 首页、服务器管理、插件市场、用户管理、AI 提供商管理、系统维护, server details, drawers, dialogs, safe diffs, plugin-declared pages, and workflow/status surfaces all feel like one console.
- Major surfaces remain transparent jelly/glass panels with visible background desktop, icy rim light, diamond borders, shine sweeps, and candy-color accents.
- Built-in magical desktops and user-uploaded backgrounds render behind readable contrast surfaces.
- Global theme ultimate motion is supplied by the shell-level background layer and lightweight global particle DOM layer, not by page-local fixed decoration elements. It must remain theme-specific and low-cost rather than a dense field of tiny rotating particles.
- Page-specific work must not introduce opaque card islands, unrelated dark/light themes, marketing-style hero layouts, or one-off decorative systems.
- Status, errors, warnings, destructive operations, LLM recommendations, and operation/job feedback remain text/icon-visible and traceable.
## 平台概览(原首页)
Platform-administrator-only first screen. Shows online/offline server counts, abnormal instance count, game type distribution, CPU/memory/disk load, LLM provider connectivity, and recent operational signals (faults, failed jobs, provider errors) that link to the relevant server, plugin, or AI provider context. Each module loads independently with scoped loading/empty/error states.
## 服务器管理
Default landing page for server owners and server administrators. Shows searchable/status-filterable server cards with online/offline state, player count, TPS, latency, CPU, memory, and disk usage; pending metric values render as stable placeholders. Provides create server workflow, refresh, and routed server detail pages. Empty states cover no servers, no matching filters, and role-scoped no-access.
- Create uses the installed plugin plus plugin-declared deployment/startup inputs, then opens the returned instance through one visible operation lifecycle.
- The page must not display raw run credentials, host paths, direct socket details, or AI provider keys.
## 服务器详情
Daily operations hub for one server. Status header shows online state, player count, TPS, latency, CPU/memory/disk progress, metric freshness, and confirmed start, stop, restart, and plugin-declared graceful-update lifecycle actions, plus a game-version module that checks the plugin-declared Steam build probe and only lights up the update action when a newer public build is reported. Plugin-declared pages render as first-class server tabs before platform sections, so each game owns its safe menu surface; SCUM user and vehicle pages read platform-maintained SCUM tables while plugin-owned squads, map settings, gifts, and workflows stay in scoped plugin records. Built-in sections are 管理 (deployment status, metadata, administrators) and AI 助手 (LLM suggestions dispatch a bounded config.write job directly and stream its job logs in the terminal; no raw AI keys reach the frontend). Raw logs, management terminal/RCON input, arbitrary config workbench, generic operation history, runtime-binding, and generic plugin-control tabs must not be exposed in server detail.
## 插件市场
Shows available and installed game management plugins, versions, capabilities, and create-server entry points. Day-to-day plugin actions live in each server's detail page, not here.
## 用户管理
Shows users, roles, permissions, status, and access-management entry points. Platform administrators only.
## AI 提供商管理
Shows configured model providers, base URL, model list, relay mode, status, and test actions. Raw API keys must never be displayed after save. Platform administrators only.
## 系统维护
Shows failed servers, failed tasks, retry actions, and links into the relevant server/detail log context. Platform administrators only.