diff --git a/package-lock.json b/package-lock.json index fb7d326..0e161b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "altarik-launcher", - "version": "0.2.2", + "version": "0.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 00a750a..7379af4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "altarik-launcher", - "version": "0.2.2", + "version": "0.3.0", "description": "Altarik Launcher", "main": "src/server/main.js", "repository": "AltarikMC/Launcher", diff --git a/src/client/assets/css/index.css b/src/client/assets/css/index.css index bd3e3a8..2fd5a92 100644 --- a/src/client/assets/css/index.css +++ b/src/client/assets/css/index.css @@ -7,7 +7,10 @@ html{ } body{ - background: black; + background-color: black; + background-image: url("../images/background.jpg"); + background-size: cover; + background-repeat: no-repeat; margin:0; height:100%; font-family: "Roboto"; @@ -28,7 +31,9 @@ body{ background-size: 100%; width: 322px; height: 398px; - padding: 20px 50px; + padding: 10px 50px; + font-family: "French-Press"; + font-size: 26px; } #media { @@ -174,19 +179,31 @@ h3 { color: black; } -.selected h3 { - color: red; -} + #sidebar h2, #sidebar-content h3 { margin: 0; } -#sidebar h2 { - margin-bottom: 10px; +#sidebar-content { + color: rgba(56, 56, 56, 0.6); +} + +#sidebar-content .selected { + color: black; } #sidebar-content { overflow: auto; +} + +#sidebar-content p { + margin: 0px; +} + +#sidebar-content hr { + margin: 0px 0px 5px 0px; + border-width:0; + border-top: 1px solid black; } \ No newline at end of file diff --git a/src/client/assets/css/login.css b/src/client/assets/css/login.css index 47ef42e..0530425 100644 --- a/src/client/assets/css/login.css +++ b/src/client/assets/css/login.css @@ -7,7 +7,10 @@ html{ } body{ - background: rgb(48, 48, 48); + background-color: rgb(48, 48, 48); + background-image: url("../images/background.jpg"); + background-size: cover; + background-repeat: no-repeat; margin:0; height:100%; font-family: "Roboto"; diff --git a/src/client/assets/images/background.jpg b/src/client/assets/images/background.jpg new file mode 100644 index 0000000..ac1b2c2 Binary files /dev/null and b/src/client/assets/images/background.jpg differ diff --git a/src/client/assets/images/maxresdefault.jpg b/src/client/assets/images/maxresdefault.jpg deleted file mode 100644 index f9250d0..0000000 Binary files a/src/client/assets/images/maxresdefault.jpg and /dev/null differ diff --git a/src/client/assets/js/index.js b/src/client/assets/js/index.js index 2eeebea..5922650 100644 --- a/src/client/assets/js/index.js +++ b/src/client/assets/js/index.js @@ -89,12 +89,12 @@ ipcRenderer.on('launch', (e, args) => { ipcRenderer.on("modsInformations", (e, args) => { if(args === null) { - sidebar.innerHTML = "

Une erreur est survenue lors de la récupération des informations, vérifiez votre connexion internet puis cliquez sur réessayez

" + sidebar.innerHTML = "

Une erreur est survenue lors de la récupération des informations, vérifiez votre connexion internet puis cliquez sur réessayez

" + "" } else { let element = "" for(const i in args) { - element += `

${args[i].title}

${args[i].description}

` + element += `

${args[i].title}

${args[i].description}

` } sidebar.innerHTML = element } @@ -110,7 +110,8 @@ function changeSelectedChapter(element) { v.classList.remove("selected") }) element.classList.add("selected") - launchBtn.classList.remove('hidden') + launchText.innerHTML = "JOUER" + launchBtn.disabled = false } disconnectBtn.addEventListener('click', e => { diff --git a/src/client/index.html b/src/client/index.html index c9835fb..edd206d 100644 --- a/src/client/index.html +++ b/src/client/index.html @@ -50,12 +50,11 @@
-
- diff --git a/src/server/main.js b/src/server/main.js index 7781d29..73a3609 100644 --- a/src/server/main.js +++ b/src/server/main.js @@ -90,7 +90,7 @@ ipcMain.on("login", (event, args) => { }, 1000) }).catch((err) => { - logger.warn(err) + logger.error(err) showNotification("Erreur de connexion") }) }) @@ -140,6 +140,7 @@ ipcMain.on("launch", (event, args) => { }) }).catch((err) => { showNotification("Impossible de lancer le jeu") + event.sender.send("close", 1) logger.error('Unable to launch the game') logger.error(err) }) @@ -166,9 +167,9 @@ function getModsInformations(event) { event.sender.send('modsInformations', extractModsFromFileSystem()) } }).catch(err => { - logger.error("Unable to connect to server") - logger.error(err) - event.sender.send('informations', extractModsFromFileSystem()) + logger.warn("Unable to connect to server") + logger.warn(err) + event.sender.send('modsInformations', extractModsFromFileSystem()) }) } @@ -179,6 +180,7 @@ function extractModsFromFileSystem() { return extractModsInformations(JSON.parse(o.data)) } else { showNotification("Impossible de récupérer certaines informations en ligne", "Veuillez réessayez en cliquant sur le bouton") + logger.error("Unable to get chapters informations from server or filesystem") return null } }