mirror of
https://github.com/AltarikMC/Launcher
synced 2024-11-22 06:19:50 +01:00
improve visual + improve launch button responsiveness + dump to 0.3.0
This commit is contained in:
parent
9ab2afacdd
commit
66e6b92a0d
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "altarik-launcher",
|
"name": "altarik-launcher",
|
||||||
"version": "0.2.2",
|
"version": "0.3.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "altarik-launcher",
|
"name": "altarik-launcher",
|
||||||
"version": "0.2.2",
|
"version": "0.3.0",
|
||||||
"description": "Altarik Launcher",
|
"description": "Altarik Launcher",
|
||||||
"main": "src/server/main.js",
|
"main": "src/server/main.js",
|
||||||
"repository": "AltarikMC/Launcher",
|
"repository": "AltarikMC/Launcher",
|
||||||
|
@ -7,7 +7,10 @@ html{
|
|||||||
}
|
}
|
||||||
|
|
||||||
body{
|
body{
|
||||||
background: black;
|
background-color: black;
|
||||||
|
background-image: url("../images/background.jpg");
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
margin:0;
|
margin:0;
|
||||||
height:100%;
|
height:100%;
|
||||||
font-family: "Roboto";
|
font-family: "Roboto";
|
||||||
@ -28,7 +31,9 @@ body{
|
|||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
width: 322px;
|
width: 322px;
|
||||||
height: 398px;
|
height: 398px;
|
||||||
padding: 20px 50px;
|
padding: 10px 50px;
|
||||||
|
font-family: "French-Press";
|
||||||
|
font-size: 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#media {
|
#media {
|
||||||
@ -174,19 +179,31 @@ h3 {
|
|||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selected h3 {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
#sidebar h2,
|
#sidebar h2,
|
||||||
#sidebar-content h3 {
|
#sidebar-content h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar h2 {
|
#sidebar-content {
|
||||||
margin-bottom: 10px;
|
color: rgba(56, 56, 56, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-content .selected {
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar-content {
|
#sidebar-content {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-content p {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-content hr {
|
||||||
|
margin: 0px 0px 5px 0px;
|
||||||
|
border-width:0;
|
||||||
|
border-top: 1px solid black;
|
||||||
}
|
}
|
@ -7,7 +7,10 @@ html{
|
|||||||
}
|
}
|
||||||
|
|
||||||
body{
|
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;
|
margin:0;
|
||||||
height:100%;
|
height:100%;
|
||||||
font-family: "Roboto";
|
font-family: "Roboto";
|
||||||
|
BIN
src/client/assets/images/background.jpg
Normal file
BIN
src/client/assets/images/background.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 178 KiB |
Binary file not shown.
Before Width: | Height: | Size: 74 KiB |
@ -89,12 +89,12 @@ ipcRenderer.on('launch', (e, args) => {
|
|||||||
|
|
||||||
ipcRenderer.on("modsInformations", (e, args) => {
|
ipcRenderer.on("modsInformations", (e, args) => {
|
||||||
if(args === null) {
|
if(args === null) {
|
||||||
sidebar.innerHTML = "<p>Une erreur est survenue lors de la récupération des informations, vérifiez votre connexion internet puis cliquez sur réessayez</p>"
|
sidebar.innerHTML = "<hr><p>Une erreur est survenue lors de la récupération des informations, vérifiez votre connexion internet puis cliquez sur réessayez</p>"
|
||||||
+ "<button onclick=\"demandModsInformations()\">Réessayer</button>"
|
+ "<button onclick=\"demandModsInformations()\">Réessayer</button>"
|
||||||
} else {
|
} else {
|
||||||
let element = ""
|
let element = ""
|
||||||
for(const i in args) {
|
for(const i in args) {
|
||||||
element += `<div data-chapter="${i}" onclick="changeSelectedChapter(this)"><h3>${args[i].title}</h3><p>${args[i].description}</p></div>`
|
element += `<hr><div data-chapter="${i}" onclick="changeSelectedChapter(this)"><h3>${args[i].title}</h3><p>${args[i].description}</p></div>`
|
||||||
}
|
}
|
||||||
sidebar.innerHTML = element
|
sidebar.innerHTML = element
|
||||||
}
|
}
|
||||||
@ -110,7 +110,8 @@ function changeSelectedChapter(element) {
|
|||||||
v.classList.remove("selected")
|
v.classList.remove("selected")
|
||||||
})
|
})
|
||||||
element.classList.add("selected")
|
element.classList.add("selected")
|
||||||
launchBtn.classList.remove('hidden')
|
launchText.innerHTML = "JOUER"
|
||||||
|
launchBtn.disabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnectBtn.addEventListener('click', e => {
|
disconnectBtn.addEventListener('click', e => {
|
||||||
|
@ -50,12 +50,11 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<img id="main-img" src="assets/images/maxresdefault.jpg">
|
|
||||||
<div id="account">
|
<div id="account">
|
||||||
<div id="nick"></div><!-- <img src=""> Head du joueur -->
|
<div id="nick"></div><!-- <img src=""> Head du joueur -->
|
||||||
</div>
|
</div>
|
||||||
<button id="launch-btn" class="hidden">
|
<button id="launch-btn" disabled>
|
||||||
<div id="launch-text">JOUER</div>
|
<div id="launch-text">Selectionnez un chapitre</div>
|
||||||
<div id="loading-message" class="hidden">Téléchargement de Minecraft en cours...</div>
|
<div id="loading-message" class="hidden">Téléchargement de Minecraft en cours...</div>
|
||||||
<div id="fullprogressbar" class="hidden"><div id="progressbar"></div></div>
|
<div id="fullprogressbar" class="hidden"><div id="progressbar"></div></div>
|
||||||
</button>
|
</button>
|
||||||
|
@ -90,7 +90,7 @@ ipcMain.on("login", (event, args) => {
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
logger.warn(err)
|
logger.error(err)
|
||||||
showNotification("Erreur de connexion")
|
showNotification("Erreur de connexion")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -140,6 +140,7 @@ ipcMain.on("launch", (event, args) => {
|
|||||||
})
|
})
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
showNotification("Impossible de lancer le jeu")
|
showNotification("Impossible de lancer le jeu")
|
||||||
|
event.sender.send("close", 1)
|
||||||
logger.error('Unable to launch the game')
|
logger.error('Unable to launch the game')
|
||||||
logger.error(err)
|
logger.error(err)
|
||||||
})
|
})
|
||||||
@ -166,9 +167,9 @@ function getModsInformations(event) {
|
|||||||
event.sender.send('modsInformations', extractModsFromFileSystem())
|
event.sender.send('modsInformations', extractModsFromFileSystem())
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
logger.error("Unable to connect to server")
|
logger.warn("Unable to connect to server")
|
||||||
logger.error(err)
|
logger.warn(err)
|
||||||
event.sender.send('informations', extractModsFromFileSystem())
|
event.sender.send('modsInformations', extractModsFromFileSystem())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,6 +180,7 @@ function extractModsFromFileSystem() {
|
|||||||
return extractModsInformations(JSON.parse(o.data))
|
return extractModsInformations(JSON.parse(o.data))
|
||||||
} else {
|
} else {
|
||||||
showNotification("Impossible de récupérer certaines informations en ligne", "Veuillez réessayez en cliquant sur le bouton")
|
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
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user