Skip to content

Commit

Permalink
Merge pull request #6 from Almyria/s7
Browse files Browse the repository at this point in the history
v1.0.8 ─ vip perks (gold border on mc head)
  • Loading branch information
LeWarpy authored Oct 16, 2023
2 parents 05834ca + 1819ac8 commit fb7673b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "launcher",
"preductname": "Almyria Launcher",
"version": "1.0.7",
"version": "1.0.8",
"description": "Launcher pour le serveur AlmyriaCraft",
"main": "src/app.js",
"author": "Luuxis, LeWarpy <coucou@lewarpy.fr",
Expand Down
14 changes: 12 additions & 2 deletions src/assets/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import database from './utils/database.js';
import logger from './utils/logger.js';
import slider from './utils/slider.js';

const axios = require('axios');

export {
config as config,
database as database,
Expand Down Expand Up @@ -45,9 +47,17 @@ function accountSelect(uuid) {

if (activeAccount) activeAccount.classList.toggle('active-account');
account.classList.add('active-account');
headplayer(pseudo);
headplayer(pseudo, uuid);
}

function headplayer(pseudo) {
function headplayer(pseudo, uuid) {
document.querySelector(".player-head").style.backgroundImage = `url(https://minotar.net/helm/${pseudo}/100)`;
//Add border to the head
axios.get(`https://api.almyria.fr/minecraft/checkvip/` + uuid).then(res => {
if (res.data == true) {
document.querySelector(".player-head").style.border = "3px solid gold";
} else {
document.querySelector(".player-head").style.border = "2px solid #ffffff";
}
})
}
1 change: 0 additions & 1 deletion src/assets/js/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ let config = `${cdn}/config.json`;
let news = `${url}/launcher/news-launcher/GetNews.php`;
let launcherstatus = `${api}/launcher/status`;
let staffmembers = `${api}/users/staffmembers`;
let checkVIP = `${api}/minecraft/checkvip`;

class Config {
GetConfig() {
Expand Down

0 comments on commit fb7673b

Please sign in to comment.