perf: replace shell icon bundle

This commit is contained in:
2026-06-05 20:42:34 +08:00
parent 6f7355e689
commit 9a0be35501
7 changed files with 417 additions and 116 deletions
+11 -22
View File
@@ -1,15 +1,3 @@
import {
ArrowDownOutlined,
ArrowUpOutlined,
CheckCircleOutlined,
FlagOutlined,
InfoCircleOutlined,
LoginOutlined,
LogoutOutlined,
PlusCircleOutlined,
UserOutlined,
WalletOutlined,
} from "@ant-design/icons";
import { useEffect, useMemo, useRef, useState } from "react";
import type { ReactNode } from "react";
import { publicConfigClient, type WebPublicConfig } from "../api/publicConfigClient";
@@ -23,6 +11,7 @@ import { AnimatedPanel } from "./AnimatedPanel";
import AdminMonitor from "./AdminMonitor";
import CookieConsentBanner from "./CookieConsentBanner";
import { loadRechargeModal, type RechargeModalComponent } from "./RechargeModal/loadRechargeModal";
import { ShellIcon } from "./ShellIcon";
import { loadDarkGreenTheme } from "../styles/loadDarkGreenTheme";
interface AppShellProps {
@@ -330,7 +319,7 @@ function AppShell({
aria-label="返回页面顶部"
onClick={() => scrollActivePage("top")}
>
<ArrowUpOutlined />
<ShellIcon name="arrow-up" />
</button>
<button
type="button"
@@ -339,7 +328,7 @@ function AppShell({
aria-label="到达页面底部"
onClick={() => scrollActivePage("bottom")}
>
<ArrowDownOutlined />
<ShellIcon name="arrow-down" />
</button>
</div>
) : null}
@@ -369,7 +358,7 @@ function AppShell({
aria-label="网站信息"
onClick={() => setInfoOpen((c) => !c)}
>
<InfoCircleOutlined />
<ShellIcon name="info-circle" />
</button>
<AnimatedPanel open={infoOpen} className="info-popover panel-surface">
<dl>
@@ -392,7 +381,7 @@ function AppShell({
aria-label={`积分余额 ${displayedBalanceLabel}`}
onClick={() => toast.info("充值功能即将开放,敬请期待")}
>
<WalletOutlined />
<ShellIcon name="wallet" />
<span className="member-button__label">{displayedBalanceLabel}</span>
</button>
<div className="profile-popover-anchor" ref={profileRef}>
@@ -416,7 +405,7 @@ function AppShell({
</>
) : (
<>
<LoginOutlined />
<ShellIcon name="login" />
<span> / </span>
</>
)}
@@ -444,7 +433,7 @@ function AppShell({
<div className="profile-popover__footer">
<span>{session?.source === "server" ? "服务器会话" : "预览会话"}</span>
<button type="button" onClick={onLogout}>
<LogoutOutlined />
<ShellIcon name="logout" />
退
</button>
</div>
@@ -456,7 +445,7 @@ function AppShell({
onSelectView("login");
}}
>
<UserOutlined />
<ShellIcon name="user" />
</button>
<button
@@ -467,7 +456,7 @@ function AppShell({
onSelectView("report");
}}
>
<FlagOutlined />
<ShellIcon name="flag" />
</button>
{showCommunityReview ? (
@@ -480,7 +469,7 @@ function AppShell({
onSelectView("communityReview");
}}
>
<CheckCircleOutlined />
<ShellIcon name="check-circle" />
</button>
</>
@@ -495,7 +484,7 @@ function AppShell({
onSelectView("communityCaseAdd");
}}
>
<PlusCircleOutlined />
<ShellIcon name="plus-circle" />
</button>
</>