Iterate PR first round

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-09-13 18:03:05 +02:00
parent 6e674b97c2
commit 71e84ccb75
No known key found for this signature in database
GPG key ID: 55C211A1226CB17D
6 changed files with 9 additions and 8 deletions

View file

@ -28,6 +28,7 @@ import BaseDialog from "./BaseDialog";
import DialogButtons from "../elements/DialogButtons";
import { IDialogProps } from "./IDialogProps";
import { IGeneratedSas, ISasEvent } from "matrix-js-sdk/src/crypto/verification/SAS";
import { VerificationBase } from "matrix-js-sdk/src/crypto/verification/Base";
const PHASE_START = 0;
const PHASE_SHOW_SAS = 1;
@ -36,7 +37,7 @@ const PHASE_VERIFIED = 3;
const PHASE_CANCELLED = 4;
interface IProps extends IDialogProps {
verifier: any; // TODO types
verifier: VerificationBase; // TODO types
}
interface IState {
@ -59,7 +60,7 @@ export default class IncomingSasDialog extends React.Component<IProps, IState> {
super(props);
let phase = PHASE_START;
if (this.props.verifier.cancelled) {
if (this.props.verifier.hasBeenCancelled) {
console.log("Verifier was cancelled in the background.");
phase = PHASE_CANCELLED;
}
@ -79,7 +80,7 @@ export default class IncomingSasDialog extends React.Component<IProps, IState> {
public componentWillUnmount(): void {
if (this.state.phase !== PHASE_CANCELLED && this.state.phase !== PHASE_VERIFIED) {
this.props.verifier.cancel('User cancel');
this.props.verifier.cancel(new Error('User cancel'));
}
this.props.verifier.removeListener('show_sas', this.onVerifierShowSas);
}

View file

@ -25,7 +25,7 @@ interface IProps extends IDialogProps {
host: string;
}
const LazyLoadingDisabledDialog: React.FC<IProps> = (props: IProps) => {
const LazyLoadingDisabledDialog: React.FC<IProps> = (props) => {
const brand = SdkConfig.get().brand;
const description1 = _t(
"You've previously used %(brand)s on %(host)s with lazy loading of members enabled. " +

View file

@ -23,7 +23,7 @@ import { IDialogProps } from "./IDialogProps";
interface IProps extends IDialogProps {}
const LazyLoadingResyncDialog: React.FC<IProps> = (props: IProps) => {
const LazyLoadingResyncDialog: React.FC<IProps> = (props) => {
const brand = SdkConfig.get().brand;
const description =
_t(

View file

@ -35,7 +35,7 @@ interface IProps extends IDialogProps {
fixedWidth?: boolean;
className?: string;
hasCancelButton?: boolean;
cancelButton?: JSX.Element;
cancelButton?: React.ReactNode;
}
export default class QuestionDialog extends React.Component<IProps> {

View file

@ -25,7 +25,7 @@ import { IDialogProps } from "./IDialogProps";
interface IProps extends IDialogProps {
title?: string;
description?: string | JSX.Element;
description?: React.ReactNode;
value?: string;
placeholder?: string;
button?: string;

View file

@ -59,7 +59,7 @@ interface IState {
recoverInfo: IKeyBackupRestoreResult;
recoveryKeyValid: boolean;
forceRecoveryKey: boolean;
passPhrase: "";
passPhrase: string;
restoreType: RestoreType;
progress: {
stage: ProgressState;