markpdfdown 0.2.0 → 0.2.1
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/main/index.js
CHANGED
|
@@ -3801,8 +3801,17 @@ class UpdateService {
|
|
|
3801
3801
|
this.sendStatus({ status: UpdateStatus.DOWNLOADED, version: info.version });
|
|
3802
3802
|
});
|
|
3803
3803
|
autoUpdater.on("error", (error) => {
|
|
3804
|
-
|
|
3805
|
-
|
|
3804
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
3805
|
+
const safeMessage = errorMessage.length > 200 ? `${errorMessage.slice(0, 200)}...` : errorMessage;
|
|
3806
|
+
const errorDetails = {
|
|
3807
|
+
message: safeMessage,
|
|
3808
|
+
name: error instanceof Error ? error.name : void 0,
|
|
3809
|
+
stack: error instanceof Error ? error.stack : void 0,
|
|
3810
|
+
code: error.code,
|
|
3811
|
+
statusCode: error.statusCode
|
|
3812
|
+
};
|
|
3813
|
+
console.error("[UpdateService] Error:", errorDetails);
|
|
3814
|
+
this.sendStatus({ status: UpdateStatus.ERROR, error: safeMessage });
|
|
3806
3815
|
});
|
|
3807
3816
|
}
|
|
3808
3817
|
sendStatus(data) {
|
|
@@ -3829,6 +3838,9 @@ function registerUpdaterHandlers() {
|
|
|
3829
3838
|
ipcMain.handle(IPC_CHANNELS.UPDATER.CHECK_FOR_UPDATES, async () => {
|
|
3830
3839
|
if (!app.isPackaged) {
|
|
3831
3840
|
console.log("[Updater] Skipping update check in development mode");
|
|
3841
|
+
windowManager.sendToRenderer(IPC_CHANNELS.EVENTS.UPDATER_STATUS, {
|
|
3842
|
+
status: UpdateStatus.NOT_AVAILABLE
|
|
3843
|
+
});
|
|
3832
3844
|
return;
|
|
3833
3845
|
}
|
|
3834
3846
|
await updateService.checkForUpdates();
|
|
@@ -69888,7 +69888,7 @@ const UpdateChecker = () => {
|
|
|
69888
69888
|
] })
|
|
69889
69889
|
] });
|
|
69890
69890
|
case "downloading":
|
|
69891
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { direction: "vertical", style: { width:
|
|
69891
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { direction: "vertical", style: { width: 300 }, children: [
|
|
69892
69892
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Text$1, { children: [
|
|
69893
69893
|
t2("update.downloading"),
|
|
69894
69894
|
" ",
|
|
@@ -69918,17 +69918,20 @@ const UpdateChecker = () => {
|
|
|
69918
69918
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { type: "secondary", children: t2("update.up_to_date") })
|
|
69919
69919
|
] });
|
|
69920
69920
|
case "error":
|
|
69921
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { children: [
|
|
69922
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
69923
|
-
|
|
69924
|
-
|
|
69921
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { direction: "vertical", children: [
|
|
69922
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { children: [
|
|
69923
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$h, { style: { color: "#ff4d4f" } }),
|
|
69924
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { type: "danger", children: t2("update.error") }),
|
|
69925
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { onClick: handleCheckForUpdates, children: t2("update.retry") })
|
|
69926
|
+
] }),
|
|
69927
|
+
statusData.error && /* @__PURE__ */ jsxRuntimeExports.jsx(Text$1, { type: "secondary", style: { maxWidth: 420, wordBreak: "break-word" }, children: statusData.error })
|
|
69925
69928
|
] });
|
|
69926
69929
|
case "idle":
|
|
69927
69930
|
default:
|
|
69928
69931
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { onClick: handleCheckForUpdates, children: t2("update.check_for_updates") });
|
|
69929
69932
|
}
|
|
69930
69933
|
};
|
|
69931
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginTop: 16 }, children: renderStatus() });
|
|
69934
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginTop: 16, minHeight: 70, display: "flex", alignItems: "center", justifyContent: "center" }, children: renderStatus() });
|
|
69932
69935
|
};
|
|
69933
69936
|
const About = () => {
|
|
69934
69937
|
const { Text: Text2, Title: Title2 } = Typography;
|
package/dist/renderer/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>MarkPDFdown</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-Xbcf0bJ0.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="./assets/index-B_JfRqwM.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|