1- import React , { useRef } from 'react' ;
1+ import React , { useCallback , useRef } from 'react' ;
22import Modal from './Modal' ;
3+ import Button from './Button' ;
34
45const appIconUrl = new URL ( '../assets/icon.svg' , import . meta. url ) . href ;
56
@@ -9,6 +10,16 @@ interface AboutModalProps {
910
1011const AboutModal : React . FC < AboutModalProps > = ( { onClose } ) => {
1112 const githubLinkRef = useRef < HTMLAnchorElement > ( null ) ;
13+ const handleOpenExecutableFolder = useCallback ( async ( ) => {
14+ try {
15+ const result = await window . electronAPI ?. openExecutableFolder ?.( ) ;
16+ if ( result && ! result . success && result . error ) {
17+ console . error ( 'Failed to open executable folder:' , result . error ) ;
18+ }
19+ } catch ( error ) {
20+ console . error ( 'Failed to open executable folder:' , error ) ;
21+ }
22+ } , [ ] ) ;
1223
1324 return (
1425 < Modal title = "About DocForge" onClose = { onClose } initialFocusRef = { githubLinkRef } >
@@ -22,15 +33,27 @@ const AboutModal: React.FC<AboutModalProps> = ({ onClose }) => {
2233 < p className = "text-sm text-text-secondary" > © 2025 Tim Sinaeve. All rights reserved.</ p >
2334 </ div >
2435 </ div >
25- < a
26- ref = { githubLinkRef }
27- href = "https://github.com/beNative/docforge"
28- target = "_blank"
29- rel = "noopener noreferrer"
30- className = "inline-flex items-center justify-center px-3 py-1.5 text-xs font-semibold rounded-md border border-transparent bg-primary text-primary-text hover:bg-primary-hover focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:ring-offset-background transition-colors duration-150"
31- >
32- View source on GitHub
33- </ a >
36+ < div className = "flex flex-col items-center space-y-2" >
37+ < div className = "flex flex-wrap items-center justify-center gap-2" >
38+ < a
39+ ref = { githubLinkRef }
40+ href = "https://github.com/beNative/docforge"
41+ target = "_blank"
42+ rel = "noopener noreferrer"
43+ className = "inline-flex items-center justify-center px-3 py-1.5 text-xs font-semibold rounded-md border border-transparent bg-primary text-primary-text hover:bg-primary-hover focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:ring-offset-background transition-colors duration-150"
44+ >
45+ View source on GitHub
46+ </ a >
47+ < Button
48+ type = "button"
49+ variant = "secondary"
50+ onClick = { handleOpenExecutableFolder }
51+ className = "text-xs"
52+ >
53+ Open installation folder
54+ </ Button >
55+ </ div >
56+ </ div >
3457 </ div >
3558 </ Modal >
3659 ) ;
0 commit comments