Files
ThreadNet-Web/src/components/views/dialogs/ConfirmWipeDeviceDialog.tsx
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.5 KiB
TypeScript
Raw Normal View History

2019-07-03 16:46:37 -06:00
/*
2024-09-09 14:57:16 +01:00
Copyright 2024 New Vector Ltd.
2019-07-03 16:46:37 -06:00
Copyright 2019 The Matrix.org Foundation C.I.C.
2024-09-09 14:57:16 +01:00
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
2019-07-03 16:46:37 -06:00
*/
import React from "react";
2021-10-22 17:23:32 -05:00
2021-06-29 13:11:58 +01:00
import { _t } from "../../../languageHandler";
2021-07-02 17:19:01 +02:00
import BaseDialog from "./BaseDialog";
import DialogButtons from "../elements/DialogButtons";
2019-07-03 16:46:37 -06:00
interface IProps {
onFinished: (success?: boolean) => void;
}
2019-07-03 16:46:37 -06:00
export default class ConfirmWipeDeviceDialog extends React.Component<IProps> {
private onConfirm = (): void => {
2019-07-03 16:46:37 -06:00
this.props.onFinished(true);
};
private onDecline = (): void => {
2019-07-03 16:46:37 -06:00
this.props.onFinished(false);
};
public render(): React.ReactNode {
2019-07-03 16:46:37 -06:00
return (
2021-04-27 17:23:27 +02:00
<BaseDialog
className="mx_ConfirmWipeDeviceDialog"
hasCancel={true}
onFinished={this.props.onFinished}
title={_t("auth|soft_logout|clear_data_title")}
2021-04-27 17:23:27 +02:00
>
2019-07-03 16:46:37 -06:00
<div className="mx_ConfirmWipeDeviceDialog_content">
<p>{_t("auth|soft_logout|clear_data_description")}</p>
2019-07-03 16:46:37 -06:00
</div>
<DialogButtons
primaryButton={_t("auth|soft_logout|clear_data_button")}
onPrimaryButtonClick={this.onConfirm}
primaryButtonClass="danger"
cancelButton={_t("action|cancel")}
onCancel={this.onDecline}
2019-07-03 16:46:37 -06:00
/>
</BaseDialog>
);
}
}