diff --git a/web/root/index.css b/web/root/index.css index 8f1d3da..a609272 100644 --- a/web/root/index.css +++ b/web/root/index.css @@ -20,6 +20,10 @@ body { background-color: aliceblue; } +.selected { + background-color: cyan; +} + .simulink { cursor: pointer; text-underline: blue; diff --git a/web/root/index.js b/web/root/index.js index bc4a3e5..aa0c64d 100644 --- a/web/root/index.js +++ b/web/root/index.js @@ -48,8 +48,8 @@ const template = `
-
-

{{ modInfo.name }}

+
+

{{ modInfo.name }} mod info:

@@ -63,7 +63,12 @@ const template = ` Custom XML files:
@@ -88,6 +93,7 @@ export default { mods: [], modInfo: "", version: "Unknown", + XMLFile: "", XMLInfo: "", } }, @@ -105,10 +111,13 @@ export default { }) }, getXMLInfo(modId, file) { + for (const e of document.getElementsByClassName("selected")) e.classList.remove("selected") fetch('/mod/' + modId + '/' + file) .then(response => response.text()) .then(response => { + this.XMLFile = file this.XMLInfo = response + for (const e of document.getElementsByClassName(file)) e.classList.add("selected") }) .catch((error) => { console.error(error)