Merge branch 'dev' of https://git.ez-pp.farm/EZPPFarm/EZPPLauncher into dev
This commit is contained in:
@@ -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
15
electron/imageUtil.js
Normal 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 };
|
@@ -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" : " ";
|
||||
|
Reference in New Issue
Block a user