Merge branch 'e2ee'
- Support for e2ee rooms
- Implement categories & file logging
- Let the user know when the app can't reach the server (#93)
fixes #13
fixes #326
2 files changed, 17 insertions, 9 deletions
diff --git a/include/dialogs/ReCaptcha.hpp b/include/dialogs/ReCaptcha.hpp
index 1eda40c7..5f47b0eb 100644
--- a/include/dialogs/ReCaptcha.hpp
+++ b/include/dialogs/ReCaptcha.hpp
@@ -12,7 +12,7 @@ class ReCaptcha : public QWidget
Q_OBJECT
public:
- ReCaptcha(const QString &server, const QString &session, QWidget *parent = nullptr);
+ ReCaptcha(const QString &session, QWidget *parent = nullptr);
protected:
void paintEvent(QPaintEvent *event) override;
diff --git a/include/dialogs/RoomSettings.hpp b/include/dialogs/RoomSettings.hpp
index 375a531e..6cab03b7 100644
--- a/include/dialogs/RoomSettings.hpp
+++ b/include/dialogs/RoomSettings.hpp
@@ -5,16 +5,17 @@
#include "Cache.h"
+class Avatar;
class FlatButton;
-class TextField;
+class QComboBox;
class QHBoxLayout;
-class Avatar;
-class QPixmap;
-class QLayout;
class QLabel;
-class QComboBox;
-class TextField;
class QLabel;
+class QLayout;
+class QPixmap;
+class TextField;
+class TextField;
+class Toggle;
template<class T>
class QSharedPointer;
@@ -30,6 +31,9 @@ public:
signals:
void nameChanged(const QString &roomName);
+ void nameEventSentCb(const QString &newName);
+ void topicEventSentCb();
+ void stateEventErrorCb(const QString &msg);
private:
QString roomId_;
@@ -81,6 +85,7 @@ public:
signals:
void closing();
+ void enableEncryptionError(const QString &msg);
protected:
void paintEvent(QPaintEvent *event) override;
@@ -95,13 +100,15 @@ private:
void setupEditButton();
//! Retrieve the current room information from cache.
void retrieveRoomInfo();
+ void enableEncryption();
//! Whether the user would be able to change the name or the topic of the room.
- bool hasEditRights_ = true;
+ bool hasEditRights_ = true;
+ bool usesEncryption_ = false;
QHBoxLayout *editLayout_;
// Button section
- FlatButton *saveBtn_;
+ FlatButton *okBtn_;
FlatButton *cancelBtn_;
FlatButton *editFieldsBtn_;
@@ -113,6 +120,7 @@ private:
TopSection *topSection_;
QComboBox *accessCombo;
+ Toggle *encryptionToggle_;
};
} // dialogs
|