diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-06-21 20:57:51 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-06-22 11:42:01 +0300 |
commit | 655a43db104f5e12df320cd5fac6fdbbedfdaacb (patch) | |
tree | d759af2cc9d8e06bf71b20bc7ce2420b27c9ee66 /src/gui/accountmanager.cpp | |
parent | cf93b740289d99dc2eac8661f24653db29fb11b1 (diff) |
Use custom mnemonic dialog
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/gui/accountmanager.cpp')
-rw-r--r-- | src/gui/accountmanager.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index 45b75b3e3..ae144bcca 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -25,6 +25,7 @@ #include <QNetworkAccessManager> #include <QMessageBox> #include "clientsideencryption.h" +#include "ui_mnemonicdialog.h" namespace { static const char urlC[] = "url"; @@ -335,16 +336,19 @@ AccountPtr AccountManager::createAccount() void AccountManager::displayMnemonic(const QString& mnemonic) { - QMessageBox msgBox; - msgBox.setText(tr("All 12 words together make a very strong password, " - "letting only you view and make use of your encrypted files. " - "Please write it down and keep it somewhere safe.")); - msgBox.setDetailedText(mnemonic); - msgBox.setWindowTitle(tr("Make note of your 12 word encryption password")); - msgBox.setIcon(QMessageBox::Information); - msgBox.setStandardButtons(QMessageBox::Ok); - - msgBox.exec(); + QDialog *widget = new QDialog; + Ui_Dialog ui; + ui.setupUi(widget); + widget->setWindowTitle(tr("End to end encryption mnemonic")); + ui.label->setText(tr("To protect your Cryptocraphic Identity, we encrypt it with a mnemonic of 12 dictionary words." + "Please note these down and keep them safe. " + "They will be needed to add other devices to your account (like your mobile phone or laptop).")); + ui.textEdit->setText(mnemonic); + ui.textEdit->focusWidget(); + ui.textEdit->selectAll(); + ui.textEdit->setAlignment(Qt::AlignCenter); + widget->exec(); + widget->resize(widget->sizeHint()); } void AccountManager::shutdown() { |