clocktopus 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard/views.js +5 -4
- package/package.json +1 -1
package/dist/dashboard/views.js
CHANGED
|
@@ -745,18 +745,19 @@ export function indexPage() {
|
|
|
745
745
|
overlay.classList.add('active');
|
|
746
746
|
setMsg('server-msg', '', true);
|
|
747
747
|
|
|
748
|
-
const
|
|
748
|
+
const tauriApi = window.__TAURI__ || window.__TAURI_INTERNALS__;
|
|
749
|
+
const inTauri = !!(tauriApi && tauriApi.core && tauriApi.core.invoke);
|
|
749
750
|
|
|
750
751
|
if (inTauri) {
|
|
751
752
|
try {
|
|
752
|
-
await
|
|
753
|
+
await tauriApi.core.invoke('restart_server');
|
|
753
754
|
} catch (err) {
|
|
754
|
-
overlayText.textContent = 'Restart failed.
|
|
755
|
+
overlayText.textContent = 'Restart failed: ' + (err && err.message ? err.message : String(err));
|
|
755
756
|
setTimeout(function() {
|
|
756
757
|
overlay.classList.remove('active');
|
|
757
758
|
btn.disabled = false;
|
|
758
759
|
btn.textContent = 'Restart Server';
|
|
759
|
-
},
|
|
760
|
+
}, 4000);
|
|
760
761
|
return;
|
|
761
762
|
}
|
|
762
763
|
} else {
|