Skip to content

Commit

Permalink
Update 2.0.1 build 1001
Browse files Browse the repository at this point in the history
  • Loading branch information
1ly4s0 committed Jul 30, 2024
1 parent 0680c87 commit 61739fe
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "BattlyLauncher",
"productname": "Battly Launcher",
"version": "2.0.0",
"version": "2.0.1",
"buildVersion": "1000",
"description": "El mejor Launcher Personalizado para Minecraft Premium y No premium",
"main": "src/app.js",
Expand Down
8 changes: 6 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,9 +608,13 @@ ipcMain.handle("update-app", () => {
});

const pkgVersion = async () => {
let data = await fs.readFileSync("package.json");
return JSON.parse(data);
const pkg = {
version: "2.0.1",
buildVersion: 1001
};
return JSON.parse(pkg);
};

ipcMain.handle("update-new-app", async () => {
console.log(await pkgVersion());

Expand Down
1 change: 1 addition & 0 deletions src/assets/js/panels/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -3836,6 +3836,7 @@ class Home {

let seMostroExtrayendo_core = false;
let seMostroInstalando_core = false;
let seMostroInstalando = false;

launch_core.on("extract", (extract) => {
consoleOutput_ += `[EXTRACT] ${extract}\n`;
Expand Down
8 changes: 6 additions & 2 deletions src/assets/js/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ const pipeline = util.promisify(stream.pipeline);
let lang;

const pkgVersion = async () => {
const pkg = await fs.promises.readFile("package.json");
return JSON.parse(pkg);
const pkg = {
version: "2.0.1",
buildVersion: 1001
};
return pkg;
};

class Splash {
Expand Down Expand Up @@ -118,6 +121,7 @@ class Splash {
this.updateProgress(progress);

if (extractedFiles === totalFiles) {
await fs.unlinkSync(zipPath);
this.log('¡Actualización completada! Reiniciando...');
setTimeout(() => {
ipcRenderer.send("restartLauncher");
Expand Down
20 changes: 10 additions & 10 deletions src/assets/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function changePanel(id) {
const preloadContent = document.querySelector('.preload-content');
document.getElementById("loading-text").innerHTML = "Cargando";

preloadContent.style.display = "block"; // Muestra el contenido de carga
preloadContent.style.display = "block";

setTimeout(() => {
rectangulos.forEach((rectangulo, index) => {
Expand All @@ -55,15 +55,15 @@ function changePanel(id) {

document.getElementById("loading-text").innerHTML = "";
}, 10);


setTimeout(() => {
let active = document.querySelector('.active');
if (active) active.classList.toggle('active');
let panel = document.querySelector(`.${id}`);
panel.classList.add('active');
}, 500);

setTimeout(() => {
document.getElementById("loading-text").innerHTML = "Listo";
rectangulos.forEach((rectangulo, index) => {
Expand All @@ -73,7 +73,7 @@ function changePanel(id) {
});

document.getElementById("loading-text").innerHTML = "";

setTimeout(() => {
preloadContent.style.display = "none";
}, 500);
Expand Down Expand Up @@ -112,18 +112,18 @@ function accountSelect(uuid) {
if (activeAccount) activeAccount.classList.toggle('active-account');
account.classList.add('active-account');



new Alert().ShowAlert({
icon: 'success',
title: lang.account_selected,
text: `${lang.account_selected_text} ${account.querySelector('.account-name').innerHTML} ${lang.account_selected_text_two}`
});


if (account.querySelector('.account-name').innerHTML.includes('fa-solid fa-fire')) {
document.getElementById("ads").style.display = "none";
document.getElementById("ads-text").style.display = "none";
// document.getElementById("ads-text").style.display = "none";
console.log('Es premium');
let WelcomePremiumShown = localStorage.getItem('WelcomePremiumShown');
if (!WelcomePremiumShown || WelcomePremiumShown === 'false' || WelcomePremiumShown === null || WelcomePremiumShown === undefined) {
Expand Down Expand Up @@ -152,7 +152,7 @@ function accountSelect(uuid) {
const closeButton = document.createElement('button');
closeButton.classList.add('delete');
closeButton.setAttribute('aria-label', 'close');

closeButton.addEventListener('click', () => {
modal.classList.remove('is-active');
localStorage.setItem('WelcomePremiumShown', true);
Expand Down Expand Up @@ -209,7 +209,7 @@ function accountSelect(uuid) {
const acceptButton = document.createElement('button');
acceptButton.classList.add('button', 'is-info');
acceptButton.textContent = 'Aceptar';

acceptButton.addEventListener('click', () => {
modal.classList.remove('is-active');
localStorage.setItem('WelcomePremiumShown', true);
Expand Down
2 changes: 1 addition & 1 deletion src/launcher.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
</style>
<div class="dragbar"></div>
<div class="frame">
<div class="titulo" style="font-weight: 800">Battly Launcher 2.0.0<span
<div class="titulo" style="font-weight: 800">Battly Launcher 2.0.1<span
style="font-size: 10px; margin-left: 5px">build
1000</span></div>
<div class="buttons">
Expand Down

0 comments on commit 61739fe

Please sign in to comment.