diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 78e2b12..7674c76 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -472,27 +472,27 @@ function App(): JSX.Element { const html = `
${services.map(srv => { - const label = getDisplayLabel(srv); - const res = results[srv]; - let iconClass = 'swal-status-icon'; - let noteClass = 'swal-status-note'; - let note = operation === 'start' ? t('common.ready') : t('common.running'); + const label = getDisplayLabel(srv); + const res = results[srv]; + let iconClass = 'swal-status-icon'; + let noteClass = 'swal-status-note'; + let note = operation === 'start' ? t('common.ready') : t('common.running'); - if (res?.success) { - iconClass += ' success'; - noteClass += ' success'; - note = operation === 'start' ? t('common.started') : t('common.stopped'); - } else if (res?.error) { - iconClass += ' error'; - noteClass += ' error'; - note = t('common.error'); - } else if (srv === currentSrv) { - iconClass += ' loading swal2-loading-dots'; - noteClass += ' loading'; - note = operation === 'start' ? t('common.starting') : t('common.stopping'); - } + if (res?.success) { + iconClass += ' success'; + noteClass += ' success'; + note = operation === 'start' ? t('common.started') : t('common.stopped'); + } else if (res?.error) { + iconClass += ' error'; + noteClass += ' error'; + note = t('common.error'); + } else if (srv === currentSrv) { + iconClass += ' loading swal2-loading-dots'; + noteClass += ' loading'; + note = operation === 'start' ? t('common.starting') : t('common.stopping'); + } - return ` + return `
${label} @@ -500,7 +500,7 @@ function App(): JSX.Element { ${note.toUpperCase()}
`; - }).join('')} + }).join('')}
`; Swal.update({ html }); @@ -523,17 +523,17 @@ function App(): JSX.Element { updateSwal(srv); try { const res = operation === 'start' ? await window.api.startService(srv) : await window.api.stopService(srv); - + if (res.success) { // Poll for status confirmation let attempts = 0; const maxAttempts = 15; // ~7.5 seconds let confirmed = false; - + while (attempts < maxAttempts) { await new Promise(resolve => setTimeout(resolve, 500)); const statusRes = await window.api.invoke('service:status', srv); - + if (operation === 'start' && statusRes === 'running') { confirmed = true; break; @@ -545,7 +545,7 @@ function App(): JSX.Element { attempts++; } - + results[srv] = { success: confirmed, error: !confirmed ? t('common.timeout') : null }; } else { results[srv] = { success: false, error: res.message }; @@ -558,7 +558,7 @@ function App(): JSX.Element { const anyError = Object.values(results).some(r => r.error); - + Swal.update({ icon: anyError ? 'warning' : 'success', showConfirmButton: true, @@ -571,7 +571,7 @@ function App(): JSX.Element { if (Swal.isVisible()) Swal.close(); }, 3000); } - + fetchStatus(); }; @@ -784,10 +784,10 @@ function App(): JSX.Element { return ( <> - setSelectedQuery(null)} - maxWidth="lg" + setSelectedQuery(null)} + maxWidth="lg" fullWidth PaperProps={{ className: 'mui-custom-dialog-paper' @@ -802,24 +802,24 @@ function App(): JSX.Element {
-                            
                         
- - - + @@ -924,7 +924,7 @@ function App(): JSX.Element { - + setActiveTab('settings')} sx={{ p: 0.5, opacity: 0.7, '&:hover': { opacity: 1 } }}> @@ -937,7 +937,12 @@ function App(): JSX.Element { sx={{ width: drawerWidth, flexShrink: 0, - [`& .MuiDrawer-paper`]: { width: drawerWidth, boxSizing: 'border-box', bgcolor: 'rgba(18, 18, 18, 0.95)', borderRight: '1px solid rgba(255, 255, 255, 0.05)' }, + [`& .MuiDrawer-paper`]: { + width: drawerWidth, + boxSizing: 'border-box', + bgcolor: 'rgba(18, 18, 18, 0.95)', + borderRight: '1px solid var(--color-border-soft)' + }, }} > @@ -949,37 +954,37 @@ function App(): JSX.Element { setActiveTab('dashboard')} sx={{ py: 0.5 }}> - + setActiveTab('projects')} sx={{ py: 0.5 }}> - + setActiveTab('tuning')} sx={{ py: 0.5 }}> - + setActiveTab('tools')} sx={{ py: 0.5 }}> - + setActiveTab('db_manager')} sx={{ py: 0.5 }}> - + setActiveTab('db_monitor')} sx={{ py: 0.5 }}> - + @@ -988,19 +993,19 @@ function App(): JSX.Element { setActiveTab('user_guide')} sx={{ py: 0.5 }}> - + setActiveTab('settings')} sx={{ py: 0.5 }}> - + setActiveTab('event_monitor')} sx={{ py: 0.5 }}> - + @@ -1284,13 +1289,13 @@ function App(): JSX.Element { { const newConf = { ...cliConfig, enabled: e.target.checked } setCliConfig(newConf) await window.api.invoke('cli:set-config', newConf) - }} + }} /> } label={ @@ -1353,9 +1358,9 @@ function App(): JSX.Element { {cliConfig.binDir || '...'} - {!selectedVersion && ( - {t('mariadb_manager.no_active_version')} + {t('mariadb_manager.no_active_version')} )} {selectedVersion && ( @@ -210,10 +211,10 @@ const MariaDbDatabaseManager: React.FC = ({ version {/* Databases Section */} - + {t('mariadb_manager.databases_title')} - @@ -221,20 +222,20 @@ const MariaDbDatabaseManager: React.FC = ({ version - {t('mariadb_manager.db_name')} - {t('mariadb_manager.db_size')} - {t('common.actions')} + {t('mariadb_manager.db_name')} + {t('mariadb_manager.db_size')} + {t('common.actions')} {loading ? ( ) : databases.length === 0 ? ( - {t('common.no_data')} + {t('common.no_data')} ) : databases.map(db => ( - {db.name} - {db.size.toFixed(2)} MB + {db.name} + {db.size.toFixed(2)} MB handleDeleteDb(db.name)} sx={{ p: 0.5 }}> @@ -257,7 +258,7 @@ const MariaDbDatabaseManager: React.FC = ({ version {t('mariadb_manager.users_title')} - @@ -265,27 +266,27 @@ const MariaDbDatabaseManager: React.FC = ({ version
- {t('mariadb_manager.user_label')} - Host - {t('common.actions')} + {t('mariadb_manager.user_label')} + Host + {t('common.actions')} {loading ? ( ) : users.length === 0 ? ( - {t('common.no_data')} + {t('common.no_data')} ) : users.map(user => ( - - - + + + {user.user} - - - + + + {user.host} diff --git a/src/renderer/src/components/MariaDbExportWizard.tsx b/src/renderer/src/components/MariaDbExportWizard.tsx index d03c77f..dc35772 100644 --- a/src/renderer/src/components/MariaDbExportWizard.tsx +++ b/src/renderer/src/components/MariaDbExportWizard.tsx @@ -219,9 +219,9 @@ const MariaDbExportWizard: React.FC = ({ open, onClose {!exportResult ? ( <> - - {t('mariadb.import.summary')} - + + {t('mariadb.import.summary')} + {t('mariadb.import.server')}: {selectedVersion} {t('mariadb.import.db')}: {selectedDb} @@ -230,7 +230,7 @@ const MariaDbExportWizard: React.FC = ({ open, onClose {loading && ( - + {logs.map((log, i) => ( {log} diff --git a/src/renderer/src/components/MariaDbImportWizard.tsx b/src/renderer/src/components/MariaDbImportWizard.tsx index ac04e75..02c7e18 100644 --- a/src/renderer/src/components/MariaDbImportWizard.tsx +++ b/src/renderer/src/components/MariaDbImportWizard.tsx @@ -260,9 +260,9 @@ const MariaDbImportWizard: React.FC = ({ open, onClose {!importResult ? ( <> - - {t('mariadb.import.summary')} - + + {t('mariadb.import.summary')} + {t('mariadb.import.file')}: {filePath.split(/[/\\]/).pop()} {t('mariadb.import.server')}: {selectedVersion} @@ -271,7 +271,7 @@ const MariaDbImportWizard: React.FC = ({ open, onClose {loading && ( - + {logs.map((log, i) => ( {log} @@ -288,8 +288,8 @@ const MariaDbImportWizard: React.FC = ({ open, onClose {t('mariadb.import.success_title')} {importResult.message} - - {t('mariadb.import.access_info')}: + + {t('mariadb.import.access_info')}: {t('mariadb.import.host')}: localhost {t('mariadb.import.db')}: {dbConfig.dbName} {t('mariadb.import.user')}: {dbConfig.user} diff --git a/src/renderer/src/components/PhpExtensionManager.tsx b/src/renderer/src/components/PhpExtensionManager.tsx index f9f75f7..edf6087 100644 --- a/src/renderer/src/components/PhpExtensionManager.tsx +++ b/src/renderer/src/components/PhpExtensionManager.tsx @@ -168,8 +168,8 @@ const PhpExtensionManager: React.FC = ({ open, onClose > - {t('php.extensions.title', { version: phpVersion })} - {t('php.extensions.desc')} + {t('php.extensions.title', { version: phpVersion })} + {t('php.extensions.desc')} @@ -186,18 +186,20 @@ const PhpExtensionManager: React.FC = ({ open, onClose InputProps={{ startAdornment: ( - + ), - sx: { color: '#fff', bgcolor: 'rgba(0,0,0,0.2)', fontSize: '0.75rem', height: 32 } + className: 'text-sm', + sx: { color: '#fff', bgcolor: 'rgba(0,0,0,0.2)', height: 32 } }} /> @@ -213,7 +215,7 @@ const PhpExtensionManager: React.FC = ({ open, onClose ) : ( @@ -238,13 +240,13 @@ const PhpExtensionManager: React.FC = ({ open, onClose > + {ext.name} - {ext.enabled && } + {ext.enabled && } } secondary={ext.dll} - secondaryTypographyProps={{ sx: { color: 'text.secondary', fontSize: '0.65rem', opacity: 0.5 } }} + secondaryTypographyProps={{ className: 'text-xs text-secondary', sx: { opacity: 0.5 } }} /> )) @@ -253,10 +255,10 @@ const PhpExtensionManager: React.FC = ({ open, onClose )} - - @@ -273,18 +275,18 @@ const PhpExtensionManager: React.FC = ({ open, onClose > - {t('php.extensions.ini_edit', { version: phpVersion })} + {t('php.extensions.ini_edit', { version: phpVersion })} setIsRawEditorOpen(false)} size="small" sx={{ color: 'rgba(255,255,255,0.5)' }}> = ({ open, onClose InputProps={{ startAdornment: ( - + ), + className: 'text-sm', sx: { color: '#fff', bgcolor: 'rgba(255,255,255,0.03)', - fontSize: '0.75rem', height: 32, - '& fieldset': { borderColor: 'rgba(255,255,255,0.05)' } + '& fieldset': { borderColor: 'var(--color-border-soft)' } } }} /> @@ -324,7 +326,7 @@ const PhpExtensionManager: React.FC = ({ open, onClose /> - diff --git a/src/renderer/src/components/ProjectManager/ProjectDetails.tsx b/src/renderer/src/components/ProjectManager/ProjectDetails.tsx index 468de77..5d85e11 100644 --- a/src/renderer/src/components/ProjectManager/ProjectDetails.tsx +++ b/src/renderer/src/components/ProjectManager/ProjectDetails.tsx @@ -201,7 +201,7 @@ export default function ProjectDetails({ return ( - {t('projects.no_project_selected')} + {t('projects.no_project_selected')} ); } @@ -218,14 +218,14 @@ export default function ProjectDetails({ {/* Header */} - + - {p.name} + {p.name} - + {p.path} @@ -263,7 +263,8 @@ export default function ProjectDetails({ size="small" startIcon={} onClick={() => onOpenSite(isHostMapped)} - sx={{ px: 2, height: 32, borderRadius: 1.5, fontWeight: 600, fontSize: '0.75rem', borderColor: 'rgba(255,255,255,0.1)', '&:hover': { borderColor: 'primary.main', bgcolor: 'rgba(57, 167, 255, 0.05)' } }} + sx={{ px: 2, height: 32, borderColor: 'var(--color-border-medium)', '&:hover': { borderColor: 'primary.main', bgcolor: 'rgba(57, 167, 255, 0.05)' } }} + className="rounded-md font-semibold text-sm" > {t('projects.open_site').toUpperCase()} @@ -320,9 +321,9 @@ export default function ProjectDetails({ {/* Tabs */} setProjectDetailTab(v)} textColor="primary" indicatorColor="primary"> - - - + + + diff --git a/src/renderer/src/components/ServerTuning.tsx b/src/renderer/src/components/ServerTuning.tsx index 0b9c631..ca0aad8 100644 --- a/src/renderer/src/components/ServerTuning.tsx +++ b/src/renderer/src/components/ServerTuning.tsx @@ -258,10 +258,10 @@ export default function ServerTuning() { return ( - + {t('tuning.title')} - + {t('tuning.desc')} @@ -269,22 +269,22 @@ export default function ServerTuning() { {/* PHP Section */} - + - PHP Tuning + PHP Tuning {phpVersions.map(v => ( - + handleOpenTuning(v, 'php')}> - PHP {v.version} + PHP {v.version} php.ini optimization