Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
luuxis committed Aug 22, 2023
1 parent f75ab51 commit 2757bdf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Selvania-Launcher",
"preductname": "Selvania Launcher",
"version": "1.3.1",
"version": "1.3.2",
"description": "Launcher Mincraft custom (crack, premium)",
"main": "src/app.js",
"author": "Luuxis",
Expand Down
9 changes: 5 additions & 4 deletions src/assets/js/panels/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,22 @@ class Settings {
let uuid = e.target.id;
let selectedaccount = await this.database.get('1234', 'accounts-selected');

if (e.path[0].classList.contains('account')) {
if (e.target.classList.contains('account')) {
console.log(uuid);
accountSelect(uuid);
this.database.update({ uuid: "1234", selected: uuid }, 'accounts-selected');
}

if (e.target.classList.contains("account-delete")) {
this.database.delete(e.path[1].id, 'accounts');
this.database.delete(e.target.parentElement.id, 'accounts');

document.querySelector('.accounts').removeChild(e.path[1])
document.querySelector('.accounts').removeChild(e.target.parentElement)
if (!document.querySelector('.accounts').children.length) {
changePanel("login");
return
}

if (e.path[1].id === selectedaccount.value.selected) {
if (uuid === selectedaccount.value.selected) {
let uuid = (await this.database.getAll('accounts'))[0].value.uuid
this.database.update({
uuid: "1234",
Expand Down

0 comments on commit 2757bdf

Please sign in to comment.