Compare commits
No commits in common. "697978420e612383741b5613534a55decbdbb27f" and "25faf8b0e1abaa0ec3105de7e29446710e2b4a77" have entirely different histories.
697978420e
...
25faf8b0e1
@ -212,24 +212,19 @@ function buildData(table, images, data, sort, filter, exact_match) {
|
||||
data = filterData(data);
|
||||
}
|
||||
if (filter) {
|
||||
let test = "", channel = "";
|
||||
const args = filter.split(" ");
|
||||
if (args.length > 1) {
|
||||
test = args[0];
|
||||
channel = args[1]
|
||||
if (exact_match) {
|
||||
data = data.filter((d) => {
|
||||
const test = d.test === filter;
|
||||
const channel = d.channel === filter;
|
||||
return test || channel;
|
||||
});
|
||||
} else {
|
||||
test = filter;
|
||||
channel = filter;
|
||||
data = data.filter((d) => {
|
||||
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));
|
||||
@ -565,7 +560,7 @@ window.onload = () => {
|
||||
Tag("div", {"class": "panel", "id": "table"}, null, [
|
||||
Tag("h2", null, "List of things that are not perfect"),
|
||||
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);
|
||||
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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user