From b23607d51d274fdabfa543891b10257c04514093 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Mon, 1 Jun 2026 16:07:49 +0800 Subject: [PATCH] feat(webui): add About tab to settings with Star CTA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New "关于" mini-tab in the settings page showcasing SnowLuma: logo + name + version badge (__APP_VERSION__) + tagline, a short blurb, and a prominent GitHub Star call-to-action linking to SnowLuma/SnowLuma, plus secondary links (repo / releases / issues). Static CTA — no GitHub API fetch, so no rate-limit / loading state. Reuses /logo.png (same asset as sidebar/login) and the existing Card + motion + accent-color design language; responsive centered layout. --- .../src/components/pages/settings-page.tsx | 81 ++++++++++++++++++- 1 file changed, 78 insertions(+), 3 deletions(-) diff --git a/packages/webui/src/components/pages/settings-page.tsx b/packages/webui/src/components/pages/settings-page.tsx index b58daf5d..3241bbc6 100644 --- a/packages/webui/src/components/pages/settings-page.tsx +++ b/packages/webui/src/components/pages/settings-page.tsx @@ -1,6 +1,6 @@ -import { useState } from 'react'; +import { useState, type ReactNode } from 'react'; import { motion } from 'motion/react'; -import { Check, KeyRound, Monitor, Moon, Palette, RefreshCw, ShieldCheck, Sun } from 'lucide-react'; +import { Bug, Check, ExternalLink, Github, Info, KeyRound, Monitor, Moon, Palette, RefreshCw, ShieldCheck, Star, Sun, Tag } from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Label } from '@/components/ui/label'; @@ -29,12 +29,13 @@ const DENSITY_OPTIONS: { value: Density; label: string; description: string }[] { value: 'compact', label: '紧凑', description: '更小的字号与行距,单屏放更多内容' }, ]; -type SettingsTab = 'appearance' | 'data' | 'account'; +type SettingsTab = 'appearance' | 'data' | 'account' | 'about'; const TABS: { key: SettingsTab; label: string; icon: typeof Sun }[] = [ { key: 'appearance', label: '外观', icon: Palette }, { key: 'data', label: '数据刷新', icon: RefreshCw }, { key: 'account', label: '账号安全', icon: ShieldCheck }, + { key: 'about', label: '关于', icon: Info }, ]; export function SettingsPage() { @@ -47,6 +48,7 @@ export function SettingsPage() { {tab === 'appearance' && } {tab === 'data' && } {tab === 'account' && } + {tab === 'about' && } ); } @@ -305,3 +307,76 @@ function AccountPanel() { ); } + +// ─────────────── 关于 ─────────────── + +const REPO_URL = 'https://github.com/SnowLuma/SnowLuma'; + +function AboutPanel() { + return ( + + + {/* brand hero */} + + + + + + + SnowLuma + + v{__APP_VERSION__} + + + Next Remote Protocol Framework · 下一代远程协议框架 + + + + 以轻量注入驱动 QQ NT,对外提供标准 OneBot v11 接口,让机器人一次部署、长期稳定运行。 + + + {/* Star CTA */} + + + 喜欢 SnowLuma?点个 Star 支持一下 + + 开源不易,你的 ⭐ 是我们持续维护的最大动力。 + + + + + 去 GitHub 点 Star + + + + + {/* secondary links */} + + 仓库 + 发行版 + 反馈问题 + + + + ); +} + +function AboutLink({ href, icon: Icon, children }: { href: string; icon: typeof Sun; children: ReactNode }) { + return ( + + + {children} + + + ); +}
Next Remote Protocol Framework · 下一代远程协议框架
+ 以轻量注入驱动 QQ NT,对外提供标准 OneBot v11 接口,让机器人一次部署、长期稳定运行。 +
喜欢 SnowLuma?点个 Star 支持一下
+ 开源不易,你的 ⭐ 是我们持续维护的最大动力。 +