Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@nextcloud.com>2020-08-11 15:55:51 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-08-11 16:12:34 +0300
commit0066de26bbc56c8d88ef24012943a40b7b79461d (patch)
treeee9287a90a628fa51a7c992bcd0a92148e942fb4
parent68f137fff5a74f633190973bfafca7754390bd2b (diff)
Keep the E2EE info message around to allow displaying mnemonic
We lost the ability to display the E2EE mnemonic during the GUI redesign and the info message wasn't displayed again on restart. So now we display it every time, it still can be dismissed and the button text is different in such a case to make the intent clearer. Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
-rw-r--r--src/gui/accountsettings.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index d625d7d2d..2caf63b50 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -197,11 +197,15 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent)
connect(_accountState->account()->e2e(), &ClientSideEncryption::showMnemonic, this, &AccountSettings::slotShowMnemonic);
connect(_accountState->account()->e2e(), &ClientSideEncryption::mnemonicGenerated, this, &AccountSettings::slotNewMnemonicGenerated);
- if (_accountState->account()->e2e()->newMnemonicGenerated())
- {
+ if (_accountState->account()->e2e()->newMnemonicGenerated()) {
slotNewMnemonicGenerated();
} else {
- _ui->encryptionMessage->hide();
+ _ui->encryptionMessage->setText(tr("This account supports end-to-end encryption"));
+
+ auto *mnemonic = new QAction(tr("Display mnemonic"), this);
+ connect(mnemonic, &QAction::triggered, this, &AccountSettings::requesetMnemonic);
+ _ui->encryptionMessage->addAction(mnemonic);
+ _ui->encryptionMessage->show();
}
connect(UserModel::instance(), &UserModel::addAccount,