diff --git a/CHANGELOG.md b/CHANGELOG.md index 64f966eb..2867484c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ### 变更 +- 用户可见吉祥物从章鱼换成 XYAI 白色机器人姿势包(欢迎 / 空态 / 探头 / 思考 / 打字 / 任务);桌面启动页与 openXYOS 首页使用同一角色,不再加载章鱼 WebM。 - 桌面更新通道只跟踪 `github.com/XYAIStudio/FreeOS/releases`。不再读取 PyPI `octop`、腾讯云 COS 或其它 Octop 镜像;当前已是最新 FreeOS `v0.0.1` 时不会误报更新。 - 默认主题与残留 Octop `rose` 存储一次性迁移为 XYAI 蓝 `#0033FF`(之后仍可手动选玫瑰粉)。 diff --git a/dashboard/public/octop-mascot-empty.png b/dashboard/public/octop-mascot-empty.png deleted file mode 100644 index 80cdad90..00000000 Binary files a/dashboard/public/octop-mascot-empty.png and /dev/null differ diff --git a/dashboard/public/octop-mascot-peek.webm b/dashboard/public/octop-mascot-peek.webm deleted file mode 100644 index 05de9348..00000000 Binary files a/dashboard/public/octop-mascot-peek.webm and /dev/null differ diff --git a/dashboard/public/octop-mascot-peek.webp b/dashboard/public/octop-mascot-peek.webp deleted file mode 100644 index a5461f96..00000000 Binary files a/dashboard/public/octop-mascot-peek.webp and /dev/null differ diff --git a/dashboard/public/octop-mascot-tasks.png b/dashboard/public/octop-mascot-tasks.png deleted file mode 100644 index 6a3672c8..00000000 Binary files a/dashboard/public/octop-mascot-tasks.png and /dev/null differ diff --git a/dashboard/public/octop-mascot-type.webm b/dashboard/public/octop-mascot-type.webm deleted file mode 100644 index 71d65af1..00000000 Binary files a/dashboard/public/octop-mascot-type.webm and /dev/null differ diff --git a/dashboard/public/octop-mascot-type.webp b/dashboard/public/octop-mascot-type.webp deleted file mode 100644 index 8dbe9954..00000000 Binary files a/dashboard/public/octop-mascot-type.webp and /dev/null differ diff --git a/dashboard/public/xyai-mascot-empty.webp b/dashboard/public/xyai-mascot-empty.webp new file mode 100644 index 00000000..b6a4cc17 Binary files /dev/null and b/dashboard/public/xyai-mascot-empty.webp differ diff --git a/dashboard/public/xyai-mascot-peek.webp b/dashboard/public/xyai-mascot-peek.webp new file mode 100644 index 00000000..cd926eae Binary files /dev/null and b/dashboard/public/xyai-mascot-peek.webp differ diff --git a/dashboard/public/xyai-mascot-tasks.webp b/dashboard/public/xyai-mascot-tasks.webp new file mode 100644 index 00000000..ef4e395b Binary files /dev/null and b/dashboard/public/xyai-mascot-tasks.webp differ diff --git a/dashboard/public/xyai-mascot-think.webp b/dashboard/public/xyai-mascot-think.webp new file mode 100644 index 00000000..2c0fd217 Binary files /dev/null and b/dashboard/public/xyai-mascot-think.webp differ diff --git a/dashboard/public/xyai-mascot-type.webp b/dashboard/public/xyai-mascot-type.webp new file mode 100644 index 00000000..9a5159dc Binary files /dev/null and b/dashboard/public/xyai-mascot-type.webp differ diff --git a/dashboard/public/xyai-mascot-welcome.webp b/dashboard/public/xyai-mascot-welcome.webp new file mode 100644 index 00000000..4398ff7b Binary files /dev/null and b/dashboard/public/xyai-mascot-welcome.webp differ diff --git a/dashboard/src/assets/mascot.ts b/dashboard/src/assets/mascot.ts index d8ae9a9a..82780477 100644 --- a/dashboard/src/assets/mascot.ts +++ b/dashboard/src/assets/mascot.ts @@ -1,5 +1,45 @@ /** - * Shared empty-state mascot (served from ``dashboard/public``). - * Prefer ``OctopEmptyMascot`` / ``EmptyState variant="mascot"`` over hardcoding. + * Shared XYAI / FreeOS mascot pack (served from ``dashboard/public``). + * Prefer ``XyaiMascot`` / ``EmptyState variant="mascot"`` over hardcoding paths. */ -export const OCTOP_EMPTY_MASCOT_SRC = "/octop-mascot-empty.png"; + +export type XyaiMascotPose = + | "welcome" + | "empty" + | "peek" + | "think" + | "type" + | "work" + | "tasks" + | "success"; + +const POSE_FILES: Record = { + welcome: "xyai-mascot-welcome.webp", + empty: "xyai-mascot-empty.webp", + peek: "xyai-mascot-peek.webp", + think: "xyai-mascot-think.webp", + type: "xyai-mascot-type.webp", + work: "xyai-mascot-type.webp", + tasks: "xyai-mascot-tasks.webp", + success: "xyai-mascot-tasks.webp", +}; + +/** Distinct stills for tap-to-switch surfaces (welcome + desktop splash). */ +export const XYAI_MASCOT_SWITCH_POSES = [ + "welcome", + "peek", + "think", + "type", + "tasks", +] as const satisfies readonly XyaiMascotPose[]; + +export function xyaiMascotSrc(pose: XyaiMascotPose = "empty"): string { + const base = import.meta.env.BASE_URL ?? "/"; + return `${base}${POSE_FILES[pose]}`; +} + +export function xyaiMascotSwitchSrcs(): string[] { + return XYAI_MASCOT_SWITCH_POSES.map((pose) => xyaiMascotSrc(pose)); +} + +export const XYAI_EMPTY_MASCOT_SRC = xyaiMascotSrc("empty"); diff --git a/dashboard/src/components/EmptyState/OctopEmptyMascot.tsx b/dashboard/src/components/EmptyState/XyaiMascot.tsx similarity index 58% rename from dashboard/src/components/EmptyState/OctopEmptyMascot.tsx rename to dashboard/src/components/EmptyState/XyaiMascot.tsx index 22f90785..f306f19c 100644 --- a/dashboard/src/components/EmptyState/OctopEmptyMascot.tsx +++ b/dashboard/src/components/EmptyState/XyaiMascot.tsx @@ -1,24 +1,27 @@ -import { OCTOP_EMPTY_MASCOT_SRC } from "../../assets/mascot"; +import { xyaiMascotSrc, type XyaiMascotPose } from "../../assets/mascot"; import styles from "./EmptyState.module.less"; -interface OctopEmptyMascotProps { +interface XyaiMascotProps { className?: string; /** Square edge in px; default 160. */ size?: number; + /** Pose from the shared XYAI pack; default empty-state. */ + pose?: XyaiMascotPose; } /** - * Octop empty-state mascot image with shared sizing. + * XYAI / FreeOS mascot image with shared sizing. * Use inside custom empty UIs or pass as ``EmptyState`` icon / * antd ``Empty`` ``image``. */ -export function OctopEmptyMascot({ +export function XyaiMascot({ className, size = 160, -}: OctopEmptyMascotProps) { + pose = "empty", +}: XyaiMascotProps) { return ( ) : variant === "mascot" ? ( - + ) : (
- +

{t("common.notFound")}

{t("common.notFoundHint")}