- 新增家庭共享订阅管理 - 新增用户邀请统计 - 新增签名和订阅模式设置表单 - 更新 API 服务层和国际化文件 - UI 组件优化(enhanced-input、pro-table)
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
getUserDetail,
|
||||
getUserSubscribeById,
|
||||
} from "@workspace/ui/services/admin/user";
|
||||
import { shortenDeviceIdentifier } from "@workspace/ui/utils/device";
|
||||
import { formatBytes } from "@workspace/ui/utils/formatting";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Display } from "@/components/display";
|
||||
@@ -163,9 +164,14 @@ export function UserDetail({ id }: { id: number }) {
|
||||
|
||||
if (!id) return "--";
|
||||
|
||||
const identifier =
|
||||
data?.auth_methods.find((m) => m.auth_type === "email")?.auth_identifier ||
|
||||
data?.auth_methods[0]?.auth_identifier;
|
||||
const emailMethod = data?.auth_methods.find((m) => m.auth_type === "email");
|
||||
const firstMethod = data?.auth_methods[0];
|
||||
const rawIdentifier =
|
||||
emailMethod?.auth_identifier || firstMethod?.auth_identifier || "";
|
||||
const isDevice = !emailMethod && firstMethod?.auth_type === "device";
|
||||
const identifier = isDevice
|
||||
? shortenDeviceIdentifier(rawIdentifier)
|
||||
: rawIdentifier;
|
||||
|
||||
return (
|
||||
<HoverCard>
|
||||
|
||||
Reference in New Issue
Block a user