Skip to content

Commit 59790e2

Browse files
authored
Merge pull request #97 from beNative/codex/update-about-box-with-new-text-and-buttons
Remove redundant About modal footer button
2 parents 4eb4aa7 + d620658 commit 59790e2

File tree

5 files changed

+38
-20
lines changed

5 files changed

+38
-20
lines changed

components/modals/AboutModal.tsx

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,30 +45,31 @@ const AboutModal: React.FC<AboutModalProps> = ({ isOpen, onClose, appVersion })
4545
<div className="p-6 text-center text-gray-700 dark:text-gray-300 space-y-4">
4646
<p className="font-bold text-xl">Git Automation Dashboard</p>
4747
<p className="text-sm text-gray-500 dark:text-gray-400">Version {appVersion}</p>
48-
49-
<div className="text-sm">
50-
<p>Design and concept by Tim Sinaeve</p>
51-
<p>Implementation by Gemini 2.5 Pro</p>
52-
</div>
53-
54-
<p className="text-xs text-gray-400 dark:text-gray-500 pt-4">
55-
© 2025 Tim Sinaeve
56-
</p>
57-
</div>
5848

59-
<div className="bg-gray-50 dark:bg-gray-800/50 px-4 py-3 sm:px-6 flex justify-end rounded-b-lg">
60-
<button
61-
type="button"
62-
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"
63-
onClick={onClose}
64-
data-automation-id="about-modal-dismiss"
65-
>
66-
Close
67-
</button>
49+
<p className="text-sm">© 2025 Tim Sinaeve. All rights reserved.</p>
50+
51+
<div className="flex flex-col sm:flex-row gap-2 pt-2">
52+
<button
53+
type="button"
54+
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"
55+
onClick={() => window.electronAPI?.openWeblink('https://github.com/beNative/git-automation')}
56+
data-automation-id="about-modal-open-github"
57+
>
58+
View on GitHub
59+
</button>
60+
<button
61+
type="button"
62+
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"
63+
onClick={() => window.electronAPI?.openInstallationFolder?.()}
64+
data-automation-id="about-modal-open-installation-folder"
65+
>
66+
Open Folder
67+
</button>
68+
</div>
6869
</div>
6970
</div>
7071
</div>
7172
);
7273
};
7374

74-
export default AboutModal;
75+
export default AboutModal;

electron/electron.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export interface IElectronAPI {
5959
detectExecutables: (repoPath: string) => Promise<string[]>;
6060
launchExecutable: (args: { repoPath: string, executablePath: string }) => Promise<{ success: boolean; output: string }>;
6161
openLocalPath: (path: string) => Promise<{ success: boolean; error?: string }>;
62+
openInstallationFolder: () => Promise<{ success: boolean; error?: string; path?: string }>;
6263
openWeblink: (url: string) => Promise<{ success: boolean; error?: string }>;
6364
openTerminal: (path: string) => Promise<{ success: boolean; error?: string }>;
6465

electron/main.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,6 +1784,18 @@ ipcMain.handle('open-local-path', async (event, localPath: string) => {
17841784
}
17851785
});
17861786

1787+
ipcMain.handle('open-installation-folder', async () => {
1788+
try {
1789+
const executablePath = app.getPath('exe');
1790+
const installationFolder = path.dirname(executablePath);
1791+
await shell.openPath(installationFolder);
1792+
return { success: true, path: installationFolder };
1793+
} catch (error: any) {
1794+
mainLogger.error('Failed to open installation folder', error);
1795+
return { success: false, error: error.message };
1796+
}
1797+
});
1798+
17871799
ipcMain.handle('open-weblink', async (event, url: string): Promise<{ success: boolean; error?: string, warning?: string }> => {
17881800
try {
17891801
const settings = await readSettings();

electron/preload.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
6868
detectExecutables: (repoPath: string): Promise<string[]> => ipcRenderer.invoke('detect-executables', repoPath),
6969
launchExecutable: (args: { repoPath: string, executablePath: string }): Promise<{ success: boolean; output: string }> => ipcRenderer.invoke('launch-executable', args),
7070
openLocalPath: (path: string): Promise<{ success: boolean; error?: string }> => ipcRenderer.invoke('open-local-path', path),
71+
openInstallationFolder: (): Promise<{ success: boolean; error?: string; path?: string }> => ipcRenderer.invoke('open-installation-folder'),
7172
openWeblink: (url: string): Promise<{ success: boolean; error?: string }> => ipcRenderer.invoke('open-weblink', url),
7273
openTerminal: (path: string): Promise<{ success: boolean; error?: string }> => ipcRenderer.invoke('open-terminal', path),
7374

index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@
205205
async openWeblink(url) {
206206
window.open(url, '_blank', 'noopener');
207207
},
208+
async openInstallationFolder() {
209+
console.info('Requested to open installation folder');
210+
},
208211
async openLocalPath(path) {
209212
console.info('Requested to open local path:', path);
210213
},

0 commit comments

Comments
 (0)