diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index f00b400..b55cc4e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,5 +1,5 @@ --- -name: Bug report +name: Bugs report about: Create a report to help us improve title: "[BUG]" labels: bug @@ -20,16 +20,17 @@ Steps to reproduce the behavior: **Expected behavior** A clear and concise description of what you expected to happen. -**Screenshots** +**Screenshots and logs** If applicable, add screenshots to help explain your problem. +Please give logs files too or a part of them, there are located in %AppData%\altarik-launcher\logs\ **Desktop (please complete the following information):** - - OS: [e.g. Windows 10 20H2 / 8.1/ 7 SP1] + - OS: [e.g. Windows 10 20H2 build 19043.1237 / 8.1 / 7 SP1] - Device components: - Intel i3 8400 - GTX 1060 3gb - - etc. - - Launcher Version: [e.g. 1.2] + - 8 gb DDR4 + - Launcher Version: [e.g. 0.6.1 can be found in logs] **Additional context** Add any other context about the problem here. diff --git a/src/client/assets/css/index.css b/src/client/assets/css/index.css index 4aa3fed..7620e7b 100644 --- a/src/client/assets/css/index.css +++ b/src/client/assets/css/index.css @@ -13,7 +13,7 @@ body{ background-repeat: no-repeat; margin:0; height:100%; - font-family: "Roboto"; + font-family: "Roboto", sans-serif; color: black; } @@ -32,7 +32,7 @@ body{ width: 322px; height: 398px; padding: 10px 50px; - font-family: "French-Press"; + font-family: "French-Press", sans-serif; font-size: 26px; } @@ -73,7 +73,7 @@ h3 { } #launch-text { - font-family: "French-Press"; + font-family: "French-Press", sans-serif; font-size: 52px; font-weight: bold; } @@ -90,7 +90,7 @@ h3 { height:122px; padding:10px; text-align: center; - border-width: 0px; + border-width: 0; } .hidden{ @@ -116,7 +116,7 @@ h3 { position:relative; margin: 0 auto; height:28px; - font-family: "French-Press"; + font-family: "French-Press", sans-serif; font-size: 24px; color:white; } @@ -130,11 +130,11 @@ h3 { position: absolute; right: 25px; top: 50px; - padding: 0px 30px; + padding: 0 30px; } #nick { - font-family: "French-Press"; + font-family: "French-Press", sans-serif; font-size: 28px; position: relative; top:45%; @@ -203,11 +203,11 @@ h3 { } #sidebar-content p { - margin: 0px; + margin: 0; } #sidebar-content hr { - margin: 0px 0px 5px 0px; + margin: 0 0 5px 0; border-width:0; border-top: 1px solid black; } diff --git a/src/client/assets/css/login.css b/src/client/assets/css/login.css index 91d27f2..e047301 100644 --- a/src/client/assets/css/login.css +++ b/src/client/assets/css/login.css @@ -13,7 +13,7 @@ body{ background-repeat: no-repeat; margin:0; height:100%; - font-family: "Roboto"; + font-family: "Roboto", sans-serif; } #content{ diff --git a/src/client/assets/js/index.js b/src/client/assets/js/index.js index c5e7c24..d9b35f9 100644 --- a/src/client/assets/js/index.js +++ b/src/client/assets/js/index.js @@ -68,15 +68,13 @@ let app = new vue({ } } }) - -const sidebar = document.querySelector("#sidebar-content") let gameLaunching = false let selectedChapter = -1; ipcRenderer.on("nick", (_, args) => app.nick = args.name) -ipcRenderer.on("invalidated", e => { +ipcRenderer.on("invalidated", () => { app.invalidateButtonDisabled = false app.invalidateButtonText = "Supprimer et retélécharger les bibliothèques" }) @@ -117,7 +115,7 @@ ipcRenderer.on("modsInformations", (e, args) => { function changeSelectedChapter(element) { selectedChapter = Number(element.dataset.chapter) - document.querySelectorAll("#sidebar-content > div").forEach((v, key) => { + document.querySelectorAll("#sidebar-content > div").forEach((v) => { v.classList.remove("selected") }) element.classList.add("selected") diff --git a/src/client/index.html b/src/client/index.html index 4e06c6e..46556b8 100644 --- a/src/client/index.html +++ b/src/client/index.html @@ -7,7 +7,7 @@ - +
diff --git a/src/client/login.html b/src/client/login.html index f518ffd..7f5f814 100644 --- a/src/client/login.html +++ b/src/client/login.html @@ -1,5 +1,5 @@ - + Altarik Launcher @@ -7,7 +7,7 @@ - +
diff --git a/src/server/install.js b/src/server/install.js index 4321689..9dad38e 100644 --- a/src/server/install.js +++ b/src/server/install.js @@ -12,7 +12,7 @@ function handleSquirrelEvent(app) { const exeName = path.basename(process.execPath); const spawn = function(command, args) { - let spawnedProcess, error; + let spawnedProcess; try { spawnedProcess = ChildProcess.spawn(command, args, {detached: true}); diff --git a/src/server/main.js b/src/server/main.js index 865c713..d480807 100644 --- a/src/server/main.js +++ b/src/server/main.js @@ -69,7 +69,7 @@ ipcMain.on("login", (event, args) => { minecraft.login(event, win, args.user, args.pass) }) -ipcMain.on("microsoft-login", (event, args) => { +ipcMain.on("microsoft-login", (event) => { minecraft.microsoftLogin(event, win) }) @@ -89,7 +89,7 @@ ipcMain.on("notification", (event, args) => { showNotification(args.title, args.body) }) -ipcMain.on("disconnect", (e) => { +ipcMain.on("disconnect", () => { win.loadFile('src/client/login.html') }) diff --git a/src/server/minecraft.js b/src/server/minecraft.js index b49cd07..db671ef 100644 --- a/src/server/minecraft.js +++ b/src/server/minecraft.js @@ -11,7 +11,7 @@ const msmc = require('msmc') class Minecraft { - appdata = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Preferences' : process.env.HOME + "/.local/share") + appdata = process.env.APPDATA || (process.platform === 'darwin' ? process.env.HOME + '/Library/Preferences' : process.env.HOME + "/.local/share") minecraftpath = join(this.appdata, ".altarik") launcher = new Client() auth = null @@ -33,7 +33,7 @@ class Minecraft { win.loadFile('src/client/index.html').then(() => { event.sender.send("nick", { name: v.name }) }) - }).catch((err) => { + }).catch(() => { event.sender.send("loginError") logger.error("[MJ login] User haven't purchase the game") this.showNotification("Erreur de connexion") @@ -192,13 +192,11 @@ class Minecraft { if(sha1 === chapter.modspack.sha1sum[j]) { await this.unzipMods(path).catch(err => { reject(err) - return }) } else { logger.warn(`sha1sum ${sha1} don't correspond to ${chapter.modspack.sha1sum[j]} of mods ${path}`) await this.downloadAndExtractMods(chapter.modspack.mods[j], path).catch(err => { reject(err) - return }) } event.sender.send("progress", {type: "mods", task: Number(j)+1, total: chapter.modspack.mods.length }) @@ -217,7 +215,6 @@ class Minecraft { } } reject("didn't found the correct chapter" + chapter) - return }) } diff --git a/src/server/updater.js b/src/server/updater.js index 24f2bd5..14cde6e 100644 --- a/src/server/updater.js +++ b/src/server/updater.js @@ -1,6 +1,5 @@ const isDev = require('electron-is-dev') const { Notification } = require('electron') -const os = require('os') const pkg = require('../../package.json') const server = 'https://update.electronjs.org' @@ -28,8 +27,7 @@ function configUpdater(app, autoUpdater, dialog, logger) { app.isReady ? initUpdater(autoUpdater) : app.on("ready", () => initUpdater(autoUpdater)) - autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName, releaseDate, updateURL) => { - showNotification(releaseNotes, updateURL) + autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => { const dialogOpts = { type: 'info', buttons: ['Rédémarrer', 'Plus tard'], @@ -40,19 +38,20 @@ function configUpdater(app, autoUpdater, dialog, logger) { dialog.showMessageBox(dialogOpts).then((returnValue) => { if (returnValue.response === 0) { - logger.info("Quit applicaiton to install update") + logger.info("Leaving application to install update...") autoUpdater.quitAndInstall() } }) }) autoUpdater.on('error', message => { + showNotification("Impossible de mettre à jour le launcher", "vérifier votre connexion") logger.error('There was a problem updating the application') logger.error(message) }) autoUpdater.on('update-available', () => { - showNotification("Altarik launcher", "downloading update") + showNotification("Altarik launcher", "Téléchargement de la mise à jour") logger.info("update available, downloading...") }) }