diff --git a/resources/report/html/loot-plugin-card.html b/resources/report/html/loot-plugin-card.html index 51302bef..6ae447c1 100644 --- a/resources/report/html/loot-plugin-card.html +++ b/resources/report/html/loot-plugin-card.html @@ -60,6 +60,10 @@ loot-clear-metadata :host(:not([data-edits])) #hasUserEdits { display: none; } + :host(.search-result) #front, + :host(.search-result) #editor { + box-shadow: inset 4px 0 #3F51B5; + } #front { display: block; transform: translateZ(1px); @@ -219,6 +223,7 @@ loot-clear-metadata 'data.tags': 'onTagsChange', 'data.computed.messages': 'onMessagesChange', 'data.userlist': 'onUserlistChange', + 'data.isSearchResult' : 'onSearchResultChange', 'data.isMenuOpen': 'onMenuToggle' }, @@ -261,6 +266,9 @@ loot-clear-metadata /* Also set highlight if the conflict filter is active. */ this.classList.toggle('highlight', newValue.isConflictFilterChecked); + /* Set highlight if the plugin is a search result. */ + this.onSearchResultChange(oldValue.isSearchResult, newValue.isSearchResult); + /* Update tooltip positions. */ var tooltips = this.shadowRoot.querySelectorAll('core-tooltip'); for (var i = 0; i < tooltips.length; ++i) { @@ -301,6 +309,10 @@ loot-clear-metadata } }, + onSearchResultChange: function(oldValue, newValue) { + this.classList.toggle('search-result', newValue); + }, + onMenuToggle: function(oldValue, newValue) { if (newValue) { this.style.marginBottom = '190px'; diff --git a/resources/report/html/loot-plugin-editor.html b/resources/report/html/loot-plugin-editor.html index 58220a54..7cb5073e 100644 --- a/resources/report/html/loot-plugin-editor.html +++ b/resources/report/html/loot-plugin-editor.html @@ -91,8 +91,11 @@ loot-editor-close } /* Misc Styling. */ - core-toolbar.medium-tall { + :host { background: #CFD4E9; + } + core-toolbar.medium-tall { + background: transparent; height: 104px; } core-toolbar > div { @@ -105,8 +108,9 @@ loot-editor-close vertical-align: inherit !important; } core-selector > * { - border: 4px solid #CFD4E9; - border-top: none; + border-bottom: 4px solid #CFD4E9; + background: white; + margin: 0 4px 4px 4px; } #main { padding: 16px; diff --git a/resources/report/html/loot-search.html b/resources/report/html/loot-search.html index 5420bf56..a008c3d9 100644 --- a/resources/report/html/loot-search.html +++ b/resources/report/html/loot-search.html @@ -89,6 +89,9 @@ searchTarget is the ID of the core-list element to search the elements of. }, resetResults: function() { + loot.game.plugins.forEach(function(plugin){ + plugin.isSearchResult = false; + }); this.results = []; this.currentResult = -1; this.shadowRoot.getElementById('prev').setAttribute('disabled', ''); @@ -137,6 +140,7 @@ searchTarget is the ID of the core-list element to search the elements of. || (!crcHidden && plugin.getCrcString().toLowerCase().indexOf(needle) != -1)) { host.results.push(index); + plugin.isSearchResult = true; return; } @@ -146,6 +150,7 @@ searchTarget is the ID of the core-list element to search the elements of. || tags.removed.toLowerCase().indexOf(needle) != -1) { host.results.push(index); + plugin.isSearchResult = true; return; } } @@ -153,6 +158,7 @@ searchTarget is the ID of the core-list element to search the elements of. for (var i = 0; i < plugin.computed.messages.length; ++i) { if (plugin.computed.messages[i].textContent.toLowerCase().indexOf(needle) != -1) { host.results.push(index); + plugin.isSearchResult = true; return; } } diff --git a/resources/report/js/plugin.js b/resources/report/js/plugin.js index f568a4db..2f44a4ac 100644 --- a/resources/report/js/plugin.js +++ b/resources/report/js/plugin.js @@ -45,6 +45,7 @@ function Plugin(obj) { this.isMenuOpen = false; this.isEditorOpen = false; this.isConflictFilterChecked = false; + this.isSearchResult = false; /* Converts between the LOOT metadata object for tags, and their editor row representation. */