2016-02-24 17:26:34 +00:00
|
|
|
/*
|
2021-09-01 10:19:25 +01:00
|
|
|
Copyright 2016 - 2021 The Matrix.org Foundation C.I.C.
|
2016-02-24 17:26:34 +00:00
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-09-06 15:04:46 +01:00
|
|
|
import React from "react";
|
2021-10-22 17:23:32 -05:00
|
|
|
|
2017-05-25 11:39:08 +01:00
|
|
|
import { _t } from "../../../languageHandler";
|
2018-03-31 17:42:10 +02:00
|
|
|
import AccessibleButton from "../elements/AccessibleButton";
|
2018-12-03 14:55:24 +01:00
|
|
|
|
2021-08-14 10:51:08 +02:00
|
|
|
interface IProps {
|
2023-02-24 15:28:40 +00:00
|
|
|
onScrollUpClick: (e: React.MouseEvent) => void;
|
|
|
|
|
onCloseClick: (e: React.MouseEvent) => void;
|
2021-08-14 10:51:08 +02:00
|
|
|
}
|
2016-02-24 17:26:34 +00:00
|
|
|
|
2021-08-14 10:51:08 +02:00
|
|
|
export default class TopUnreadMessagesBar extends React.PureComponent<IProps> {
|
2023-02-13 17:01:43 +00:00
|
|
|
public render(): React.ReactNode {
|
2016-02-24 17:26:34 +00:00
|
|
|
return (
|
|
|
|
|
<div className="mx_TopUnreadMessagesBar">
|
2021-07-23 10:23:45 +01:00
|
|
|
<AccessibleButton
|
|
|
|
|
className="mx_TopUnreadMessagesBar_scrollUp"
|
2018-12-03 14:55:24 +01:00
|
|
|
title={_t("Jump to first unread message.")}
|
2021-07-23 10:23:45 +01:00
|
|
|
onClick={this.props.onScrollUpClick}
|
|
|
|
|
/>
|
|
|
|
|
<AccessibleButton
|
|
|
|
|
className="mx_TopUnreadMessagesBar_markAsRead"
|
2020-03-02 13:59:14 -06:00
|
|
|
title={_t("Mark all as read")}
|
2021-07-23 10:23:45 +01:00
|
|
|
onClick={this.props.onCloseClick}
|
|
|
|
|
/>
|
2016-02-24 17:26:34 +00:00
|
|
|
</div>
|
|
|
|
|
);
|
2020-08-29 12:14:16 +01:00
|
|
|
}
|
|
|
|
|
}
|