import "./logs-dialog.scss"; import * as React from "react"; import { t, Trans } from "@lingui/macro"; import { Dialog, DialogProps } from "../dialog"; import { Wizard, WizardStep } from "../wizard"; import { copyToClipboard } from "../../utils"; import { Notifications } from "../notifications"; import { Button } from "../button"; import { Icon } from "../icon"; import { _i18n } from "../../i18n"; interface Props extends DialogProps { title: string; logs: string; } export class LogsDialog extends React.Component { public logsElem: HTMLElement; copyToClipboard = (): void => { if (copyToClipboard(this.logsElem)) { Notifications.ok(_i18n._(t`Logs copied to clipboard.`)); } } render(): JSX.Element { const { title, logs, ...dialogProps } = this.props; const header =
{title}
; const customButtons = (
); return ( { this.logsElem = e; }}> {logs || There are no logs available.} ); } }