Compare commits
4 Commits
72a0d9b780
...
78c554be2d
Author | SHA1 | Date | |
---|---|---|---|
78c554be2d | |||
586857146c | |||
2cea272836 | |||
02d4fa2199 |
20
app.js
20
app.js
@ -40,7 +40,10 @@ const run = () => {
|
||||
const splitArray = [components.shift(), components.join(' - ')];
|
||||
rpcOsuVersion = splitArray[0];
|
||||
currentMap = splitArray[1];
|
||||
rpc.updateState("Playing...");
|
||||
if(currentMap.endsWith(".osu")){
|
||||
rpc.updateState("Editing...");
|
||||
currentMap = currentMap.substring(0, currentMap.length - 4);
|
||||
} else rpc.updateState("Playing...");
|
||||
}
|
||||
|
||||
rpc.updateStatus(currentMap, rpcOsuVersion);
|
||||
@ -79,7 +82,11 @@ const run = () => {
|
||||
const splitArray = [components.shift(), components.join(' - ')];
|
||||
rpcOsuVersion = splitArray[0];
|
||||
currentMap = splitArray[1];
|
||||
rpc.updateState("Playing...");
|
||||
if(currentMap.endsWith(".osu")){
|
||||
rpc.updateState("Editing...");
|
||||
currentMap = currentMap.substring(0, currentMap.length - 4);
|
||||
}
|
||||
else rpc.updateState("Playing...");
|
||||
}
|
||||
|
||||
rpc.updateStatus(currentMap, rpcOsuVersion);
|
||||
@ -112,6 +119,15 @@ const run = () => {
|
||||
await tryLogin(mainWindow);
|
||||
await doUpdateCheck(mainWindow);
|
||||
if (platform === "linux") {
|
||||
try{
|
||||
await terminalUtil.execCommand(`osu-stable -h`);
|
||||
}catch(err){
|
||||
mainWindow.webContents.send('status_update', {
|
||||
type: "package-issue",
|
||||
message: "Seems like you dont have the osu AUR Package installed, please install it."
|
||||
});
|
||||
return;
|
||||
}
|
||||
/* mainWindow.webContents.send('status_update', {
|
||||
type: "info",
|
||||
message: "We detected that you are running the Launcher under Linux. It's currently just compatible with Arch and the osu AUR package!"
|
||||
|
@ -85,6 +85,11 @@
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.server-logo img {
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
text-align: start;
|
||||
display: flex;
|
||||
|
@ -32,8 +32,6 @@
|
||||
},
|
||||
"scripts": {
|
||||
"start": "electron .",
|
||||
"test": "electron ./test/encrypt.js",
|
||||
"rebuild": "electron-rebuild -f -w wincrypt",
|
||||
"pack-win": "electron-builder --x64",
|
||||
"pack-win32": "electron-builder --ia32",
|
||||
"pack-winarm": "electron-builder --arm64",
|
||||
|
@ -178,6 +178,16 @@ window.addEventListener('DOMContentLoaded', () => {
|
||||
confirmButtonText: 'Okay'
|
||||
});
|
||||
break;
|
||||
case "package-issue":
|
||||
Swal.fire({
|
||||
title: 'Uh oh!',
|
||||
text: status.message,
|
||||
icon: 'error',
|
||||
confirmButtonText: 'Okay'
|
||||
});
|
||||
$("#launch-btn").attr('disabled', true);
|
||||
$('#launch-btn').html('missing packages');
|
||||
break;
|
||||
case "update-complete":
|
||||
Swal.fire({
|
||||
title: 'Yaaay!',
|
||||
|
Loading…
x
Reference in New Issue
Block a user