finish update dialog

This commit is contained in:
2024-01-22 12:37:29 +01:00
parent 3570582c6b
commit bf8a458b5f
7 changed files with 141 additions and 104 deletions

View File

@@ -1,13 +1,16 @@
const semver = require("semver");
const { appVersion } = require("./appInfo");
const repoUrl =
const repoApiUrl =
"https://git.ez-pp.farm/api/v1/repos/EZPPFarm/EZPPLauncher/releases?limit=1";
const releasesUrl =
"https://git.ez-pp.farm/EZPPFarm/EZPPLauncher/releases/latest";
module.exports = {
updateAvailable: async () => {
try {
const latestRelease = await fetch(repoUrl);
const latestRelease = await fetch(repoApiUrl);
const json = await latestRelease.json();
if (json.length <= 0) return false;
return {
@@ -18,4 +21,5 @@ module.exports = {
return { update: false };
}
},
releasesUrl,
};