add updating check

This commit is contained in:
2022-10-16 21:13:30 +02:00
parent 2bf98db729
commit 5565892155
9 changed files with 341 additions and 13 deletions

View File

@@ -6,7 +6,6 @@ window.addEventListener('DOMContentLoaded', () => {
titlebar = new Titlebar({
backgroundColor: Color.fromHex("#303030"),
itemBackgroundColor: Color.fromHex("#121212"),
icon: "https://ez-pp.farm/static/logos/circle.png",
menu: null,
maximizable: false
});
@@ -20,9 +19,22 @@ window.addEventListener('DOMContentLoaded', () => {
if (success == undefined)
return;
if (success) {
//TODO: Alert User, folder set.
} else {
//TODO: Alert User, invalid osu folder selected
}
});
ipcRenderer.on('status_update', (event, status) => {
switch (status.type) {
case "up-to-date":
$("#launch-btn").attr('disabled', false);
$('#launch-btn').html('Launch');
break;
case "update-available":
$("#launch-btn").attr('disabled', false);
$('#launch-btn').html('Update');
break;
}
})
})