feat(theme): 尝试适配 1.0.5 更新,实现背景自定义功能

- 新增主题配置项,允许用户通过 Komari 后台自定义背景图片、切换时间和过渡效果。
- 更新 GitHub Actions 发布流程,改用 `softprops/action-gh-release@v2` 以简化发布和资产上传步骤。
- 为国旗图片添加懒加载(`loading="lazy"`),优化页面加载性能。
This commit is contained in:
Montia37
2025-08-15 04:46:19 +08:00
parent f6db5cbd64
commit 2e4f2a8a98
9 changed files with 170 additions and 21 deletions

View File

@@ -5,6 +5,7 @@ import "./index.css";
import "@radix-ui/themes/styles.css";
import { Theme } from "@radix-ui/themes";
import { Header } from "@/components/sections/Header";
import DynamicPseudoBackground from "@/components/sections/Background";
import { useTheme } from "@/hooks/useTheme";
import { NodeDataProvider } from "@/contexts/NodeDataContext";
import { LiveDataProvider } from "@/contexts/LiveDataContext";
@@ -45,6 +46,10 @@ const App = () => {
appearance="inherit"
scaling="110%"
style={{ backgroundColor: "transparent" }}>
{/* 使用动态背景组件 */}
{publicSettings && (
<DynamicPseudoBackground publicSettings={publicSettings} />
)}
<div className="min-h-screen flex flex-col text-sm">
<Header
viewMode={viewMode}