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 (
<>
-