Batch of views getting replaceableComponent decorators

This commit is contained in:
Travis Ralston 2021-03-08 20:12:00 -07:00
parent fc5b1ed9d6
commit c5935dbc61
46 changed files with 92 additions and 3 deletions

View file

@ -26,6 +26,7 @@ import {RightPanelPhases} from "../../../stores/RightPanelStorePhases";
import {Action} from "../../../dispatcher/actions";
import {ActionPayload} from "../../../dispatcher/payloads";
import {ViewUserPayload} from "../../../dispatcher/payloads/ViewUserPayload";
import {replaceableComponent} from "../../../utils/replaceableComponent";
const GROUP_PHASES = [
RightPanelPhases.GroupMemberInfo,
@ -38,6 +39,7 @@ const ROOM_PHASES = [
interface IProps {}
@replaceableComponent("views.right_panel.GroupHeaderButtons")
export default class GroupHeaderButtons extends HeaderButtons {
constructor(props: IProps) {
super(props, HeaderKind.Group);

View file

@ -22,6 +22,7 @@ import React from 'react';
import classNames from 'classnames';
import Analytics from '../../../Analytics';
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
import {replaceableComponent} from "../../../utils/replaceableComponent";
interface IProps {
// Whether this button is highlighted
@ -41,6 +42,7 @@ interface IProps {
// TODO: replace this, the composer buttons and the right panel buttons with a unified
// representation
@replaceableComponent("views.right_panel.HeaderButton")
export default class HeaderButton extends React.Component<IProps> {
constructor(props: IProps) {
super(props);

View file

@ -28,6 +28,7 @@ import {
SetRightPanelPhaseRefireParams,
} from '../../../dispatcher/payloads/SetRightPanelPhasePayload';
import {EventSubscription} from "fbemitter";
import {replaceableComponent} from "../../../utils/replaceableComponent";
export enum HeaderKind {
Room = "room",
@ -41,6 +42,7 @@ interface IState {
interface IProps {}
@replaceableComponent("views.right_panel.HeaderButtons")
export default abstract class HeaderButtons extends React.Component<IProps, IState> {
private storeToken: EventSubscription;
private dispatcherRef: string;

View file

@ -26,6 +26,7 @@ import {RightPanelPhases} from "../../../stores/RightPanelStorePhases";
import {Action} from "../../../dispatcher/actions";
import {ActionPayload} from "../../../dispatcher/payloads";
import RightPanelStore from "../../../stores/RightPanelStore";
import {replaceableComponent} from "../../../utils/replaceableComponent";
const ROOM_INFO_PHASES = [
RightPanelPhases.RoomSummary,
@ -37,6 +38,7 @@ const ROOM_INFO_PHASES = [
RightPanelPhases.Room3pidMemberInfo,
];
@replaceableComponent("views.right_panel.RoomHeaderButtons")
export default class RoomHeaderButtons extends HeaderButtons {
constructor(props) {
super(props, HeaderKind.Room);

View file

@ -36,6 +36,7 @@ import {
PHASE_CANCELLED,
} from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest";
import Spinner from "../elements/Spinner";
import {replaceableComponent} from "../../../utils/replaceableComponent";
// XXX: Should be defined in matrix-js-sdk
enum VerificationPhase {
@ -65,6 +66,7 @@ interface IState {
reciprocateQREvent?: ReciprocateQRCode;
}
@replaceableComponent("views.right_panel.VerificationPanel")
export default class VerificationPanel extends React.PureComponent<IProps, IState> {
private hasVerifier: boolean;