Merge branch 'ji' into master (操作日志 Y-Log 上报)
# Conflicts: # CLAUDE.md
This commit is contained in:
commit
053d3e300e
35 files changed
+1182
-125
No files matched your search
@@ -7,6 +7,8 @@ import { toast } from "sonner";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { clearStoredAuth, getAccountDisplayName, getStoredAuth } from "@/core/auth";
|
||||
import { OptType, writeYLog } from "@/core/log/y-log";
|
||||
import { clearYLogToken } from "@/core/log/y-log-token";
|
||||
|
||||
import { SettingsSection } from "./settings-section";
|
||||
|
||||
@@ -40,7 +42,15 @@ export function AccountSettingsPage() {
|
||||
const displayName = getAccountDisplayName(auth);
|
||||
|
||||
const handleLogout = () => {
|
||||
// 操作日志(Y-Log):在清除 token1 之前上报登出(此时 token1 还在),keepalive 保证发出。
|
||||
writeYLog({
|
||||
optType: OptType.logout,
|
||||
optDetail: "B1-CM助手-登出",
|
||||
url: "/api/v1/auth/logout",
|
||||
keepalive: true,
|
||||
});
|
||||
clearStoredAuth();
|
||||
clearYLogToken();
|
||||
// Match the rest of the app's logout flow: blow away the cookie session
|
||||
// by hitting the gateway logout endpoint and then forcing a full reload
|
||||
// so any cached query state goes too.
|
||||
|
||||
Reference in new issue
Block a user