mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
newswarmpage: take title and description for new swarm
GitLab: #340 Change-Id: Ib5d3d44c620120b050fca57c774edfe2b3de7c93
This commit is contained in:
parent
1d074f25fd
commit
bbd3e7435a
5 changed files with 27 additions and 11 deletions
|
@ -268,6 +268,8 @@ Item {
|
|||
property real preferredFieldWidth: 256
|
||||
property real preferredFieldHeight: 32
|
||||
property real preferredMarginSize: 16
|
||||
property real settingsMarginSize: 8
|
||||
property real swarmDetailsPageTopMargin: 64
|
||||
property real preferredDialogWidth: 400
|
||||
property real preferredDialogHeight: 300
|
||||
property real minimumPreviewWidth: 120
|
||||
|
|
|
@ -570,8 +570,14 @@ ConversationsAdapter::connectConversationModel()
|
|||
}
|
||||
|
||||
void
|
||||
ConversationsAdapter::createSwarm()
|
||||
ConversationsAdapter::createSwarm(const QString& title,
|
||||
const QString& description,
|
||||
const QString& avatar,
|
||||
const VectorString& participants)
|
||||
{
|
||||
auto convModel = lrcInstance_->getCurrentConversationModel();
|
||||
convModel->createConversation({}, "");
|
||||
convModel->createConversation(participants,
|
||||
{{"title", title},
|
||||
{"description", description},
|
||||
{"avatar", avatar}});
|
||||
}
|
|
@ -48,7 +48,10 @@ protected:
|
|||
|
||||
public:
|
||||
Q_INVOKABLE bool connectConversationModel();
|
||||
Q_INVOKABLE void createSwarm();
|
||||
Q_INVOKABLE void createSwarm(const QString& title,
|
||||
const QString& description,
|
||||
const QString& avatar,
|
||||
const VectorString& participants);
|
||||
Q_INVOKABLE void setFilter(const QString& filterString);
|
||||
Q_INVOKABLE QVariantMap getConvInfoMap(const QString& convId);
|
||||
Q_INVOKABLE void restartConversation(const QString& convId);
|
||||
|
|
|
@ -40,6 +40,7 @@ Rectangle {
|
|||
anchors.centerIn: root
|
||||
|
||||
EditableLineEdit {
|
||||
id: title
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.topMargin: JamiTheme.preferredMarginSize
|
||||
|
||||
|
@ -55,6 +56,7 @@ Rectangle {
|
|||
}
|
||||
|
||||
EditableLineEdit {
|
||||
id: description
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.topMargin: JamiTheme.preferredMarginSize
|
||||
|
||||
|
@ -81,7 +83,7 @@ Rectangle {
|
|||
text: JamiStrings.createTheSwarm
|
||||
|
||||
onClicked: {
|
||||
ConversationsAdapter.createSwarm()
|
||||
ConversationsAdapter.createSwarm(title.text, description.text, "", [])
|
||||
createSwarmClicked()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,10 @@ Rectangle {
|
|||
Layout.topMargin: JamiTheme.preferredMarginSize
|
||||
Layout.bottomMargin: JamiTheme.preferredMarginSize
|
||||
|
||||
font.pointSize: JamiTheme.titleFontSize
|
||||
font.pointSize: JamiTheme.menuFontSize
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
text: CurrentConversation.description
|
||||
placeholderText: JamiStrings.editDescription
|
||||
|
@ -108,8 +111,8 @@ Rectangle {
|
|||
backgroundColor: JamiTheme.buttonTintedBlue
|
||||
hoverColor: JamiTheme.buttonTintedBlue
|
||||
borderWidth: 4
|
||||
bottomMargin: JamiTheme.preferredMarginSize
|
||||
fontSize: JamiTheme.titleFontSize
|
||||
bottomMargin: JamiTheme.settingsMarginSize
|
||||
fontSize: JamiTheme.menuFontSize
|
||||
underlineContentOnly: true
|
||||
|
||||
down: tabBar.currentIndex === 0
|
||||
|
@ -121,8 +124,8 @@ Rectangle {
|
|||
backgroundColor: JamiTheme.buttonTintedBlue
|
||||
hoverColor: JamiTheme.buttonTintedBlue
|
||||
borderWidth: 4
|
||||
bottomMargin: JamiTheme.preferredMarginSize
|
||||
fontSize: JamiTheme.titleFontSize
|
||||
bottomMargin: JamiTheme.settingsMarginSize
|
||||
fontSize: JamiTheme.menuFontSize
|
||||
underlineContentOnly: true
|
||||
|
||||
down: true//tabBar.currentIndex === 1
|
||||
|
@ -139,8 +142,8 @@ Rectangle {
|
|||
backgroundColor: JamiTheme.buttonTintedBlue
|
||||
hoverColor: JamiTheme.buttonTintedBlue
|
||||
borderWidth: 4
|
||||
bottomMargin: JamiTheme.preferredMarginSize
|
||||
fontSize: JamiTheme.titleFontSize
|
||||
bottomMargin: JamiTheme.settingsMarginSize
|
||||
fontSize: JamiTheme.menuFontSize
|
||||
underlineContentOnly: true
|
||||
|
||||
down: tabBar.currentIndex === 2
|
||||
|
|
Loading…
Add table
Reference in a new issue