mirror of
https://github.com/baairon/torlink.git
synced 2026-07-08 18:28:22 +02:00
fix: show sort param during search phase
Keep the active sort note on the status line while results stream in, so it no longer disappears mid-search and snaps back only once sources finish.
This commit is contained in:
@@ -250,10 +250,12 @@ export function Results() {
|
|||||||
return codes.length ? ` (${codes.join(", ")})` : "";
|
return codes.length ? ` (${codes.join(", ")})` : "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const sortNote = sort === "none" ? "" : ` ${ICON.dot} sort: ${sortLabel(sort)}`;
|
||||||
|
|
||||||
const status = () => {
|
const status = () => {
|
||||||
if (search.loading) {
|
if (search.loading) {
|
||||||
if (results.length > 0)
|
if (results.length > 0)
|
||||||
return <Text dimColor>{`searching… ${search.done}/${search.total} sources`}</Text>;
|
return <Text dimColor>{`searching… ${search.done}/${search.total} sources${sortNote}`}</Text>;
|
||||||
return (
|
return (
|
||||||
<Spinner label={`${browsing ? "Loading" : "Searching"} ${search.done}/${search.total} sources`} />
|
<Spinner label={`${browsing ? "Loading" : "Searching"} ${search.done}/${search.total} sources`} />
|
||||||
);
|
);
|
||||||
@@ -288,7 +290,6 @@ export function Results() {
|
|||||||
const head = browsing
|
const head = browsing
|
||||||
? "newest across all sources"
|
? "newest across all sources"
|
||||||
: `${results.length} result${results.length === 1 ? "" : "s"}`;
|
: `${results.length} result${results.length === 1 ? "" : "s"}`;
|
||||||
const sortNote = sort === "none" ? "" : ` ${ICON.dot} sort: ${sortLabel(sort)}`;
|
|
||||||
return <Text dimColor>{`${head}${note}${sortNote}`}</Text>;
|
return <Text dimColor>{`${head}${note}${sortNote}`}</Text>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user