Skip to content

Commit

Permalink
update whatsnew url
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyChen777 committed Jan 9, 2024
1 parent 89e3efc commit 37ad117
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion app/main/services/upgrade-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export interface IUpgradeServiceState {
export const IUpgradeService = createDecorator("upgradeService");

export class UpgradeService extends Eventable<IUpgradeServiceState> {
private _downloadingProgress: number = 0;

constructor() {
super("upgradeService", {
checking: 0,
Expand Down Expand Up @@ -51,6 +53,7 @@ export class UpgradeService extends Eventable<IUpgradeServiceState> {
});

autoUpdater.on("update-downloaded", async (info) => {
this.fire({ downloading: 100 });
this.fire("downloaded");
if (!info.releaseNotes) {
info.releaseNotes = "";
Expand All @@ -75,9 +78,10 @@ export class UpgradeService extends Eventable<IUpgradeServiceState> {
});

autoUpdater.on("download-progress", (progressObj) => {
if (progressObj.percent % 10 === 0) {
if (progressObj.percent - this._downloadingProgress > 5) {
this.fire({ downloading: progressObj.percent });
}
this._downloadingProgress = progressObj.percent;
});

autoUpdater.checkForUpdates();
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/ui/whats-new-view/whats-new-view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const loadHistory = async () => {
const response = await networkTool.get(
`https://api.paperlib.app/release-notes/html?lang=${
preState.language === "zh-CN" ? "CN" : "EN"
}&latest=5&branch=dev3.0.0`
}&latest=5&branch=dev-3.0.0`
);
historyReleaseNoteHTML.value = response.body;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "paperlib-beta",
"version": "3.0.0-beta.2",
"version": "3.0.0-beta.1",
"main": "dist/main-entry.js",
"description": "A simple academic paper management tool.",
"author": "Future Scholars <[email protected]>",
Expand Down

0 comments on commit 37ad117

Please sign in to comment.