import { PublicShell, StatusPill, formatDate } from "../components/Shells"; import { getServiceStatusSnapshot } from "@/db/repository"; export const dynamic = "force-dynamic"; const statusCopy = { operational: { label: "服务正常", tone: "good" as const, summary: "目前没有正在处理的服务故障或维护公告。", }, maintenance: { label: "计划维护", tone: "info" as const, summary: "部分能力正在维护,请按公告中的建议操作。", }, degraded: { label: "服务降级", tone: "warn" as const, summary: "部分用户可能遇到延迟、重连或接入异常。", }, outage: { label: "服务中断", tone: "danger" as const, summary: "当前存在影响使用的服务中断,我们正在处理。", }, }; export default async function ServiceStatusPage() { const snapshot = await getServiceStatusSnapshot(); const copy = statusCopy[snapshot.status]; const resolved = snapshot.recentIncidents.filter( (incident) => incident.status === "resolved", ); return (
{copy.label}

{copy.summary}

这里发布 NekoNest Cloud 免费公测的维护、降级和中断信息。主机自身离线但这里显示正常时,请先查看控制台接入状态。

最近核对:{formatDate(snapshot.checkedAt, true)}
ACTIVE / 处理中

当前事件

{snapshot.activeIncidents.length ? (
{snapshot.activeIncidents.map((incident) => (
{statusCopy[incident.severity].label} {formatDate(incident.started_at, true)}

{incident.title}

{incident.message}

))}
) : (
没有正在处理的事件

如果你仍然无法连接主机,请在控制台提交问题反馈。

)}
HISTORY / 最近恢复

事件记录

{resolved.length ? (
{resolved.map((incident) => (
{incident.title}{formatDate(incident.resolved_at, true)}

{incident.resolution}

))}
) : (

还没有已恢复的公开事件。

)}
); }