diff --git a/resources/report/css/style.css b/resources/report/css/style.css index 13ca68a1..ea2f2b13 100644 --- a/resources/report/css/style.css +++ b/resources/report/css/style.css @@ -145,7 +145,10 @@ nav a { padding: 0 0.5em; white-space:nowrap; } - +#pluginsNav li span { + display: inline-block; + width: 1.2em; +} #main { overflow: auto; flex-shrink: 10; diff --git a/resources/report/js/script.js b/resources/report/js/script.js index c8263d94..6380af7f 100644 --- a/resources/report/js/script.js +++ b/resources/report/js/script.js @@ -336,10 +336,25 @@ function processURLParams() { content = document.getElementById('pluginNav').content; clone = document.importNode(content, true); pluginsNav.appendChild(clone); - pluginsNav.lastElementChild.children[0].textContent = data.plugins[i].name; - pluginsNav.lastElementChild.children[0].href = '#' + data.plugins[i].name.replace(/\s+/g, ''); + clone = pluginsNav.lastElementChild; + clone.children[3].textContent = data.plugins[i].name; + clone.children[3].href = '#' + data.plugins[i].name.replace(/\s+/g, ''); + if (data.plugins[i].isDummy) { + clone.getElementsByClassName('dummyPlugin')[0].className += ' fa fa-file-o'; + } + + if (data.plugins[i].loadsBSA) { + clone.getElementsByClassName('loadsBSA')[0].className += ' fa fa-folder-open'; + } + + if (data.plugins[i].hasUserEdits) { + /* This won't actually be handled anything like this in the real data implementation. */ + clone.getElementsByClassName('hasUserEdits')[0].className += ' fa fa-user'; + } + + /* Now add plugin 'card'. */ content = document.getElementById('pluginSection').content; clone = document.importNode(content, true); pluginsList.appendChild(clone); @@ -368,6 +383,11 @@ function processURLParams() { showElement(section.getElementsByClassName('loadsBSA')[0]); } + if (data.plugins[i].hasUserEdits) { + /* This won't actually be handled anything like this in the real data implementation. */ + showElement(section.getElementsByClassName('hasUserEdits')[0]); + } + if (data.plugins[i].version) { section.children[2].textContent = data.plugins[i].version; } else { diff --git a/resources/report/report.html b/resources/report/report.html index 5d1620bb..a57bb349 100644 --- a/resources/report/report.html +++ b/resources/report/report.html @@ -21,7 +21,11 @@