From a411138732dfe29b7761632ccc1265a3ed8e42c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?= Date: Sat, 28 Mar 2026 21:38:07 +0300 Subject: [PATCH] feat: add phpMyAdmin service management and UI integration --- src/main/services/PhpMyAdminService.ts | 4 +- src/renderer/src/App.tsx | 198 +++++++++++++------------ src/renderer/src/locales/de.json | 1 + src/renderer/src/locales/en.json | 1 + src/renderer/src/locales/tr.json | 1 + 5 files changed, 112 insertions(+), 93 deletions(-) diff --git a/src/main/services/PhpMyAdminService.ts b/src/main/services/PhpMyAdminService.ts index 11a878b..a486257 100644 --- a/src/main/services/PhpMyAdminService.ts +++ b/src/main/services/PhpMyAdminService.ts @@ -21,9 +21,9 @@ export class PhpMyAdminService { } try { - await downloadService.downloadAndExtract(this.downloadUrl, this.pmaDir, (p) => { + await downloadService.downloadAndExtract(this.downloadUrl, 'phpmyadmin', (p) => { if (onProgress) onProgress(p) - }) + }, this.pmaDir) // After extraction, the zip usually contains a folder like phpMyAdmin-x.y.z-all-languages // We should move contents to the root of this.pmaDir if they are nested diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 5a43b99..68b538f 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -65,7 +65,8 @@ import { Folder as FolderIcon, Storage as MySQLIcon, Language as HostIcon, - Launch as LaunchIcon + Launch as LaunchIcon, + Handyman as ToolsIcon } from '@mui/icons-material' import { useTranslation } from 'react-i18next' @@ -497,6 +498,12 @@ function App(): JSX.Element { + + setActiveTab('tools')}> + + + + @@ -577,97 +584,51 @@ function App(): JSX.Element { )} {settingsTab === 1 && ( - <> - - - MySQL Sürümleri - Farklı MySQL sürümlerini indirebilir ve sunucunuzda kullanabilirsiniz. - - - {mySqlVersions.length === 0 && !loadingVersions && ( - - )} - {mySqlVersions.map((v) => ( - - - {v.status === 'installed' ? : } - - - {`MySQL ${v.version} (${v.cycle})`} - {v.description && ( - - )} - - } - secondary={v.status === 'downloading' ? `İndiriliyor... %${Math.round(v.progress)}` : v.status === 'installed' ? 'Kurulu' : 'İndirilebilir'} - sx={{ flexGrow: 1 }} - /> - - {v.status === 'available' && ( - - )} - {v.status === 'downloading' && ( - - - - )} - {v.status === 'installed' && ( - - )} - - - ))} - - - - - - - - - - phpMyAdmin - - {pmaInstalled ? 'Veritabanı yönetimi için phpMyAdmin hazır.' : 'Veritabanlarını web üzerinden yönetmek için phpMyAdmin kurun.'} - - - - {!pmaInstalled ? ( - - ) : ( - - )} - - - {pmaLoading && ( - - - - İndiriliyor... %{Math.round(pmaProgress)} - - + + + MySQL Sürümleri + Farklı MySQL sürümlerini indirebilir ve sunucunuzda kullanabilirsiniz. + + + {mySqlVersions.length === 0 && !loadingVersions && ( + )} - - + {mySqlVersions.map((v) => ( + + + {v.status === 'installed' ? : } + + + {`MySQL ${v.version} (${v.cycle})`} + {v.description && ( + + )} + + } + secondary={v.status === 'downloading' ? `İndiriliyor... %${Math.round(v.progress)}` : v.status === 'installed' ? 'Kurulu' : 'İndirilebilir'} + sx={{ flexGrow: 1 }} + /> + + {v.status === 'available' && ( + + )} + {v.status === 'downloading' && ( + + + + )} + {v.status === 'installed' && ( + + )} + + + ))} + + )} {settingsTab === 2 && ( @@ -748,6 +709,7 @@ function App(): JSX.Element { )} )} + {activeTab === 'dashboard' && ( <> @@ -823,6 +785,59 @@ function App(): JSX.Element { )} + {activeTab === 'tools' && ( + + + {t('common.tools')} + + + + + + + + phpMyAdmin + + {pmaInstalled ? 'Veritabanı yönetimi için phpMyAdmin hazır.' : 'Veritabanlarını web üzerinden yönetmek için phpMyAdmin kurun.'} + + + + {!pmaInstalled ? ( + + ) : ( + + )} + + + {pmaLoading && ( + + + + İndiriliyor... %{Math.round(pmaProgress)} + + + )} + + + )} + {activeTab === 'projects' && ( @@ -958,6 +973,7 @@ function App(): JSX.Element { {notification.message} + {/* Log Viewer Dialog */}