Refresh status pages in realtime
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { RealtimeRefresh } from "@/components/app-runtime";
|
||||
import { AppShell, OtaCenterCard, PageNav, StatusBar } from "@/components/app-ui";
|
||||
import { requirePageSession } from "@/lib/boss-auth";
|
||||
import { getOtaStatus, readState } from "@/lib/boss-data";
|
||||
@@ -10,6 +11,7 @@ export default async function AboutPage() {
|
||||
|
||||
return (
|
||||
<AppShell bottomNav={false}>
|
||||
<RealtimeRefresh events={["ota.updated"]} />
|
||||
<StatusBar />
|
||||
<PageNav title="关于 / OTA" backHref="/me" />
|
||||
<div className="flex flex-col gap-3 px-[18px] pb-6">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Link from "next/link";
|
||||
import { RealtimeRefresh } from "@/components/app-runtime";
|
||||
import { AppShell, PageNav, StatusBar } from "@/components/app-ui";
|
||||
import { requirePageSession } from "@/lib/boss-auth";
|
||||
import { getAuditSummaryView } from "@/lib/boss-projections";
|
||||
@@ -13,6 +14,7 @@ export default async function AuditPage() {
|
||||
|
||||
return (
|
||||
<AppShell bottomNav={false}>
|
||||
<RealtimeRefresh events={["project.context_risk.updated"]} />
|
||||
<StatusBar />
|
||||
<PageNav title="运维与修复" backHref="/me/ops" />
|
||||
<div className="flex min-h-0 flex-1 flex-col px-[18px] pb-0">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Link from "next/link";
|
||||
import { RealtimeRefresh } from "@/components/app-runtime";
|
||||
import { AppShell, PageNav, RepairTicketActions, StatusBar } from "@/components/app-ui";
|
||||
import { requirePageSession } from "@/lib/boss-auth";
|
||||
import { getOpsSummaryView } from "@/lib/boss-projections";
|
||||
@@ -13,6 +14,7 @@ export default async function OpsPage() {
|
||||
|
||||
return (
|
||||
<AppShell bottomNav={false}>
|
||||
<RealtimeRefresh events={["project.context_risk.updated"]} />
|
||||
<StatusBar />
|
||||
<PageNav title="运维与修复" backHref="/me" />
|
||||
<div className="flex min-h-0 flex-1 flex-col px-[18px] pb-0">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { RealtimeRefresh } from "@/components/app-runtime";
|
||||
import {
|
||||
AppShell,
|
||||
HeaderTitle,
|
||||
@@ -17,6 +18,7 @@ export default async function MePage() {
|
||||
|
||||
return (
|
||||
<AppShell>
|
||||
<RealtimeRefresh events={["ota.updated"]} />
|
||||
<StatusBar />
|
||||
<HeaderTitle title="我的" />
|
||||
<div className="flex flex-col gap-3 px-[18px] pb-5">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import { RealtimeRefresh } from "@/components/app-runtime";
|
||||
import { AppShell, PageNav, StatusBar } from "@/components/app-ui";
|
||||
import { requirePageSession } from "@/lib/boss-auth";
|
||||
import { getThreadContextDetailView } from "@/lib/boss-projections";
|
||||
@@ -21,6 +22,10 @@ export default async function ThreadPage({
|
||||
|
||||
return (
|
||||
<AppShell bottomNav={false}>
|
||||
<RealtimeRefresh
|
||||
projectId={detail.snapshot.projectId}
|
||||
events={["project.context_risk.updated", "conversation.updated"]}
|
||||
/>
|
||||
<StatusBar />
|
||||
<PageNav title="线程详情" backHref={`/conversations/${detail.snapshot.projectId}`} />
|
||||
<div className="space-y-3 px-[18px] pb-6">
|
||||
|
||||
Reference in New Issue
Block a user