Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearly tell user that E2EE has been enabled for an account #5164

Merged
merged 7 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions src/gui/accountsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ void showEnableE2eeWithVirtualFilesWarningDialog(std::function<void(void)> onAcc
{
const auto messageBox = new QMessageBox;
messageBox->setAttribute(Qt::WA_DeleteOnClose);
messageBox->setText(AccountSettings::tr("End-to-End Encryption with Virtual Files"));
messageBox->setText(AccountSettings::tr("End-to-end Encryption with Virtual Files"));
messageBox->setInformativeText(AccountSettings::tr("You seem to have the Virtual Files feature enabled on this folder. "
"At the moment, it is not possible to implicitly download virtual files that are "
"End-to-End encrypted. To get the best experience with Virtual Files and "
"End-to-End Encryption, make sure the encrypted folder is marked with "
"End-to-end encrypted. To get the best experience with Virtual Files and "
"End-to-end Encryption, make sure the encrypted folder is marked with "
"\"Make always available locally\"."));
messageBox->setIcon(QMessageBox::Warning);
const auto dontEncryptButton = messageBox->addButton(QMessageBox::StandardButton::Cancel);
Expand Down Expand Up @@ -246,9 +246,11 @@ void AccountSettings::slotE2eEncryptionMnemonicReady()
connect(actionDisplayMnemonic, &QAction::triggered, this, [this]() {
displayMnemonic(_accountState->account()->e2e()->_mnemonic);
});
_ui->encryptionMessage->setText(tr("This account supports End-to-End encryption"));

_ui->encryptionMessage->setMessageType(KMessageWidget::Positive);
_ui->encryptionMessage->setText(tr("End-to-end encryption has been enabled for this account"));
_ui->encryptionMessage->setIcon(Theme::createColorAwareIcon(QStringLiteral(":/client/theme/lock.svg")));
_ui->encryptionMessage->show();

}

void AccountSettings::slotE2eEncryptionGenerateKeys()
Expand Down Expand Up @@ -974,7 +976,7 @@ void AccountSettings::displayMnemonic(const QString &mnemonic)
QDialog widget;
Ui_Dialog ui;
ui.setupUi(&widget);
widget.setWindowTitle(tr("End-to-End encryption mnemonic"));
widget.setWindowTitle(tr("End-to-end encryption mnemonic"));
ui.label->setText(
tr("To protect your Cryptographic Identity, we encrypt it with a mnemonic of 12 dictionary words. "
"Please note these down and keep them safe. "
Expand Down Expand Up @@ -1455,10 +1457,12 @@ void AccountSettings::initializeE2eEncryption()
if (!_accountState->account()->e2e()->_mnemonic.isEmpty()) {
slotE2eEncryptionMnemonicReady();
} else {
_ui->encryptionMessage->setText(tr("This account supports End-to-End encryption"));
_ui->encryptionMessage->setMessageType(KMessageWidget::Information);
_ui->encryptionMessage->setText(tr("This account supports End-to-end encryption"));
_ui->encryptionMessage->setIcon(Theme::createColorAwareIcon(QStringLiteral(":/client/theme/black/state-info.svg")));
_ui->encryptionMessage->hide();

auto *const actionEnableE2e = addActionToEncryptionMessage(tr("Enable encryption"), e2EeUiActionEnableEncryptionId);
auto *const actionEnableE2e = addActionToEncryptionMessage(tr("Setup encryption"), e2EeUiActionEnableEncryptionId);
connect(actionEnableE2e, &QAction::triggered, this, &AccountSettings::slotE2eEncryptionGenerateKeys);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/libsync/theme.h
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject
*/
static QPixmap createColorAwarePixmap(const QString &name);


/**
* @brief Whether to show the option to create folders using "virtual files".
*
Expand Down
1 change: 1 addition & 0 deletions theme.qrc.in
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
<file>theme/more.svg</file>
<file>theme/change.svg</file>
<file>theme/colored/change-bordered.svg</file>
<file>theme/lock.svg</file>
<file>theme/lock-http.svg</file>
<file>theme/lock-https.svg</file>
<file>theme/lock-broken.svg</file>
Expand Down
2 changes: 1 addition & 1 deletion theme/black/state-info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 51 additions & 1 deletion theme/lock-broken.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 61 additions & 1 deletion theme/lock-http.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 43 additions & 1 deletion theme/lock-https.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions theme/lock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion theme/white/state-info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.