Refresh settings page in realtime
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { RealtimeRefresh } from "@/components/app-runtime";
|
||||
import { AppShell, PageNav, SettingsForm, StatusBar } from "@/components/app-ui";
|
||||
import { requirePageSession } from "@/lib/boss-auth";
|
||||
import { readState } from "@/lib/boss-data";
|
||||
@@ -10,6 +11,7 @@ export default async function SettingsPage() {
|
||||
|
||||
return (
|
||||
<AppShell bottomNav={false}>
|
||||
<RealtimeRefresh events={["settings.updated"]} />
|
||||
<StatusBar />
|
||||
<PageNav title="设置" backHref="/me" />
|
||||
<div className="space-y-3 px-[18px] pb-6">
|
||||
|
||||
@@ -9630,7 +9630,7 @@ export async function updateUserSettings(settings: Partial<UserSettings>) {
|
||||
};
|
||||
return state.user.settings;
|
||||
});
|
||||
publishBossEvent("conversation.updated", { deviceId: PRIMARY_CODEX_NODE_ID });
|
||||
publishBossEvent("settings.updated");
|
||||
return nextSettings;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ export type BossEventName =
|
||||
| "ai_accounts.updated"
|
||||
| "devices.updated"
|
||||
| "devices.skills.updated"
|
||||
| "settings.updated"
|
||||
| "storage.updated"
|
||||
| "ota.updated";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user