feat: use icon.png as app icon on welcome screen and about dialog

This commit is contained in:
2026-07-06 13:41:55 +08:00
parent ed505d48bf
commit 77fdf03ed7
3 changed files with 17 additions and 23 deletions
+14
View File
@@ -0,0 +1,14 @@
declare module '*.png' {
const src: string
export default src
}
declare module '*.svg' {
const src: string
export default src
}
declare module '*.ico' {
const src: string
export default src
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 760 KiB

+3 -23
View File
@@ -1,4 +1,5 @@
import React from 'react' import React from 'react'
import appIconUrl from '../assets/icon.png'
// 统一图标 Props // 统一图标 Props
interface IconProps { interface IconProps {
@@ -9,31 +10,10 @@ interface IconProps {
const defaultProps: Partial<IconProps> = { size: 18 } const defaultProps: Partial<IconProps> = { size: 18 }
// ===== 应用图标(现代化简洁风格) ===== // ===== 应用图标 =====
export function AppIcon({ size = 80 }: IconProps) { export function AppIcon({ size = 80 }: IconProps) {
return ( return (
<svg width={size} height={size} viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg"> <img src={appIconUrl} alt="MarkLite" width={size} height={size} draggable={false} />
<defs>
<linearGradient id="app-bg" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stopColor="#4F8EF7"/>
<stop offset="100%" stopColor="#2563EB"/>
</linearGradient>
<linearGradient id="app-highlight" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stopColor="white" stopOpacity="0.15"/>
<stop offset="50%" stopColor="white" stopOpacity="0"/>
</linearGradient>
</defs>
{/* 圆角矩形背景 */}
<rect x="4" y="4" width="72" height="72" rx="16" fill="url(#app-bg)"/>
{/* 左上角高光 */}
<rect x="4" y="4" width="72" height="72" rx="16" fill="url(#app-highlight)"/>
{/* MD 文字 */}
<text x="40" y="46" textAnchor="middle" dominantBaseline="central"
fontFamily="Georgia, 'Times New Roman', serif" fontWeight="bold" fontSize="24"
fill="white" letterSpacing="1.5">MD</text>
{/* 底部装饰线 */}
<rect x="20" y="58" width="40" height="2.5" rx="1.25" fill="white" fillOpacity="0.25"/>
</svg>
) )
} }