This commit is contained in:
HorizonCode committed 2024-03-11 17:34:38 +01:00
commit 6bcce04b72
5 files changed
+37 -5

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
const appName = "EZPPLauncher";
const appVersion = "2.1.0";
const appVersion = "2.1.1";
module.exports = { appName, appVersion };
+15
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 };
+2 -1
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" : " ";