diff --git a/public/server-assets/style.css b/public/server-assets/style.css
index 0dd9a0c..dc9e36f 100644
--- a/public/server-assets/style.css
+++ b/public/server-assets/style.css
@@ -56,12 +56,22 @@ header img.logo {
}
/* For automatic logo switching in dark mode */
-.logo-light { display: none; }
-.logo-dark { display: block; }
+.logo-light {
+ display: none;
+}
+
+.logo-dark {
+ display: block;
+}
@media (prefers-color-scheme: dark) {
- .logo-dark { display: none; }
- .logo-light { display: block; }
+ .logo-dark {
+ display: none;
+ }
+
+ .logo-light {
+ display: block;
+ }
}
h1 {
@@ -77,7 +87,8 @@ table {
margin-top: 1rem;
}
-th, td {
+th,
+td {
padding: 0.75rem 1rem;
text-align: left;
border-bottom: 1px solid var(--border-color);
@@ -169,4 +180,4 @@ footer {
text-align: center;
font-size: 0.875rem;
opacity: 0.6;
-}
+}
\ No newline at end of file
diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx
index 6c1ed5d..78e2b12 100644
--- a/src/renderer/src/App.tsx
+++ b/src/renderer/src/App.tsx
@@ -389,11 +389,19 @@ function App(): JSX.Element {
}
}, [logs, logDialogOpen])
+ const handleOpenNginxConfig = async () => {
+ if (window.api && window.api.invoke) {
+ const config = await window.api.invoke('nginx:config:get')
+ setNginxConfig(config)
+ setIsNginxConfigOpen(true)
+ }
+ }
+
const handleSaveNginxConfig = async () => {
if (window.api && window.api.invoke) {
const result = await window.api.invoke('nginx:config:save', nginxConfig)
if (result.success) {
- Swal.fire({ title: t('common.success'), text: t('server.nginx.config_saved'), icon: 'success', background: '#1e1e1e', color: '#fff' })
+ Swal.fire({ title: t('common.success'), text: t('server.nginx.config_saved'), icon: 'success' })
setIsNginxConfigOpen(false)
}
}
@@ -411,7 +419,7 @@ function App(): JSX.Element {
if (window.api && window.api.invoke) {
const result = await window.api.invoke('apache:config:save', apacheConfig)
if (result.success) {
- Swal.fire({ title: t('common.success'), text: t('server.apache.config_saved'), icon: 'success', background: '#1e1e1e', color: '#fff' })
+ Swal.fire({ title: t('common.success'), text: t('server.apache.config_saved'), icon: 'success' })
setIsApacheConfigOpen(false)
}
}
@@ -420,7 +428,7 @@ function App(): JSX.Element {
const handleTestApacheConfig = async () => {
if (window.api && window.api.invoke) {
const result = await window.api.invoke('apache:config:test')
- Swal.fire({ title: result.success ? t('common.success') : t('common.error'), text: result.message, icon: result.success ? 'success' : 'error', background: '#1e1e1e', color: '#fff' })
+ Swal.fire({ title: result.success ? t('common.success') : t('common.error'), text: result.message, icon: result.success ? 'success' : 'error' })
}
}
@@ -462,32 +470,36 @@ function App(): JSX.Element {
const updateSwal = (currentSrv?: string) => {
const html = `
-
+
${services.map(srv => {
const label = getDisplayLabel(srv);
const res = results[srv];
- let icon = '
○';
- let statusColor = 'rgba(255,255,255,0.4)';
+ let iconClass = 'swal-status-icon';
+ let noteClass = 'swal-status-note';
let note = operation === 'start' ? t('common.ready') : t('common.running');
if (res?.success) {
- icon = '
●';
- statusColor = '#33d9b2';
+ iconClass += ' success';
+ noteClass += ' success';
note = operation === 'start' ? t('common.started') : t('common.stopped');
} else if (res?.error) {
- icon = '
●';
- statusColor = '#ff5252';
+ iconClass += ' error';
+ noteClass += ' error';
note = t('common.error');
} else if (srv === currentSrv) {
- icon = '
●';
- statusColor = '#39A7FF';
+ iconClass += ' loading swal2-loading-dots';
+ noteClass += ' loading';
note = operation === 'start' ? t('common.starting') : t('common.stopping');
}
- return '
' +
- '' + icon + ' ' + label + '' +
- '' + note.toUpperCase() + '' +
- '
';
+ return `
+
+
+ ● ${label}
+
+ ${note.toUpperCase()}
+
+ `;
}).join('')}
`;
@@ -499,8 +511,6 @@ function App(): JSX.Element {
html: '
',
allowOutsideClick: false,
showConfirmButton: false,
- background: '#1a1d21',
- color: '#fff',
customClass: {
title: 'swal-title-small'
},
@@ -598,9 +608,7 @@ function App(): JSX.Element {
icon: 'warning',
showCancelButton: true,
confirmButtonText: t('common.yes_delete'),
- cancelButtonText: t('common.cancel'),
- background: '#1e1e1e',
- color: '#fff'
+ cancelButtonText: t('common.cancel')
})
if (result.isConfirmed) {
@@ -639,8 +647,6 @@ function App(): JSX.Element {
showCancelButton: !result.success && !!errorInfo?.host,
confirmButtonText: !result.success && errorInfo?.host ? t('common.go_to_fix') : t('common.ok'),
cancelButtonText: t('common.close'),
- background: '#1e1e1e',
- color: '#fff',
width: '600px'
}).then((alertResult) => {
if (alertResult.isConfirmed && !result.success && errorInfo?.host) {
@@ -667,10 +673,7 @@ function App(): JSX.Element {
Swal.fire({
title: t('common.success'),
text: t('server.nginx.config_saved'),
- icon: 'success',
- background: '#1e1e1e',
- color: '#fff',
- customClass: { popup: 'swal2-dark-popup' }
+ icon: 'success'
})
setIsProjectNginxConfigOpen(false)
}
@@ -762,9 +765,7 @@ function App(): JSX.Element {
icon: 'warning',
showCancelButton: true,
confirmButtonText: t('mariadb_process_monitor.kill_btn'),
- cancelButtonText: t('common.cancel'),
- background: '#1a1d21',
- color: '#fff'
+ cancelButtonText: t('common.cancel')
})
if (result.isConfirmed) {
@@ -789,13 +790,7 @@ function App(): JSX.Element {
maxWidth="lg"
fullWidth
PaperProps={{
- sx: {
- bgcolor: '#1a1d21',
- backgroundImage: 'none',
- color: '#fff',
- borderRadius: 2,
- border: '1px solid rgba(255,255,255,0.1)'
- }
+ className: 'mui-custom-dialog-paper'
}}
>
@@ -1167,7 +1162,12 @@ function App(): JSX.Element {
)}
{v.status === 'installed' && (
-
+
+ } onClick={handleOpenNginxConfig}>
+ {t('common.settings').toUpperCase()}
+
+
+
)}
@@ -1920,11 +1920,7 @@ function App(): JSX.Element {
maxWidth="lg"
fullWidth
PaperProps={{
- sx: {
- bgcolor: '#1a1d21',
- color: '#fff',
- borderRadius: 2
- }
+ className: 'mui-custom-dialog-paper'
}}
>
@@ -2016,12 +2012,7 @@ function App(): JSX.Element {
maxWidth="md"
fullWidth
PaperProps={{
- sx: {
- bgcolor: '#1e1e1e',
- color: '#fff',
- borderRadius: 3,
- border: '1px solid rgba(255,255,255,0.1)'
- }
+ className: 'mui-custom-dialog-paper'
}}
>
@@ -2067,12 +2058,7 @@ function App(): JSX.Element {
maxWidth="md"
fullWidth
PaperProps={{
- sx: {
- bgcolor: '#1e1e1e',
- color: '#fff',
- borderRadius: 3,
- border: '1px solid rgba(255,255,255,0.1)'
- }
+ className: 'mui-custom-dialog-paper'
}}
>
@@ -2112,16 +2098,14 @@ function App(): JSX.Element {
${formattedMessage}
${!result.success && errorInfo ? `
-
-
- {t('server.project_nginx.error_line', { line: errorInfo.line })}
+
` : ''}
`,
icon: result.success ? 'success' : 'error',
- background: '#1e1e1e',
- color: '#fff',
width: '600px'
})
}
@@ -2150,12 +2134,7 @@ function App(): JSX.Element {
maxWidth="md"
fullWidth
PaperProps={{
- sx: {
- bgcolor: '#1e1e1e',
- color: '#fff',
- borderRadius: 3,
- border: '1px solid rgba(255,255,255,0.1)'
- }
+ className: 'mui-custom-dialog-paper'
}}
>
diff --git a/src/renderer/src/components/MariaDbDatabaseManager.tsx b/src/renderer/src/components/MariaDbDatabaseManager.tsx
index c2061fb..39f4737 100644
--- a/src/renderer/src/components/MariaDbDatabaseManager.tsx
+++ b/src/renderer/src/components/MariaDbDatabaseManager.tsx
@@ -88,8 +88,6 @@ const MariaDbDatabaseManager: React.FC = ({ version
input: 'text',
inputLabel: t('mariadb_manager.db_name_label'),
showCancelButton: true,
- background: '#1e1e1e',
- color: '#fff',
inputValidator: (value) => {
if (!value) return t('common.error_required')
return null
@@ -99,10 +97,10 @@ const MariaDbDatabaseManager: React.FC = ({ version
if (dbName) {
const result = await window.api.invoke('mariadb:create-db', { versionId: selectedVersion, dbName })
if (result.success) {
- Swal.fire({ icon: 'success', title: t('common.ok'), background: '#1e1e1e', color: '#fff' })
+ Swal.fire({ icon: 'success', title: t('common.ok') })
fetchData()
} else {
- Swal.fire({ icon: 'error', title: t('common.error'), text: result.message, background: '#1e1e1e', color: '#fff' })
+ Swal.fire({ icon: 'error', title: t('common.error'), text: result.message })
}
}
}
@@ -112,9 +110,7 @@ const MariaDbDatabaseManager: React.FC = ({ version
title: t('common.are_you_sure'),
text: t('mariadb_manager.delete_db_confirm', { db: dbName }),
icon: 'warning',
- showCancelButton: true,
- background: '#1e1e1e',
- color: '#fff'
+ showCancelButton: true
})
if (result.isConfirmed) {
@@ -122,7 +118,7 @@ const MariaDbDatabaseManager: React.FC = ({ version
if (res.success) {
fetchData()
} else {
- Swal.fire({ icon: 'error', title: t('common.error'), text: res.message, background: '#1e1e1e', color: '#fff' })
+ Swal.fire({ icon: 'error', title: t('common.error'), text: res.message })
}
}
}
@@ -135,8 +131,6 @@ const MariaDbDatabaseManager: React.FC = ({ version
`` +
``,
focusConfirm: false,
- background: '#1e1e1e',
- color: '#fff',
preConfirm: () => {
const user = (document.getElementById('swal-user') as HTMLInputElement).value
const host = (document.getElementById('swal-host') as HTMLInputElement).value
@@ -152,10 +146,10 @@ const MariaDbDatabaseManager: React.FC = ({ version
if (formValues) {
const result = await window.api.invoke('mariadb:create-user', { versionId: selectedVersion, ...formValues })
if (result.success) {
- Swal.fire({ icon: 'success', title: t('common.ok'), background: '#1e1e1e', color: '#fff' })
+ Swal.fire({ icon: 'success', title: t('common.ok') })
fetchData()
} else {
- Swal.fire({ icon: 'error', title: t('common.error'), text: result.message, background: '#1e1e1e', color: '#fff' })
+ Swal.fire({ icon: 'error', title: t('common.error'), text: result.message })
}
}
}
@@ -165,9 +159,7 @@ const MariaDbDatabaseManager: React.FC = ({ version
title: t('common.are_you_sure'),
text: t('mariadb_manager.delete_user_confirm', { user: `${user}@${host}` }),
icon: 'warning',
- showCancelButton: true,
- background: '#1e1e1e',
- color: '#fff'
+ showCancelButton: true
})
if (result.isConfirmed) {
@@ -175,7 +167,7 @@ const MariaDbDatabaseManager: React.FC = ({ version
if (res.success) {
fetchData()
} else {
- Swal.fire({ icon: 'error', title: t('common.error'), text: res.message, background: '#1e1e1e', color: '#fff' })
+ Swal.fire({ icon: 'error', title: t('common.error'), text: res.message })
}
}
}
diff --git a/src/renderer/src/components/MariaDbExportWizard.tsx b/src/renderer/src/components/MariaDbExportWizard.tsx
index d2e962e..d03c77f 100644
--- a/src/renderer/src/components/MariaDbExportWizard.tsx
+++ b/src/renderer/src/components/MariaDbExportWizard.tsx
@@ -272,7 +272,15 @@ const MariaDbExportWizard: React.FC = ({ open, onClose
}
return (
-