diff --git a/electrum/plugins/trustedcoin/qml/ShowConfirmOTP.qml b/electrum/plugins/trustedcoin/qml/ShowConfirmOTP.qml index 778b3ddb6..b99ab97b6 100644 --- a/electrum/plugins/trustedcoin/qml/ShowConfirmOTP.qml +++ b/electrum/plugins/trustedcoin/qml/ShowConfirmOTP.qml @@ -42,13 +42,25 @@ WizardComponent { render: plugin.otpSecret } - TextHighlightPane { + Item { Layout.alignment: Qt.AlignHCenter visible: plugin.otpSecret - Label { - text: plugin.otpSecret - font.family: FixedFont - font.bold: true + implicitWidth: otpSecretPane.implicitWidth + implicitHeight: otpSecretPane.implicitHeight + TextHighlightPane { + id: otpSecretPane + Label { + text: plugin.otpSecret + font.family: FixedFont + font.bold: true + } + } + MouseArea { + anchors.fill: parent + onClicked: { + AppController.textToClipboard(plugin.otpSecret) + toaster.show(otpSecretPane, qsTr('Copied!')) + } } } @@ -118,6 +130,10 @@ WizardComponent { otp_auth.forceActiveFocus() } + Toaster { + id: toaster + } + Connections { target: plugin function onOtpError(message) {