Compare commits

..

No commits in common. "697978420e612383741b5613534a55decbdbb27f" and "25faf8b0e1abaa0ec3105de7e29446710e2b4a77" have entirely different histories.

View File

@ -212,24 +212,19 @@ function buildData(table, images, data, sort, filter, exact_match) {
data = filterData(data); data = filterData(data);
} }
if (filter) { if (filter) {
let test = "", channel = ""; if (exact_match) {
const args = filter.split(" "); data = data.filter((d) => {
if (args.length > 1) { const test = d.test === filter;
test = args[0]; const channel = d.channel === filter;
channel = args[1] return test || channel;
});
} else { } else {
test = filter; data = data.filter((d) => {
channel = filter; const test = d.test.includes(filter);
const channel = d.channel.includes(filter);
return test || channel;
});
} }
data = data.filter((d) => {
const test_result = exact_match ? d.test === test : d.test.includes(test);
const channel_result = exact_match ? d.channel === channel : d.channel.includes(channel);
if (args.length > 1) {
return test_result && channel_result;
} else {
return test_result || channel_result;
}
});
} }
table.replaceChildren(...buildTestResultsTable(data)); table.replaceChildren(...buildTestResultsTable(data));
@ -565,7 +560,7 @@ window.onload = () => {
Tag("div", {"class": "panel", "id": "table"}, null, [ Tag("div", {"class": "panel", "id": "table"}, null, [
Tag("h2", null, "List of things that are not perfect"), Tag("h2", null, "List of things that are not perfect"),
Tag("label", {"class": "filter sticky"}, "Filter", [ Tag("label", {"class": "filter sticky"}, "Filter", [
filter = Tag("input", {"type": "input", "title": "Hotkey: ALT+F", "name": "filter", "value": filter_value}, null, null, "input", (e) => { filter = Tag("input", {"type": "input", "name": "filter", "value": filter_value}, null, null, "input", (e) => {
saveToLocalStorage("rendertest_filter", e.target.value); saveToLocalStorage("rendertest_filter", e.target.value);
buildDataSlowMode(table, images, data, tableSort, e.target.value, exactmatch_input.checked); buildDataSlowMode(table, images, data, tableSort, e.target.value, exactmatch_input.checked);
}), }),
@ -671,16 +666,6 @@ window.onload = () => {
} }
} }
}); });
document.addEventListener("keydown", function(event) {
if (event.altKey) {
if (event.key === 'f') {
event.preventDefault();
filter.focus();
}
}
});
} }