Files
MarkLite/src/renderer/components/AboutDialog/AboutDialog.tsx
T
thzxx 43b0778849 release: v0.3.13 — MeToast 集成与全面质量修复
- 集成 MetonaToast v2.0.0 替换自研 Toast 组件(右上角、进度条、自动关闭、主题联动)
- 修复 sidebar resize 未持久化到 IndexedDB
- 修复 Ctrl+Tab MRU 切换逻辑与文档不一致
- 完善 WYSIWYG 模式标签切换选区恢复
- 清理死代码(useActiveHeading observerRef、旧 Toast 样式、重复滚动条样式、SearchReplace 重复检查)
- 同步 DESIGN.md / docs 文档(CodeMirror→Milkdown、stores 计数、editorStore 字段)
- 新增 .npmrc.example 模板
- 更新关于对话框与文档远程地址为 Gitea
- 版本号 0.3.12 → 0.3.13
2026-07-22 15:55:45 +08:00

56 lines
2.0 KiB
TypeScript

import React from 'react'
import { AppIcon, Gitee } from '../Icons'
import { APP_VERSION } from '../../lib/constants'
interface AboutDialogProps {
onClose: () => void
}
export const AboutDialog = React.memo(function AboutDialog({ onClose }: AboutDialogProps) {
const handleLinkClick = (e: React.MouseEvent<HTMLAnchorElement>): void => {
e.preventDefault()
if (window.electronAPI?.openExternal) {
window.electronAPI.openExternal('https://git.metona.cn/MetonaTeam/MarkLite')
} else {
window.open('https://git.metona.cn/MetonaTeam/MarkLite', '_blank')
}
}
return (
<div className="about-overlay" onClick={onClose} role="dialog" aria-modal="true" aria-label="关于 MarkLite">
<div className="about-dialog" onClick={(e: React.MouseEvent) => e.stopPropagation()}>
<div className="about-header">
<AppIcon size={64} />
<h2>MarkLite</h2>
<span className="about-version">{APP_VERSION}</span>
</div>
<div className="about-body">
<p>一款轻量级的 Windows 本地 Markdown 编辑器</p>
<div className="about-features">
<span>多标签页</span>
<span>实时预览</span>
<span>代码高亮</span>
<span>暗色主题</span>
<span>拖拽打开</span>
<span>搜索替换</span>
<span>文件树</span>
<span>文档大纲</span>
<span>状态持久化</span>
</div>
</div>
<div className="about-footer">
<a className="about-link" href="#" onClick={handleLinkClick}>
<Gitee size={16} />
<span>git.metona.cn/MetonaTeam/MarkLite</span>
</a>
<p>基于 Electron + React + TypeScript 构建</p>
<p className="about-copyright">© 2026 thzxx</p>
</div>
<button className="about-close-btn" onClick={onClose}>关闭</button>
</div>
</div>
)
})
AboutDialog.displayName = 'AboutDialog'