Embed labels in filter criteria (Stash-style) to retire pill resolver
Store {id, label} objects instead of bare IDs in MultiCriterion value/excludes.
FilterSelect pills now render directly from the embedded labels — no DB round-trip
to _resolve_game/device/platform_options. The filter URL and saved presets are
self-describing. MultiCriterion.to_q() extracts ids for querying; bare ints are
still accepted for backward compatibility.
Closes #9
https://claude.ai/code/session_01EyAJcMoDktLrY9tSbdHViA
This commit is contained in:
@@ -435,10 +435,12 @@
|
||||
return;
|
||||
}
|
||||
var value = pill.getAttribute("data-value");
|
||||
var label = pill.getAttribute("data-label") || "";
|
||||
var entry = label ? {id: value, label: label} : value;
|
||||
if (pill.getAttribute("data-search-select-type") === "exclude") {
|
||||
excluded.push(value);
|
||||
excluded.push(entry);
|
||||
} else {
|
||||
included.push(value);
|
||||
included.push(entry);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user