From 573bcd393cd00e29205be51330f01566fe09f0a1 Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Sun, 23 Oct 2022 17:07:20 +0200 Subject: [PATCH] add notice under Linux --- app.js | 11 +++++++++-- preload/preload.js | 8 ++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index ea73f0d..da4c12d 100644 --- a/app.js +++ b/app.js @@ -51,10 +51,10 @@ const run = () => { rpc.updateStatus(undefined, undefined); } } else { - if(isIngame){ + if (isIngame) { rpc.updateState("Playing..."); rpc.updateStatus("Clicking circles!", "runningunderwine"); - }else{ + } else { rpc.updateState("Idle in Launcher..."); rpc.updateStatus(undefined, undefined); } @@ -74,6 +74,13 @@ const run = () => { await updateConfigVars(mainWindow); await tryLogin(mainWindow); await doUpdateCheck(mainWindow); + if (platform === "linux") { + console.log("yes"); + 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!" + }); + } }) app.on('activate', function () { if (BrowserWindow.getAllWindows().length === 0) mainWindow = createWindow(); diff --git a/preload/preload.js b/preload/preload.js index bd42cd1..2feb57e 100644 --- a/preload/preload.js +++ b/preload/preload.js @@ -168,6 +168,14 @@ window.addEventListener('DOMContentLoaded', () => { }); ipcRenderer.send("do-update-check"); break; + case "info": + Swal.fire({ + title: 'Info!', + text: status.message, + icon: 'info', + confirmButtonText: 'Okay' + }); + break; case "update-complete": Swal.fire({ title: 'Yaaay!',