feat: implement main application dashboard UI with service management and project configuration features
This commit is contained in:
+18
-45
@@ -1071,14 +1071,6 @@ function App(): JSX.Element {
|
|||||||
label={`PHP ${project.phpVersion}`}
|
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)' }}
|
sx={{ bgcolor: 'rgba(71, 74, 255, 0.1)', color: '#777bb4', fontWeight: 600, border: '1px solid rgba(71, 74, 255, 0.2)' }}
|
||||||
/>
|
/>
|
||||||
{project.mySqlVersion && (
|
|
||||||
<Chip
|
|
||||||
size="small"
|
|
||||||
icon={<MySQLIcon sx={{ fontSize: '1rem !important' }} />}
|
|
||||||
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)' }}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Paper variant="outlined" sx={{
|
<Paper variant="outlined" sx={{
|
||||||
@@ -1278,42 +1270,23 @@ function App(): JSX.Element {
|
|||||||
value={newProject.host}
|
value={newProject.host}
|
||||||
onChange={(e) => setNewProject({ ...newProject, host: e.target.value })}
|
onChange={(e) => setNewProject({ ...newProject, host: e.target.value })}
|
||||||
/>
|
/>
|
||||||
<Stack direction="row" spacing={2} sx={{ width: '100%' }}>
|
<FormControl fullWidth disabled={installedPhpVersions.length === 0}>
|
||||||
<FormControl fullWidth disabled={installedPhpVersions.length === 0}>
|
<InputLabel id="php-version-label">PHP Sürümü</InputLabel>
|
||||||
<InputLabel id="php-version-label">PHP Sürümü</InputLabel>
|
<Select
|
||||||
<Select
|
labelId="php-version-label"
|
||||||
labelId="php-version-label"
|
value={newProject.phpVersion}
|
||||||
value={newProject.phpVersion}
|
label="PHP Sürümü"
|
||||||
label="PHP Sürümü"
|
onChange={(e) => setNewProject({ ...newProject, phpVersion: e.target.value })}
|
||||||
onChange={(e) => setNewProject({ ...newProject, phpVersion: e.target.value })}
|
>
|
||||||
>
|
{installedPhpVersions.length > 0 ? (
|
||||||
{installedPhpVersions.length > 0 ? (
|
installedPhpVersions.map(v => (
|
||||||
installedPhpVersions.map(v => (
|
<MenuItem key={v.id} value={v.version}>PHP {v.version}</MenuItem>
|
||||||
<MenuItem key={v.id} value={v.version}>PHP {v.version}</MenuItem>
|
))
|
||||||
))
|
) : (
|
||||||
) : (
|
<MenuItem disabled value="">Önce PHP sürümü indirmelisiniz</MenuItem>
|
||||||
<MenuItem disabled value="">Önce PHP sürümü indirmelisiniz</MenuItem>
|
)}
|
||||||
)}
|
</Select>
|
||||||
</Select>
|
</FormControl>
|
||||||
</FormControl>
|
|
||||||
<FormControl fullWidth disabled={mySqlVersions.filter(v => v.status === 'installed').length === 0}>
|
|
||||||
<InputLabel id="mysql-version-label">MySQL Sürümü</InputLabel>
|
|
||||||
<Select
|
|
||||||
labelId="mysql-version-label"
|
|
||||||
value={newProject.mySqlVersion || ''}
|
|
||||||
label="MySQL Sürümü"
|
|
||||||
onChange={(e) => setNewProject({ ...newProject, mySqlVersion: e.target.value })}
|
|
||||||
>
|
|
||||||
{mySqlVersions.filter(v => v.status === 'installed').length > 0 ? (
|
|
||||||
mySqlVersions.filter(v => v.status === 'installed').map(v => (
|
|
||||||
<MenuItem key={v.id} value={v.version}>MySQL {v.version}</MenuItem>
|
|
||||||
))
|
|
||||||
) : (
|
|
||||||
<MenuItem disabled value="">Önce MySQL sürümü indirmelisiniz</MenuItem>
|
|
||||||
)}
|
|
||||||
</Select>
|
|
||||||
</FormControl>
|
|
||||||
</Stack>
|
|
||||||
</Box>
|
</Box>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
@@ -1324,7 +1297,7 @@ function App(): JSX.Element {
|
|||||||
<Button
|
<Button
|
||||||
onClick={handleAddProject}
|
onClick={handleAddProject}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
disabled={!newProject.name || !newProject.path || installedPhpVersions.length === 0 || mySqlVersions.filter(v => v.status === 'installed').length === 0}
|
disabled={!newProject.name || !newProject.path || installedPhpVersions.length === 0}
|
||||||
>
|
>
|
||||||
{newProject.id ? 'Güncelle' : 'Ekle'}
|
{newProject.id ? 'Güncelle' : 'Ekle'}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user