From 3f96c9c6502243b06efd4bb34a189e72e3a5557c Mon Sep 17 00:00:00 2001
From: yearning <10538594+wangweifeng1999@user.noreply.gitee.com>
Date: 星期一, 28 九月 2026 19:24:55 +0800
Subject: [PATCH] 复制项目

---
 frontend/src/components/SystemBrand.tsx |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/frontend/src/components/SystemBrand.tsx b/frontend/src/components/SystemBrand.tsx
new file mode 100644
index 0000000..ea3bf3b
--- /dev/null
+++ b/frontend/src/components/SystemBrand.tsx
@@ -0,0 +1,32 @@
+import { logoSrc, useSystemSettings } from "../systemSettings";
+
+export default function SystemBrand({ size = "md" }: { size?: "sm" | "md" | "lg" }) {
+  const { settings, logoCacheKey } = useSystemSettings();
+  const logo = logoSrc(settings.logo_url, logoCacheKey);
+  const imgH = size === "lg" ? 48 : size === "sm" ? 28 : 32;
+  const fontSize = size === "lg" ? 22 : size === "sm" ? 15 : 16;
+
+  return (
+    <div style={{ display: "flex", alignItems: "center", gap: 10, minWidth: 0 }}>
+      {logo && (
+        <img
+          src={logo}
+          alt=""
+          style={{ height: imgH, maxWidth: 160, objectFit: "contain", flexShrink: 0 }}
+        />
+      )}
+      <span
+        style={{
+          color: "#1677ff",
+          fontWeight: 600,
+          fontSize,
+          overflow: "hidden",
+          textOverflow: "ellipsis",
+          whiteSpace: "nowrap",
+        }}
+      >
+        {settings.system_name}
+      </span>
+    </div>
+  );
+}

--
Gitblit v1.8.0