mirror of
https://github.com/element-hq/element-web
synced 2024-11-22 01:05:42 +03:00
Show spinner whilst initial search request is in progress (#12883)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
239330b5e2
commit
0e37c09042
1 changed files with 10 additions and 7 deletions
|
@ -23,6 +23,7 @@ import { _t } from "../../../languageHandler";
|
|||
import { PosthogScreenTracker } from "../../../PosthogTrackers";
|
||||
import SearchWarning, { WarningKind } from "../elements/SearchWarning";
|
||||
import { SearchInfo, SearchScope } from "../../../Searching";
|
||||
import InlineSpinner from "../elements/InlineSpinner";
|
||||
|
||||
interface Props {
|
||||
searchInfo?: SearchInfo;
|
||||
|
@ -41,13 +42,15 @@ const RoomSearchAuxPanel: React.FC<Props> = ({ searchInfo, isRoomEncrypted, onSe
|
|||
<div className="mx_RoomSearchAuxPanel_summary">
|
||||
<SearchIcon width="24px" height="24px" />
|
||||
<div className="mx_RoomSearchAuxPanel_summary_text">
|
||||
{searchInfo
|
||||
? _t(
|
||||
{searchInfo?.count !== undefined ? (
|
||||
_t(
|
||||
"room|search|summary",
|
||||
{ count: searchInfo.count ?? 0 },
|
||||
{ count: searchInfo.count },
|
||||
{ query: () => <b>{searchInfo.term}</b> },
|
||||
)
|
||||
: undefined}
|
||||
) : (
|
||||
<InlineSpinner />
|
||||
)}
|
||||
<SearchWarning kind={WarningKind.Search} isRoomEncrypted={isRoomEncrypted} showLogo={false} />
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue