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(" ");
if (args.length > 1) {
test = args[0];
channel = args[1]
} else {
test = filter;
channel = filter;
}
data = data.filter((d) => { data = data.filter((d) => {
const test_result = exact_match ? d.test === test : d.test.includes(test); const test = d.test === filter;
const channel_result = exact_match ? d.channel === channel : d.channel.includes(channel); const channel = d.channel === filter;
if (args.length > 1) { return test || channel;
return test_result && channel_result;
} else {
return test_result || channel_result;
}
}); });
} else {
data = data.filter((d) => {
const test = d.test.includes(filter);
const channel = d.channel.includes(filter);
return test || channel;
});
}
} }
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();
}
}
});
} }