diff --git a/resources/report/bower.json b/resources/report/bower.json index 42792a13..e2837e5e 100644 --- a/resources/report/bower.json +++ b/resources/report/bower.json @@ -28,6 +28,7 @@ "paper-menu-button": "Polymer/paper-menu-button#~0.5.0", "Jed": "SlexAxton/Jed#a9d03e1bbca9211a8b29a93a298a7ee9ddb353f0", "marked": "chjj/marked#~0.3.2", - "requirejs": "jrburke/requirejs-bower#~2.1.15" + "requirejs": "jrburke/requirejs-bower#~2.1.15", + "paper-progress": "Polymer/paper-progress#~0.5.0" } } diff --git a/resources/report/css/style.css b/resources/report/css/style.css index fe2c50bd..80d83e8f 100644 --- a/resources/report/css/style.css +++ b/resources/report/css/style.css @@ -261,27 +261,8 @@ progress, .progress { display: block; margin: 0 auto; } -#progressDialog > h1 { - font-size: 1.5em; -} - -@-webkit-keyframes indeterminate { - 0% { width: 0% } - 100% { width: 100% } -} - -progress::-webkit-progress-bar, .progress.bar { - background-color: #eee; - border-radius: 2px; - box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) inset; -} -progress::-webkit-progress-value, .progress .value { - height: 100%; - background-color: green; - -webkit-animation: indeterminate 2s linear 0 infinite alternate paused; -} -.progress.running > .value { - -webkit-animation-play-state: running; +#progressDialog > paper-progress { + width: 100%; } :host > span { diff --git a/resources/report/js/plugin.js b/resources/report/js/plugin.js index afc69798..dcb391bd 100644 --- a/resources/report/js/plugin.js +++ b/resources/report/js/plugin.js @@ -133,21 +133,20 @@ function Plugin(obj) { } Plugin.prototype.createCard = function() { - var card = document.createElement('loot-plugin-card'); - this.card = card; + this.card = document.createElement('loot-plugin-card'); - card.id = this.id; + this.card.id = this.id; - card.setAttribute('data-active', this.isActive); - card.setAttribute('data-dummy', this.isDummy); - card.setAttribute('data-bsa', this.loadsBSA); - card.setAttribute('data-edits', this.userlist != undefined); + this.card.setAttribute('data-active', this.isActive); + this.card.setAttribute('data-dummy', this.isDummy); + this.card.setAttribute('data-bsa', this.loadsBSA); + this.card.setAttribute('data-edits', this.userlist != undefined); /* Fill in name, version, CRC. */ - card.getElementsByTagName('h1')[0].textContent = this.name; - card.getElementsByClassName('version')[0].textContent = this.version; + this.card.getElementsByTagName('h1')[0].textContent = this.name; + this.card.getElementsByClassName('version')[0].textContent = this.version; if (this.crc != 0) { - card.getElementsByClassName('crc')[0].textContent = this.crc.toString(16).toUpperCase(); + this.card.getElementsByClassName('crc')[0].textContent = this.crc.toString(16).toUpperCase(); } /* Fill in Bash Tag suggestions. */ @@ -156,23 +155,22 @@ function Plugin(obj) { /* Fill in messages. */ this.updateCardMessages(); - document.getElementById('main').appendChild(card); + document.getElementById('main').appendChild(this.card); } Plugin.prototype.createListItem = function() { - var li = document.createElement('loot-plugin-item'); - this.li = li; + this.li = document.createElement('loot-plugin-item'); - li.label = this.name; - li.setLink('#' + this.id); - li.setPriority(this.getPriorityString()); + this.li.label = this.name; + this.li.setLink('#' + this.id); + this.li.setPriority(this.getPriorityString()); - li.setAttribute('data-dummy', this.isDummy); - li.setAttribute('data-bsa', this.loadsBSA); - li.setAttribute('data-edits', this.userlist != undefined); - li.setAttribute('data-global-priority', this.isGlobalPriority); + this.li.setAttribute('data-dummy', this.isDummy); + this.li.setAttribute('data-bsa', this.loadsBSA); + this.li.setAttribute('data-edits', this.userlist != undefined); + this.li.setAttribute('data-global-priority', this.isGlobalPriority); - document.getElementById('cardsNav').appendChild(li); + document.getElementById('cardsNav').appendChild(this.li); } Plugin.prototype.observer = function(changes) { diff --git a/resources/report/js/script.js b/resources/report/js/script.js index aacbe53b..76c4ef0c 100644 --- a/resources/report/js/script.js +++ b/resources/report/js/script.js @@ -684,18 +684,16 @@ function sortUIElements(pluginNames) { function showProgress(message) { var progressDialog = document.getElementById('progressDialog'); if (message) { - progressDialog.getElementsByTagName('h1')[0].textContent = message; + progressDialog.getElementsByTagName('p')[0].textContent = message; } if (!progressDialog.opened) { progressDialog.showModal(); - progressDialog.querySelector('.progress').classList.toggle('running'); } } function closeProgressDialog() { var progressDialog = document.getElementById('progressDialog'); if (progressDialog.opened) { progressDialog.close(); - progressDialog.querySelector('.progress').classList.toggle('running'); } } function sortPlugins(evt) { @@ -1340,16 +1338,11 @@ function initVars() { }); } else { promise = loot.query('getGameData').then(function(result){ - try { - var game = JSON.parse(result, jsonToPlugin); - loot.game.folder = game.folder; - loot.game.masterlist = game.masterlist; - loot.game.globalMessages = game.globalMessages; - loot.game.plugins = game.plugins; - } catch (e) { - console.log(e); - console.log('getGameData response: ' + result); - } + var game = JSON.parse(result, jsonToPlugin); + loot.game.folder = game.folder; + loot.game.masterlist = game.masterlist; + loot.game.globalMessages = game.globalMessages; + loot.game.plugins = game.plugins; applySavedFilters(); closeProgressDialog(); diff --git a/resources/report/report.html b/resources/report/report.html index 46e2c45c..830db5a2 100644 --- a/resources/report/report.html +++ b/resources/report/report.html @@ -33,6 +33,7 @@ + @@ -234,13 +235,8 @@ along with LOOT. If not, see <http://www.gnu.org/licenses/>.
Calculating the last digit of π...