mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-04-21 21:52:03 +02:00
whitelabeling: add uicustom info in account property
GitLab: #1097 Change-Id: I1f7db2b14c437d033264ff58457d8067e4ff6c05
This commit is contained in:
parent
8fd7c70d1f
commit
593ecc9910
5 changed files with 18 additions and 1 deletions
2
daemon
2
daemon
|
@ -1 +1 @@
|
|||
Subproject commit 417447a167c52512e8c81250cc08bb5b24c6b667
|
||||
Subproject commit d191e2e262a26c5c17bc0ea2ecea08fe6f42142c
|
|
@ -222,6 +222,9 @@ CurrentAccount::updateData()
|
|||
set_autoTransferSizeThreshold(settingsManager_->getValue(Settings::Key::AcceptTransferBelow)
|
||||
.toInt(),
|
||||
true);
|
||||
|
||||
// UI Customization settings
|
||||
set_uiCustomization(accConfig.uiCustomization, true);
|
||||
} catch (...) {
|
||||
qWarning() << "Can't update current account info data for" << id_;
|
||||
}
|
||||
|
|
|
@ -191,6 +191,9 @@ class CurrentAccount final : public QObject
|
|||
QML_NEW_ACCOUNT_MODEL_SETTINGS_PROPERTY(bool, autoTransferFromTrusted, AutoAcceptFiles)
|
||||
QML_NEW_ACCOUNT_MODEL_SETTINGS_PROPERTY(int, autoTransferSizeThreshold, AcceptTransferBelow)
|
||||
|
||||
// UI Customization settings
|
||||
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(QJsonObject, uiCustomization)
|
||||
|
||||
public:
|
||||
explicit CurrentAccount(LRCInstance* lrcInstance,
|
||||
AppSettingsManager* settingsManager,
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QImage>
|
||||
#include <QtCore/QBuffer>
|
||||
#include <QJsonDocument>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
|
@ -928,6 +929,11 @@ account::Info::fromDetails(const MapStringString& details)
|
|||
// Jams
|
||||
confProperties.managerUri = details[ConfProperties::MANAGER_URI];
|
||||
confProperties.managerUsername = details[ConfProperties::MANAGER_USERNAME];
|
||||
// uiCustomization
|
||||
QJsonDocument doc = QJsonDocument::fromJson(details[ConfProperties::UI_CUSTOMIZATION].toUtf8());
|
||||
if (!doc.isNull() && doc.isObject()) {
|
||||
confProperties.uiCustomization = doc.object();
|
||||
}
|
||||
}
|
||||
|
||||
MapStringString
|
||||
|
@ -1033,6 +1039,9 @@ account::ConfProperties_t::toDetails() const
|
|||
// Manager
|
||||
details[ConfProperties::MANAGER_URI] = this->managerUri;
|
||||
details[ConfProperties::MANAGER_USERNAME] = this->managerUsername;
|
||||
// UI Customization
|
||||
QJsonDocument doc(this->uiCustomization);
|
||||
details[ConfProperties::UI_CUSTOMIZATION] = doc.toJson(QJsonDocument::Compact);
|
||||
|
||||
return details;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <memory>
|
||||
|
||||
#include <QString>
|
||||
#include <QJsonObject>
|
||||
|
||||
namespace lrc {
|
||||
|
||||
|
@ -118,6 +119,7 @@ struct ConfProperties_t
|
|||
QString defaultModerators;
|
||||
bool localModeratorsEnabled;
|
||||
VectorMapStringString credentials;
|
||||
QJsonObject uiCustomization;
|
||||
struct Audio_t
|
||||
{
|
||||
int audioPortMax;
|
||||
|
|
Loading…
Add table
Reference in a new issue