Files
MarkLite/src/renderer/components/AboutDialog/AboutDialog.tsx
T
thzxx ee5f35177e release: v0.6.0 — 内置解析器迁移 / Toast 全面接入 / Sqlark 深度集成
- 渲染管线迁移至 MetonaEditor 内置解析器,移除 unified/rehype 全家桶(9 个依赖)
- 修复相对路径图片修复的目录前缀碰撞与路径解析 bug
- ConfirmDialog/useConfirm/LoadingSpinner/useDocStats 移除,改用 MeToast.confirm/loading/promise
- 新增状态栏(字数/行数/阅读时间/光标位置)、Zen 模式、数据备份导出导入
- Sqlark: 版本化迁移(addMigration/migrateTo)、subscribe 表变更、备份 exportAll/importTable
- 数据库损坏自愈:异常退出残留残缺 SSTable 导致打开失败时自动重建
- 大纲导航改用 scrollToLine 官方 API
- 修复 rollup 平台包互删(postinstall 自动补齐)+ 集成测试(fake-indexeddb)
2026-08-09 16:50:06 +08:00

68 lines
2.2 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>
<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>MetonaEditor 0.4.0 · MetonaToast 0.5.0 · MetonaSqlark 0.4.1</p>
<p className="about-copyright">© 2026 thzxx</p>
</div>
<button className="about-close-btn" onClick={onClose}>
关闭
</button>
</div>
</div>
)
})
AboutDialog.displayName = 'AboutDialog'