mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 02:39:13 +00:00
- app/build/icon.svg + icon.png: hand-retraced vector of the approved reference (three flat layers: coral #e86c39, amber #f7943c, cream #fecb8b on charcoal #231613), Big Sur squircle proportions (824/1024, r185, transparent corners, no glow), flame ~72% optically centered; 8 render-and-compare iterations against the reference; legible at 16px - FlameMark retraced to the same three paths (flat fills, no gradients); flicker now animates the cream core only - AboutModal renders FlameMark instead of the old gradient flame.png; orphaned 70KB asset removed 253/253, typecheck + build green.
79 lines
2.9 KiB
TypeScript
79 lines
2.9 KiB
TypeScript
import { useEffect, type MouseEvent, type ReactNode } from 'react'
|
||
|
||
import { version } from '../../package.json'
|
||
import { FlameMark } from './FlameMark'
|
||
import { codeburn } from '../lib/ipc'
|
||
|
||
export type SocialLink = {
|
||
label: string
|
||
url: string
|
||
icon: ReactNode
|
||
}
|
||
|
||
const RELEASES_URL = 'https://github.com/getagentseal/codeburn/releases'
|
||
|
||
function openExternal(event: MouseEvent<HTMLAnchorElement>, url: string): void {
|
||
event.preventDefault()
|
||
void codeburn.openExternal(url)
|
||
}
|
||
|
||
export function AboutModal({ socials, onClose }: { socials: SocialLink[]; onClose: () => void }) {
|
||
useEffect(() => {
|
||
const onKeyDown = (event: KeyboardEvent) => {
|
||
if (event.key === 'Escape') onClose()
|
||
}
|
||
|
||
document.addEventListener('keydown', onKeyDown)
|
||
return () => document.removeEventListener('keydown', onKeyDown)
|
||
}, [onClose])
|
||
|
||
return (
|
||
<div className="about-modal-backdrop" onClick={onClose}>
|
||
<div
|
||
className="about-modal"
|
||
role="dialog"
|
||
aria-modal="true"
|
||
aria-labelledby="about-modal-title"
|
||
onClick={event => event.stopPropagation()}
|
||
>
|
||
<button className="about-modal-close" type="button" aria-label="Close About" onClick={onClose}>×</button>
|
||
<div className="about-modal-grid">
|
||
<div className="about-modal-hero">
|
||
<span className="about-modal-logo" aria-hidden="true"><FlameMark size={52} /></span>
|
||
<div className="about-modal-name" id="about-modal-title">CodeBurn</div>
|
||
<div className="about-modal-version">v{version}</div>
|
||
<div className="about-modal-tagline">Know where every token goes, across every AI coding tool.</div>
|
||
</div>
|
||
<div className="about-modal-side">
|
||
<div className="about-modal-section">
|
||
<div className="about-modal-section-title">Links</div>
|
||
{socials.map(social => (
|
||
<a
|
||
className="about-modal-link"
|
||
href={social.url}
|
||
key={social.label}
|
||
onClick={event => openExternal(event, social.url)}
|
||
>
|
||
{social.icon}
|
||
<span>{social.label}</span>
|
||
<span className="about-modal-external" aria-hidden="true">↗</span>
|
||
</a>
|
||
))}
|
||
</div>
|
||
<div className="about-modal-section about-modal-updates">
|
||
<div className="about-modal-section-title">Updates</div>
|
||
<button
|
||
className="about-modal-update-button"
|
||
type="button"
|
||
onClick={() => { void codeburn.openExternal(RELEASES_URL) }}
|
||
>
|
||
Check for updates
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div className="about-modal-credit">Developed by Resham Joshi · github.com/iamtoruk</div>
|
||
</div>
|
||
</div>
|
||
)
|
||
}
|