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.
@@ -745,18 +745,19 @@ export function indexPage() {
745
745
  overlay.classList.add('active');
746
746
  setMsg('server-msg', '', true);
747
747
 
748
- const inTauri = !!(window.__TAURI_INTERNALS__ || window.__TAURI__);
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 window.__TAURI__.core.invoke('restart_server');
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
- }, 2500);
760
+ }, 4000);
760
761
  return;
761
762
  }
762
763
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clocktopus",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {