change new version check api to gitee

This commit is contained in:
Xen 2020-05-16 12:04:12 +08:00
parent e4c6e3a86e
commit 67708a5432
2 changed files with 4 additions and 3 deletions

View File

@ -19,7 +19,7 @@
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' 'unsafe-inline'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; connect-src 'self' https://api.github.com/repos/xenkuo/comNG/releases/latest"
content="default-src 'self'; script-src 'self' 'unsafe-inline'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; connect-src 'self' https://gitee.com/api/v5/repos/xenkuo/comNG/releases/latest"
/>
</head>

View File

@ -4,7 +4,7 @@ const { remote, shell, ipcRenderer, clipboard } = require("electron");
const Store = require("electron-store");
const appVersion = remote.app.getVersion();
const appUpdaterUrl =
"https://api.github.com/repos/xenkuo/comNG/releases/latest";
"https://gitee.com/api/v5/repos/xenkuo/comNG/releases/latest";
var M = require("materialize-css");
M.AutoInit();
@ -227,7 +227,8 @@ window.onload = () => {
};
dialog.showMessageBox(dialogOpts).then((returnValue) => {
if (returnValue.response === 0) shell.openExternal(res.html_url);
if (returnValue.response === 0)
shell.openExternal(res.assets[0].browser_download_url);
});
}
});