diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx
index 4cd1884..f0b58cf 100644
--- a/src/renderer/src/App.tsx
+++ b/src/renderer/src/App.tsx
@@ -37,7 +37,8 @@ import {
CircularProgress,
Stack,
Grid,
- Avatar
+ Avatar,
+ GlobalStyles
} from '@mui/material'
import {
Dashboard as DashboardIcon,
@@ -503,176 +504,119 @@ function App(): JSX.Element {
const installedPhpVersions = phpVersions.filter(v => v.status === 'installed')
return (
-
- theme.zIndex.drawer - 1,
- bgcolor: 'rgba(21, 62, 94, 0.85)',
- backdropFilter: 'blur(10px)'
- }}
- >
-
-
-
-
+ <>
+
+
+ theme.zIndex.drawer - 1,
+ bgcolor: 'rgba(21, 62, 94, 0.85)',
+ backdropFilter: 'blur(10px)'
+ }}
+ >
+
+
+
+
+
+
+ setActiveTab('settings')}>
+
-
- setActiveTab('settings')}>
-
-
-
-
+
+
-
-
-
-
-
-
-
-
- setActiveTab('dashboard')}>
-
-
-
-
-
- setActiveTab('projects')}>
-
-
-
-
-
- setActiveTab('tools')}>
-
-
-
-
-
-
-
-
- setActiveTab('settings')}>
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ setActiveTab('dashboard')}>
+
+
+
+
+
+ setActiveTab('projects')}>
+
+
+
+
+
+ setActiveTab('tools')}>
+
+
+
+
+
+
+
+
+ setActiveTab('settings')}>
+
+
+
+
+
+
+
-
-
-
- {activeTab === 'settings' && (
-
+
+
+
+ {activeTab === 'settings' && (
+
-
- setSettingsTab(v)} textColor="primary" indicatorColor="primary" variant="scrollable" scrollButtons="auto">
- } iconPosition="start" />
- } iconPosition="start" />
- } iconPosition="start" />
- } iconPosition="start" />
-
-
+
+ setSettingsTab(v)} textColor="primary" indicatorColor="primary" variant="scrollable" scrollButtons="auto">
+ } iconPosition="start" />
+ } iconPosition="start" />
+ } iconPosition="start" />
+ } iconPosition="start" />
+
+
- {settingsTab === 0 && (
-
-
- PHP Sürümleri
- Gereken PHP sürümlerini buradan indirebilir ve yönetebilirsiniz.
-
-
- {phpVersions.length === 0 && !loadingVersions && (
-
- )}
- {phpVersions.map((v) => (
-
-
- {v.status === 'installed' ? : }
-
-
-
- {v.status === 'available' && (
- } onClick={() => handleDownloadPhp(v.id)}>
- İNDİR
-
- )}
- {v.status === 'downloading' && (
-
-
-
- )}
- {v.status === 'installed' && (
-
- )}
-
-
- ))}
-
-
- )}
-
- {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 === 'installed' && (
- {
- const newPorts = { ...(settings.mysqlPorts || {}), [v.id]: e.target.value }
- setSettings({ ...settings, mysqlPorts: newPorts })
- }}
- variant="outlined"
- size="small"
- sx={{ width: 80 }}
- />
- )}
+ {settingsTab === 0 && (
+
+
+ PHP Sürümleri
+ Gereken PHP sürümlerini buradan indirebilir ve yönetebilirsiniz.
+
+
+ {phpVersions.length === 0 && !loadingVersions && (
+
+ )}
+ {phpVersions.map((v) => (
+
+
+ {v.status === 'installed' ? : }
+
+
{v.status === 'available' && (
- } onClick={() => handleDownloadMySql(v.id)}>
+ } onClick={() => handleDownloadPhp(v.id)}>
İNDİR
)}
@@ -685,653 +629,716 @@ function App(): JSX.Element {
)}
-
-
- ))}
-
-
- )}
-
- {settingsTab === 2 && (
-
-
- Nginx Web Sunucusu
- Sunucu için gerekli Nginx binary dosyalarını buradan indirebilirsiniz.
-
-
- {nginxVersions.map((v) => (
-
-
- {v.status === 'installed' ? : }
-
-
-
- {v.status === 'available' && (
- } onClick={() => handleDownloadNginx(v.id)}>
- İNDİR
-
- )}
- {v.status === 'downloading' && (
-
-
-
- )}
- {v.status === 'installed' && (
-
- )}
-
-
- ))}
-
-
- )}
-
- {settingsTab === 3 && (
-
-
- Port Ayarları
-
- setSettings({ ...settings, nginxPort: e.target.value })}
- variant="filled"
- size="small"
- helperText="Varsayılan: 80"
- />
- setSettings({ ...settings, phpPort: e.target.value })}
- variant="filled"
- size="small"
- helperText="Varsayılan: 9001"
- />
- setSettings({ ...settings, mysqlPort: e.target.value })}
- variant="filled"
- size="small"
- helperText="Varsayılan: 3306"
- />
-
+
+ ))}
+
-
- } size="large" onClick={handleSaveSettings}>
- Ayarları Kaydet
-
-
-
- )}
-
- )}
-
- {activeTab === 'dashboard' && (
- <>
-
-
-
- setDashboardTab(v)} textColor="primary" indicatorColor="primary">
-
-
-
-
-
-
-
-
- {/* Nginx Box */}
- {(dashboardTab === 0 || dashboardTab === 1) && (
-
-
-
-
- {getStatusChip(status.nginx)}
-
- Nginx
- Port: {settings.nginxPort}
-
-
- handleOpenLogs('nginx')} title="Hata Logları" size="small" sx={{ bgcolor: 'rgba(255,255,255,0.05)' }}>
-
-
- {
- window.api.invoke('services:reload', 'nginx').then((res: any) => {
- setNotification({ open: true, message: res.message, severity: res.success ? 'success' : 'error' })
- })
- }}
- title="Yapılandırmayı Yeniden Yükle"
- size="small"
- disabled={status.nginx !== 'running'}
- sx={{ bgcolor: 'rgba(255,255,255,0.05)', '&:hover': { color: 'primary.main' } }}
- >
-
-
-
- handleToggleService('nginx')}
- disabled={status.nginx === 'starting'}
- />
-
-
-
)}
- {/* PHP Boxes */}
- {(dashboardTab === 0 || dashboardTab === 2) && installedPhpVersions.map(v => (
-
-
-
-
- {getStatusChip(status[`php:${v.version}`] || 'stopped')}
-
- PHP {v.version}
- Port: {v.port || '?'}
-
- handleOpenLogs(`php:${v.version}`)} size="small" sx={{ bgcolor: 'rgba(255,255,255,0.05)' }}>
-
-
- handleToggleService(`php:${v.version}`)}
- disabled={status[`php:${v.version}`] === 'starting'}
- />
-
-
-
- ))}
-
- {/* MySQL Boxes */}
- {(dashboardTab === 0 || dashboardTab === 3) && mySqlVersions.filter(v => v.status === 'installed').map(v => (
-
-
-
-
- {getStatusChip(status[`mysql:${v.version}`] || 'stopped')}
-
- MySQL {v.version}
- Port: {settings.mysqlPorts?.[v.id] || v.port}
-
-
- handleOpenLogs(`mysql:${v.version}`)} title="Hata Logları" size="small" sx={{ bgcolor: 'rgba(255,255,255,0.05)' }}>
-
-
- handleResetData(`mysql:${v.version}`)} title="Verileri Sıfırla" size="small" sx={{ bgcolor: 'rgba(255,255,255,0.05)', '&:hover': { color: 'error.main' } }}>
-
-
-
- handleToggleService(`mysql:${v.version}`)}
- disabled={status[`mysql:${v.version}`] === 'starting'}
- />
-
-
-
- ))}
-
-
-
- } size="large" onClick={handleStartAll} sx={{ borderRadius: 2, padding: '12px', background: 'linear-gradient(45deg, #153E5E 30%, #4A7CA3 90%)', boxShadow: '0 3px 5px 2px rgba(21, 62, 94, .3)' }}>
- {t('common.start')}
-
- } size="large" color="error" onClick={handleStopAll} sx={{ borderRadius: 2, padding: '12px', borderWidth: 2, '&:hover': { borderWidth: 2 } }}>
- {t('common.stop')}
-
-
- >
- )}
-
- {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 ? (
- : }
- sx={{ borderRadius: 2 }}
- >
- {pmaLoading ? 'KURULUYOR...' : 'KURULUMU BAŞLAT'}
-
- ) : (
- }
- sx={{ borderRadius: 2 }}
- >
- AÇ
-
- )}
-
-
- {pmaLoading && (
-
-
-
- İndiriliyor... %{Math.round(pmaProgress)}
-
-
- )}
-
-
-
-
-
-
-
-
- MySQL Dump/Import Sihirbazı
-
- Seçtiğiniz bir .sql veya arşiv dosyasını hızlıca veritabanına yükleyin.
-
-
-
-
-
-
-
-
- )}
-
-
- {activeTab === 'projects' && (
-
-
-
- Projelerim
-
- } onClick={() => setIsProjectDialogOpen(true)}>
- Yeni Proje Ekle
-
-
-
- {projects.length === 0 ? (
-
- Henüz bir proje eklenmemiş.
-
- ) : (
-
- {projects.map((project) => (
-
-
-
-
-
-
-
-
-
- {project.name}
-
-
- {project.path.length > 40 ? '...' + project.path.slice(-37) : project.path}
-
-
-
-
-
- {
- setNewProject(project)
- setIsProjectDialogOpen(true)
- }} sx={{ color: 'rgba(255,255,255,0.4)', '&:hover': { color: '#39A7FF' } }}>
-
-
-
-
- handleRemoveProject(project.id)} sx={{ color: 'rgba(255,255,255,0.4)', '&:hover': { color: '#ff4444' } }}>
-
-
-
-
-
-
-
-
- }
- label={`PHP ${project.phpVersion}`}
- sx={{ bgcolor: 'rgba(71, 74, 255, 0.1)', color: '#777bb4', fontWeight: 600, border: '1px solid rgba(71, 74, 255, 0.2)' }}
- />
- {project.mySqlVersion && (
-
+
+ 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 === 'installed' && (
+ {
+ const newPorts = { ...(settings.mysqlPorts || {}), [v.id]: e.target.value }
+ setSettings({ ...settings, mysqlPorts: newPorts })
+ }}
+ variant="outlined"
size="small"
- icon={}
- label={`MySQL ${project.mySqlVersion}`}
- sx={{ bgcolor: 'rgba(242, 145, 17, 0.1)', color: '#f29111', fontWeight: 600, border: '1px solid rgba(242, 145, 17, 0.2)' }}
+ sx={{ width: 80 }}
/>
)}
-
-
-
-
-
-
- {project.host}
-
+
+ {v.status === 'available' && (
+ } onClick={() => handleDownloadMySql(v.id)}>
+ İNDİR
+
+ )}
+ {v.status === 'downloading' && (
+
+
+
+ )}
+ {v.status === 'installed' && (
+
+ )}
- }
- onClick={() => window.open(`http://localhost:${settings.nginxPort}/${project.host}/`, '_blank')}
- sx={{
- color: '#39A7FF',
- textTransform: 'none',
- fontSize: '0.75rem',
- p: '2px 8px',
- '&:hover': { bgcolor: 'rgba(57, 167, 255, 0.1)' }
+
+
+ ))}
+
+
+ )}
+
+ {settingsTab === 2 && (
+
+
+ Nginx Web Sunucusu
+ Sunucu için gerekli Nginx binary dosyalarını buradan indirebilirsiniz.
+
+
+ {nginxVersions.map((v) => (
+
+
+ {v.status === 'installed' ? : }
+
+
+
+ {v.status === 'available' && (
+ } onClick={() => handleDownloadNginx(v.id)}>
+ İNDİR
+
+ )}
+ {v.status === 'downloading' && (
+
+
+
+ )}
+ {v.status === 'installed' && (
+
+ )}
+
+
+ ))}
+
+
+ )}
+
+ {settingsTab === 3 && (
+
+
+ Port Ayarları
+
+ setSettings({ ...settings, nginxPort: e.target.value })}
+ variant="filled"
+ size="small"
+ helperText="Varsayılan: 80"
+ />
+ setSettings({ ...settings, phpPort: e.target.value })}
+ variant="filled"
+ size="small"
+ helperText="Varsayılan: 9001"
+ />
+ setSettings({ ...settings, mysqlPort: e.target.value })}
+ variant="filled"
+ size="small"
+ helperText="Varsayılan: 3306"
+ />
+
+
+
+ } size="large" onClick={handleSaveSettings}>
+ Ayarları Kaydet
+
+
+
+ )}
+
+ )}
+
+ {activeTab === 'dashboard' && (
+ <>
+
+
+
+ setDashboardTab(v)} textColor="primary" indicatorColor="primary">
+
+
+
+
+
+
+
+
+ {/* Nginx Box */}
+ {(dashboardTab === 0 || dashboardTab === 1) && (
+
+
+
+
+ {getStatusChip(status.nginx)}
+
+ Nginx
+ Port: {settings.nginxPort}
+
+
+ handleOpenLogs('nginx')} title="Hata Logları" size="small" sx={{ bgcolor: 'rgba(255,255,255,0.05)' }}>
+
+
+ {
+ window.api.invoke('services:reload', 'nginx').then((res: any) => {
+ setNotification({ open: true, message: res.message, severity: res.success ? 'success' : 'error' })
+ })
}}
+ title="Yapılandırmayı Yeniden Yükle"
+ size="small"
+ disabled={status.nginx !== 'running'}
+ sx={{ bgcolor: 'rgba(255,255,255,0.05)', '&:hover': { color: 'primary.main' } }}
>
- Gözat
-
-
-
+
+
+
+ handleToggleService('nginx')}
+ disabled={status.nginx === 'starting'}
+ />
+
+
+
+ )}
+
+ {/* PHP Boxes */}
+ {(dashboardTab === 0 || dashboardTab === 2) && installedPhpVersions.map(v => (
+
+
+
+
+ {getStatusChip(status[`php:${v.version}`] || 'stopped')}
+
+ PHP {v.version}
+ Port: {v.port || '?'}
+
+ handleOpenLogs(`php:${v.version}`)} size="small" sx={{ bgcolor: 'rgba(255,255,255,0.05)' }}>
+
+
+ handleToggleService(`php:${v.version}`)}
+ disabled={status[`php:${v.version}`] === 'starting'}
+ />
+
+
+
+ ))}
+
+ {/* MySQL Boxes */}
+ {(dashboardTab === 0 || dashboardTab === 3) && mySqlVersions.filter(v => v.status === 'installed').map(v => (
+
+
+
+
+ {getStatusChip(status[`mysql:${v.version}`] || 'stopped')}
+
+ MySQL {v.version}
+ Port: {settings.mysqlPorts?.[v.id] || v.port}
+
+
+ handleOpenLogs(`mysql:${v.version}`)} title="Hata Logları" size="small" sx={{ bgcolor: 'rgba(255,255,255,0.05)' }}>
+
+
+ handleResetData(`mysql:${v.version}`)} title="Verileri Sıfırla" size="small" sx={{ bgcolor: 'rgba(255,255,255,0.05)', '&:hover': { color: 'error.main' } }}>
+
+
+
+ handleToggleService(`mysql:${v.version}`)}
+ disabled={status[`mysql:${v.version}`] === 'starting'}
+ />
+
))}
- )}
-
- )}
-
-
- setNotification({ ...notification, open: false })}
- >
-
- {notification.message}
-
-
-
- {/* Log Viewer Dialog */}
-
-
+
+ {
+ setIsProjectDialogOpen(false)
+ setNewProject({ name: '', path: '', phpVersion: '', mySqlVersion: '', host: 'localhost' })
+ }} fullWidth maxWidth="sm">
+ {newProject.id ? 'Proje Düzenle' : 'Yeni Proje Ekle'}
+
+
+ setNewProject({ ...newProject, name: e.target.value })}
+ />
+
+
+
+
+
+ ),
+ }}
+ onChange={(e) => setNewProject({ ...newProject, path: e.target.value })}
+ />
+ setNewProject({ ...newProject, host: e.target.value })}
+ />
+
+
+ PHP Sürümü
+
+
+ v.status === 'installed').length === 0}>
+ MySQL Sürümü
+
+
+
+
+
+
+
+
+
+
+
+ setIsMySqlWizardOpen(false)}
+ mySqlVersions={mySqlVersions}
+ />
+
+ >
)
}
export default App
-