Change the colour of the encryption message box when encryption enabled

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2022-11-14 13:25:39 +01:00 committed by Claudio Cambra
parent c1d6482c69
commit f6687c491d
1 changed files with 2 additions and 0 deletions

View File

@ -247,6 +247,7 @@ void AccountSettings::slotE2eEncryptionMnemonicReady()
displayMnemonic(_accountState->account()->e2e()->_mnemonic);
});
_ui->encryptionMessage->setMessageType(KMessageWidget::Positive);
_ui->encryptionMessage->setText(tr("End-to-End encryption has been enabled for this account"));
_ui->encryptionMessage->setIcon(Theme::createIconFromSvgResource(QStringLiteral(":/client/theme/colored/state-ok.svg")));
_ui->encryptionMessage->show();
@ -1457,6 +1458,7 @@ void AccountSettings::initializeE2eEncryption()
if (!_accountState->account()->e2e()->_mnemonic.isEmpty()) {
slotE2eEncryptionMnemonicReady();
} else {
_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();