Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions components/modals/AboutModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,30 +45,31 @@ const AboutModal: React.FC<AboutModalProps> = ({ isOpen, onClose, appVersion })
<div className="p-6 text-center text-gray-700 dark:text-gray-300 space-y-4">
<p className="font-bold text-xl">Git Automation Dashboard</p>
<p className="text-sm text-gray-500 dark:text-gray-400">Version {appVersion}</p>

<div className="text-sm">
<p>Design and concept by Tim Sinaeve</p>
<p>Implementation by Gemini 2.5 Pro</p>
</div>

<p className="text-xs text-gray-400 dark:text-gray-500 pt-4">
© 2025 Tim Sinaeve
</p>
</div>

<div className="bg-gray-50 dark:bg-gray-800/50 px-4 py-3 sm:px-6 flex justify-end rounded-b-lg">
<button
type="button"
className="w-full inline-flex justify-center rounded-md border border-gray-300 dark:border-gray-500 shadow-sm px-4 py-2 bg-white dark:bg-gray-700 text-base font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-gray-800 focus:ring-blue-500 sm:w-auto sm:text-sm"
onClick={onClose}
data-automation-id="about-modal-dismiss"
>
Close
</button>
<p className="text-sm">© 2025 Tim Sinaeve. All rights reserved.</p>

<div className="flex flex-col sm:flex-row gap-2 pt-2">
<button
type="button"
className="flex-1 inline-flex justify-center rounded-md border border-gray-300 dark:border-gray-500 px-4 py-1.5 bg-white dark:bg-gray-700 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-gray-800 focus:ring-blue-500"
onClick={() => window.electronAPI?.openWeblink('https://github.com/beNative/git-automation')}
data-automation-id="about-modal-open-github"
>
View on GitHub
</button>
<button
type="button"
className="flex-1 inline-flex justify-center rounded-md border border-gray-300 dark:border-gray-500 px-4 py-1.5 bg-white dark:bg-gray-700 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-gray-800 focus:ring-blue-500"
onClick={() => window.electronAPI?.openInstallationFolder?.()}
data-automation-id="about-modal-open-installation-folder"
>
Open Folder
</button>
</div>
</div>
</div>
</div>
);
};

export default AboutModal;
export default AboutModal;
1 change: 1 addition & 0 deletions electron/electron.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export interface IElectronAPI {
detectExecutables: (repoPath: string) => Promise<string[]>;
launchExecutable: (args: { repoPath: string, executablePath: string }) => Promise<{ success: boolean; output: string }>;
openLocalPath: (path: string) => Promise<{ success: boolean; error?: string }>;
openInstallationFolder: () => Promise<{ success: boolean; error?: string; path?: string }>;
openWeblink: (url: string) => Promise<{ success: boolean; error?: string }>;
openTerminal: (path: string) => Promise<{ success: boolean; error?: string }>;

Expand Down
12 changes: 12 additions & 0 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,18 @@ ipcMain.handle('open-local-path', async (event, localPath: string) => {
}
});

ipcMain.handle('open-installation-folder', async () => {
try {
const executablePath = app.getPath('exe');
const installationFolder = path.dirname(executablePath);
await shell.openPath(installationFolder);
return { success: true, path: installationFolder };
} catch (error: any) {
mainLogger.error('Failed to open installation folder', error);
return { success: false, error: error.message };
}
});

ipcMain.handle('open-weblink', async (event, url: string): Promise<{ success: boolean; error?: string, warning?: string }> => {
try {
const settings = await readSettings();
Expand Down
1 change: 1 addition & 0 deletions electron/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
detectExecutables: (repoPath: string): Promise<string[]> => ipcRenderer.invoke('detect-executables', repoPath),
launchExecutable: (args: { repoPath: string, executablePath: string }): Promise<{ success: boolean; output: string }> => ipcRenderer.invoke('launch-executable', args),
openLocalPath: (path: string): Promise<{ success: boolean; error?: string }> => ipcRenderer.invoke('open-local-path', path),
openInstallationFolder: (): Promise<{ success: boolean; error?: string; path?: string }> => ipcRenderer.invoke('open-installation-folder'),
openWeblink: (url: string): Promise<{ success: boolean; error?: string }> => ipcRenderer.invoke('open-weblink', url),
openTerminal: (path: string): Promise<{ success: boolean; error?: string }> => ipcRenderer.invoke('open-terminal', path),

Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@
async openWeblink(url) {
window.open(url, '_blank', 'noopener');
},
async openInstallationFolder() {
console.info('Requested to open installation folder');
},
async openLocalPath(path) {
console.info('Requested to open local path:', path);
},
Expand Down