mirror of
https://github.com/element-hq/element-web
synced 2024-11-22 09:15:41 +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 { PosthogScreenTracker } from "../../../PosthogTrackers";
|
||||||
import SearchWarning, { WarningKind } from "../elements/SearchWarning";
|
import SearchWarning, { WarningKind } from "../elements/SearchWarning";
|
||||||
import { SearchInfo, SearchScope } from "../../../Searching";
|
import { SearchInfo, SearchScope } from "../../../Searching";
|
||||||
|
import InlineSpinner from "../elements/InlineSpinner";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
searchInfo?: SearchInfo;
|
searchInfo?: SearchInfo;
|
||||||
|
@ -41,13 +42,15 @@ const RoomSearchAuxPanel: React.FC<Props> = ({ searchInfo, isRoomEncrypted, onSe
|
||||||
<div className="mx_RoomSearchAuxPanel_summary">
|
<div className="mx_RoomSearchAuxPanel_summary">
|
||||||
<SearchIcon width="24px" height="24px" />
|
<SearchIcon width="24px" height="24px" />
|
||||||
<div className="mx_RoomSearchAuxPanel_summary_text">
|
<div className="mx_RoomSearchAuxPanel_summary_text">
|
||||||
{searchInfo
|
{searchInfo?.count !== undefined ? (
|
||||||
? _t(
|
_t(
|
||||||
"room|search|summary",
|
"room|search|summary",
|
||||||
{ count: searchInfo.count ?? 0 },
|
{ count: searchInfo.count },
|
||||||
{ query: () => <b>{searchInfo.term}</b> },
|
{ query: () => <b>{searchInfo.term}</b> },
|
||||||
)
|
)
|
||||||
: undefined}
|
) : (
|
||||||
|
<InlineSpinner />
|
||||||
|
)}
|
||||||
<SearchWarning kind={WarningKind.Search} isRoomEncrypted={isRoomEncrypted} showLogo={false} />
|
<SearchWarning kind={WarningKind.Search} isRoomEncrypted={isRoomEncrypted} showLogo={false} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue