diff --git a/res/css/_components.scss b/res/css/_components.scss index 6988c017895..d1576d6ec8e 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -143,7 +143,7 @@ @import "./views/elements/_AddressSelector.scss"; @import "./views/elements/_AddressTile.scss"; @import "./views/elements/_CopyableText.scss"; -@import "./views/elements/_DesktopBuildsNotice.scss"; +@import "./views/elements/_SearchWarning.scss"; @import "./views/elements/_DesktopCapturerSourcePicker.scss"; @import "./views/elements/_DialPadBackspaceButton.scss"; @import "./views/elements/_DirectorySearchBox.scss"; diff --git a/res/css/views/elements/_DesktopBuildsNotice.scss b/res/css/views/elements/_SearchWarning.scss similarity index 96% rename from res/css/views/elements/_DesktopBuildsNotice.scss rename to res/css/views/elements/_SearchWarning.scss index 3672595bf1e..c69cfd561b9 100644 --- a/res/css/views/elements/_DesktopBuildsNotice.scss +++ b/res/css/views/elements/_SearchWarning.scss @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -.mx_DesktopBuildsNotice { +.mx_SearchWarning { text-align: center; padding: 0 16px; diff --git a/src/components/structures/FilePanel.tsx b/src/components/structures/FilePanel.tsx index d248c6556fd..6839ad628f9 100644 --- a/src/components/structures/FilePanel.tsx +++ b/src/components/structures/FilePanel.tsx @@ -27,7 +27,7 @@ import { logger } from "matrix-js-sdk/src/logger"; import { MatrixClientPeg } from '../../MatrixClientPeg'; import EventIndexPeg from "../../indexing/EventIndexPeg"; import { _t } from '../../languageHandler'; -import DesktopBuildsNotice, { WarningKind } from "../views/elements/DesktopBuildsNotice"; +import SearchWarning, {WarningKind} from '../views/elements/SearchWarning'; import BaseCard from "../views/right_panel/BaseCard"; import ResizeNotifier from '../../utils/ResizeNotifier'; import TimelinePanel from "./TimelinePanel"; @@ -275,7 +275,7 @@ class FilePanel extends React.Component { sensor={this.card.current} onMeasurement={this.onMeasurement} /> - + - { _t("Message search initialisation failed, check your settings for more information", {}, { - a: sub => ( - { - evt.preventDefault(); - dis.dispatch({ - action: Action.ViewUserSettings, - initialTabId: UserTab.Security, - }); - }} - > - { sub } - ), - }) } - ; + return ( +
+ { _t("Message search initialisation failed, check your settings for more information", {}, { + a: sub => ( + { + evt.preventDefault(); + dis.dispatch({ + action: Action.ViewUserSettings, + initialTabId: UserTab.Security, + }); + }} + > + { sub } + ), + }) } +
+ ); } const brand = SdkConfig.get("brand"); @@ -97,7 +99,7 @@ export default function DesktopBuildsNotice({ isRoomEncrypted, kind }: IProps) { } return ( -
+
{ logo } { text }
diff --git a/src/components/views/rooms/SearchBar.tsx b/src/components/views/rooms/SearchBar.tsx index 20a9e081a0c..aadc89efb2d 100644 --- a/src/components/views/rooms/SearchBar.tsx +++ b/src/components/views/rooms/SearchBar.tsx @@ -20,10 +20,10 @@ import classNames from "classnames"; import AccessibleButton from "../elements/AccessibleButton"; import { _t } from '../../../languageHandler'; -import DesktopBuildsNotice, { WarningKind } from "../elements/DesktopBuildsNotice"; import { PosthogScreenTracker } from '../../../PosthogTrackers'; import { getKeyBindingsManager } from "../../../KeyBindingsManager"; import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts"; +import SearchWarning, { WarningKind } from "../elements/SearchWarning"; interface IProps { onCancelClick: () => void; @@ -127,7 +127,7 @@ export default class SearchBar extends React.Component {
- + ); }