feat: implement core application UI and backend services for PHP environment management

This commit is contained in:
Ümit Tunç
2026-03-28 20:34:33 +03:00
parent f336bd2e7c
commit ab037b7bd9
14 changed files with 542 additions and 143 deletions
+17 -1
View File
@@ -7,6 +7,7 @@ import { projectService } from '../services/ProjectService'
import { phpManagerService } from '../services/PhpManagerService'
import { mySqlManagerService } from '../services/MySqlManagerService'
import { nginxManagerService } from '../services/NginxManagerService'
import { phpMyAdminService } from '../services/PhpMyAdminService'
import path from 'path'
function findExecutable(dir: string, name: string): string | null {
@@ -58,7 +59,8 @@ export function registerIpcHandlers(): void {
PHP_PORT: settings.phpPort,
ROOT: rootPath,
LOG_DIR: logDir.replace(/\\/g, '/'),
CONF_DIR: confDir.replace(/\\/g, '/')
CONF_DIR: confDir.replace(/\\/g, '/'),
PHPMYADMIN_DIR: phpMyAdminService.getPath().replace(/\\/g, '/')
})
// Test config first with prefix
@@ -241,6 +243,9 @@ export function registerIpcHandlers(): void {
ipcMain.handle('projects:remove', async (_event, id) => {
return projectService.removeProject(id)
})
ipcMain.handle('projects:update', async (_event, project) => {
return projectService.updateProject(project)
})
// Config management
ipcMain.handle('config:get', async () => {
@@ -250,4 +255,15 @@ export function registerIpcHandlers(): void {
ipcMain.handle('config:save', async (_event, config: any) => {
return { success: true, settings: configService.updateSettings(config) }
})
// phpMyAdmin
ipcMain.handle('pma:status', async () => {
return await phpMyAdminService.isInstalled()
})
ipcMain.handle('pma:setup', async (event, mysqlPort: string) => {
return await phpMyAdminService.setup(mysqlPort, (p) => {
event.sender.send('pma:progress', p)
})
})
}