import { useEffect, useState, type MouseEvent, type ReactNode } from 'react' import { version } from '../../package.json' import { FlameMark } from './FlameMark' import { BUILD_STAMP } from '../lib/build' import { updateDownloadUrl, useUpdateStatus } from '../hooks/useUpdateStatus' import { codeburn } from '../lib/ipc' export type SocialLink = { label: string url: string icon: ReactNode } function openExternal(event: MouseEvent, url: string): void { event.preventDefault() void codeburn.openExternal(url) } export function AboutModal({ socials, onClose }: { socials: SocialLink[]; onClose: () => void }) { const status = useUpdateStatus() const [checked, setChecked] = useState(false) useEffect(() => { const onKeyDown = (event: KeyboardEvent) => { if (event.key === 'Escape') onClose() } document.addEventListener('keydown', onKeyDown) return () => document.removeEventListener('keydown', onKeyDown) }, [onClose]) return (
event.stopPropagation()} >
CodeBurn
v{version}
{BUILD_STAMP}
Know where every token goes, across every AI coding tool.
Updates
{checked && (

{status?.updateAvailable && status.tag ? ( <> Update available: {status.latestVersion} ·{' '} ) : status?.latestVersion ? ( "You're on the latest version" ) : ( 'Unable to check right now' )}

)}
Developed by Resham Joshi · github.com/iamtoruk
) }