Allow theming room header buttons
This commit is contained in:
parent
c00495304f
commit
8652a094f3
5 changed files with 48 additions and 20 deletions
|
@ -58,7 +58,6 @@ limitations under the License.
|
|||
|
||||
.mx_RoomHeader_buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: $primary-bg-color;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
@ -116,10 +115,6 @@ limitations under the License.
|
|||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.mx_RoomHeader_settingsButton object {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.mx_RoomHeader_name,
|
||||
.mx_RoomHeader_avatar,
|
||||
.mx_RoomHeader_avatarPicker,
|
||||
|
@ -199,10 +194,32 @@ limitations under the License.
|
|||
.mx_RoomHeader_button {
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
background-color: $roomheader-button-color;
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: contain;
|
||||
}
|
||||
|
||||
.mx_RoomHeader_button object {
|
||||
pointer-events: none;
|
||||
.mx_RoomHeader_settingsButton {
|
||||
mask-image: url('$(res)/img/feather-icons/settings.svg');
|
||||
}
|
||||
|
||||
.mx_RoomHeader_forgetButton {
|
||||
mask-image: url('$(res)/img/leave.svg');
|
||||
width: 26px;
|
||||
}
|
||||
|
||||
.mx_RoomHeader_searchButton {
|
||||
mask-image: url('$(res)/img/feather-icons/search.svg');
|
||||
}
|
||||
|
||||
.mx_RoomHeader_shareButton {
|
||||
mask-image: url('$(res)/img/feather-icons/share.svg');
|
||||
}
|
||||
|
||||
.mx_RoomHeader_manageIntegsButton {
|
||||
mask-image: url('$(res)/img/feather-icons/grid.svg');
|
||||
}
|
||||
|
||||
.mx_RoomHeader_showPanel {
|
||||
|
@ -219,6 +236,7 @@ limitations under the License.
|
|||
|
||||
.mx_RoomHeader_pinnedButton {
|
||||
position: relative;
|
||||
mask-image: url('$(res)/img/icons-pin.svg');
|
||||
}
|
||||
|
||||
.mx_RoomHeader_pinsIndicator {
|
||||
|
|
|
@ -76,6 +76,7 @@ $topleftmenu-color: $text-primary-color;
|
|||
$roomheader-color: $text-primary-color;
|
||||
$roomheader-addroom-color: $header-panel-text-primary-color;
|
||||
$tagpanel-button-color: $header-panel-text-primary-color;
|
||||
$roomheader-button-color: $header-panel-text-primary-color;
|
||||
$roomtopic-color: $text-secondary-color;
|
||||
$eventtile-meta-color: $roomtopic-color;
|
||||
|
||||
|
|
|
@ -146,6 +146,7 @@ $topleftmenu-color: #212121;
|
|||
$roomheader-color: #45474a;
|
||||
$roomheader-addroom-color: #91A1C0;
|
||||
$tagpanel-button-color: #91A1C0;
|
||||
$roomheader-button-color: #91A1C0;
|
||||
$roomtopic-color: #9fa9ba;
|
||||
$eventtile-meta-color: $roomtopic-color;
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ import ScalarMessaging from '../../../ScalarMessaging';
|
|||
import Modal from "../../../Modal";
|
||||
import { _t } from '../../../languageHandler';
|
||||
import AccessibleButton from './AccessibleButton';
|
||||
import TintableSvg from './TintableSvg';
|
||||
|
||||
export default class ManageIntegsButton extends React.Component {
|
||||
constructor(props) {
|
||||
|
@ -76,6 +75,7 @@ export default class ManageIntegsButton extends React.Component {
|
|||
if (this.scalarClient !== null) {
|
||||
const integrationsButtonClasses = classNames({
|
||||
mx_RoomHeader_button: true,
|
||||
mx_RoomHeader_manageIntegsButton: true,
|
||||
mx_ManageIntegsButton_error: !!this.state.scalarError,
|
||||
});
|
||||
|
||||
|
@ -94,8 +94,10 @@ export default class ManageIntegsButton extends React.Component {
|
|||
}
|
||||
|
||||
integrationsButton = (
|
||||
<AccessibleButton className={integrationsButtonClasses} onClick={this.onManageIntegrations} title={_t('Manage Integrations')}>
|
||||
<TintableSvg src={require("../../../../res/img/feather-icons/grid.svg")} width="20" height="20" />
|
||||
<AccessibleButton className={integrationsButtonClasses}
|
||||
onClick={this.onManageIntegrations}
|
||||
title={_t('Manage Integrations')}
|
||||
>
|
||||
{ integrationsWarningTriangle }
|
||||
{ integrationsErrorPopup }
|
||||
</AccessibleButton>
|
||||
|
|
|
@ -154,7 +154,6 @@ module.exports = React.createClass({
|
|||
|
||||
render: function() {
|
||||
const RoomAvatar = sdk.getComponent("avatars.RoomAvatar");
|
||||
const TintableSvg = sdk.getComponent("elements.TintableSvg");
|
||||
const EmojiText = sdk.getComponent('elements.EmojiText');
|
||||
|
||||
let searchStatus = null;
|
||||
|
@ -228,8 +227,10 @@ module.exports = React.createClass({
|
|||
|
||||
if (this.props.onSettingsClick) {
|
||||
settingsButton =
|
||||
<AccessibleButton className="mx_RoomHeader_button" onClick={this.props.onSettingsClick} title={_t("Settings")}>
|
||||
<TintableSvg src={require("../../../../res/img/feather-icons/settings.svg")} width="20" height="20" />
|
||||
<AccessibleButton className="mx_RoomHeader_button mx_RoomHeader_settingsButton"
|
||||
onClick={this.props.onSettingsClick}
|
||||
title={_t("Settings")}
|
||||
>
|
||||
</AccessibleButton>;
|
||||
}
|
||||
|
||||
|
@ -245,7 +246,6 @@ module.exports = React.createClass({
|
|||
<AccessibleButton className="mx_RoomHeader_button mx_RoomHeader_pinnedButton"
|
||||
onClick={this.props.onPinnedClick} title={_t("Pinned Messages")}>
|
||||
{ pinsIndicator }
|
||||
<TintableSvg src={require("../../../../res/img/icons-pin.svg")} width="16" height="16" />
|
||||
</AccessibleButton>;
|
||||
}
|
||||
|
||||
|
@ -260,24 +260,30 @@ module.exports = React.createClass({
|
|||
let forgetButton;
|
||||
if (this.props.onForgetClick) {
|
||||
forgetButton =
|
||||
<AccessibleButton className="mx_RoomHeader_button" onClick={this.props.onForgetClick} title={_t("Forget room")}>
|
||||
<TintableSvg src={require("../../../../res/img/leave.svg")} width="26" height="20" />
|
||||
<AccessibleButton className="mx_RoomHeader_button mx_RoomHeader_forgetButton"
|
||||
onClick={this.props.onForgetClick}
|
||||
title={_t("Forget room")}
|
||||
>
|
||||
</AccessibleButton>;
|
||||
}
|
||||
|
||||
let searchButton;
|
||||
if (this.props.onSearchClick && this.props.inRoom) {
|
||||
searchButton =
|
||||
<AccessibleButton className="mx_RoomHeader_button" onClick={this.props.onSearchClick} title={_t("Search")}>
|
||||
<TintableSvg src={require("../../../../res/img/feather-icons/search.svg")} width="20" height="20" />
|
||||
<AccessibleButton className="mx_RoomHeader_button mx_RoomHeader_searchButton"
|
||||
onClick={this.props.onSearchClick}
|
||||
title={_t("Search")}
|
||||
>
|
||||
</AccessibleButton>;
|
||||
}
|
||||
|
||||
let shareRoomButton;
|
||||
if (this.props.inRoom) {
|
||||
shareRoomButton =
|
||||
<AccessibleButton className="mx_RoomHeader_button" onClick={this.onShareRoomClick} title={_t('Share room')}>
|
||||
<TintableSvg src={require("../../../../res/img/feather-icons/share.svg")} width="20" height="20" />
|
||||
<AccessibleButton className="mx_RoomHeader_button mx_RoomHeader_shareButton"
|
||||
onClick={this.onShareRoomClick}
|
||||
title={_t('Share room')}
|
||||
>
|
||||
</AccessibleButton>;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue