This commit is contained in:
2024-03-11 17:34:38 +01:00
5 changed files with 37 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
const appName = "EZPPLauncher";
const appVersion = "2.1.0";
const appVersion = "2.1.1";
module.exports = { appName, appVersion };

15
electron/imageUtil.js Normal file
View File

@@ -0,0 +1,15 @@
async function checkImageExists(url) {
try {
const response = await fetch(url, { method: "HEAD" });
if (!response.ok) {
return false;
}
const contentType = response.headers.get("content-type");
if (!contentType) return false;
return contentType.startsWith("image/");
} catch (error) {
return false;
}
}
module.exports = { checkImageExists };

View File

@@ -51,9 +51,10 @@ module.exports = {
richPresence = null;
}
},
updateStatus: ({ state, details }) => {
updateStatus: ({ state, details, largeImageKey }) => {
currentStatus.state = state ?? " ";
currentStatus.details = details ?? " ";
currentStatus.largeImageKey = largeImageKey ?? "ezppfarm";
},
updateVersion: (osuVersion) => {
currentStatus.smallImageKey = osuVersion ? "osu" : " ";