feat(calc): add toggle to prioritize Ingglish matches to top of query results
- Add optPrioritizeIngglish option (configurable via prioritizeIngglishMatches in config.default.js and persisted in localStorage via calcOptionsArr). - Add 'Prioritize Ingglish [...]' checkbox (chkbox_PIM / conf_PIM()) to the Options Menu and a one-click 'ING ↑' toggle button (queryIngPriorityBtn) inside the Match Results table header that re-sorts open query modals in place via refreshOpenQuery(). - Unify match sorting in calc/database.js under compareQueryMatches(a, b, searchPhrase): pins exact full or comment-stripped phrase matches first, sorts [Ingglish: ...] rows above standard entries when optPrioritizeIngglish is enabled, and preserves score ordering within each group.
This commit is contained in:
1 parent
c1e6a980e0
commit
01aee23ddc
5 files changed
+71
-14
No files matched your search
@@ -1636,6 +1636,23 @@ body {
|
||||
border: 1px solid var(--border-dark-accent);
|
||||
padding: 0em 0.35em;
|
||||
}
|
||||
.ingPriorityBtn {
|
||||
font-size: 82%;
|
||||
margin: 0.25em 0;
|
||||
padding: 0.1em 0.45em;
|
||||
cursor: pointer;
|
||||
opacity: 0.65;
|
||||
transition: opacity 0.15s ease, border-color 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
.ingPriorityBtn:hover {
|
||||
opacity: 0.95;
|
||||
}
|
||||
.ingPriorityBtn.ingPriorityOn {
|
||||
opacity: 1;
|
||||
color: var(--border-accent);
|
||||
border-color: var(--border-accent);
|
||||
font-weight: 600;
|
||||
}
|
||||
#queryMinBtn {
|
||||
position: absolute;
|
||||
width: 24px;
|
||||
|
||||
Reference in new issue
Block a user