diff options
author | 0neGal <mail@0negal.com> | 2023-07-21 23:22:44 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2023-07-21 23:26:14 +0200 |
commit | b08e4d193a2c6dea82a6f00432203cfad097e708 (patch) | |
tree | 07ef1bf47d71acdabc0e923d81e3c57eb0b0868e /src/app/js/mods.js | |
parent | 928333b53e07809bef1897813a4f6588f37c677c (diff) | |
download | Viper-b08e4d193a2c6dea82a6f00432203cfad097e708.tar.gz Viper-b08e4d193a2c6dea82a6f00432203cfad097e708.zip |
rename mods.list() properties to use snake case
I may or may not have missed some properties or something somewhere,
perhaps we'll see if something ends up broken in the future...
Diffstat (limited to 'src/app/js/mods.js')
-rw-r--r-- | src/app/js/mods.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/app/js/mods.js b/src/app/js/mods.js index d4e8043..af430e5 100644 --- a/src/app/js/mods.js +++ b/src/app/js/mods.js @@ -6,13 +6,13 @@ mods.load = (mods_obj) => { let normalized_names = []; let set_mod = (mod) => { - let normalized_name = "mod-list-" + normalize(mod.Name); + let normalized_name = "mod-list-" + normalize(mod.name); normalized_names.push(normalized_name); let el = document.getElementById(normalized_name); if (el) { - if (mod.Disabled) { + if (mod.disabled) { el.querySelector(".switch").classList.remove("on"); } else { el.querySelector(".switch").classList.add("on"); @@ -31,30 +31,30 @@ mods.load = (mods_obj) => { <img class="blur" src=""> </div> <div class="text"> - <div class="title">${mod.Name}</div> - <div class="description">${mod.Description}</div> + <div class="title">${mod.name}</div> + <div class="description">${mod.description}</div> <button class="switch on orange"></button> <button class="update bg-blue"> ${lang("gui.browser.update")} </button> - <button class="bg-red" onclick="mods.remove('${mod.Name}')"> + <button class="bg-red" onclick="mods.remove('${mod.name}')"> ${lang("gui.mods.remove")} </button> - <button class="visual">${version.format(mod.Version)}</button> + <button class="visual">${version.format(mod.version)}</button> <button class="visual"> ${lang("gui.browser.madeby")} - ${mod.Author || lang("gui.mods.unknown_author")} + ${mod.author || lang("gui.mods.unknown_author")} </button> </div> `; - if (mod.Disabled) { + if (mod.disabled) { div.querySelector(".switch").classList.remove("on"); } div.querySelector(".switch").addEventListener("click", () => { - mods.toggle(mod.Name); + mods.toggle(mod.name); }) div.querySelector(".image").style.display = "none"; |