mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 06:45:45 +02:00
phase2: add button to start generic swarm
GitLab: #340 Change-Id: I72534e9e3599b70cdf0f91aa81be7636499715b8
This commit is contained in:
parent
7fa9f1fd21
commit
866da95252
5 changed files with 71 additions and 14 deletions
21
resources/icons/create_swarm.svg
Normal file
21
resources/icons/create_swarm.svg
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<path d="M20,8.4c-0.4-0.3-0.8-0.5-1.2-0.7c0.2-0.2,0.4-0.5,0.6-0.8c0.4-0.8,0.4-1.8,0-2.6c-0.5-0.9-1.5-1.6-2.6-1.6
|
||||
c-0.7,0-1.5,0.3-2,0.8c-0.6,0.6-1,1.6-0.8,2.5c0.1,0.6,0.4,1.2,0.8,1.6c-0.3,0.1-0.6,0.3-0.9,0.5c-0.5-0.4-1.2-0.6-1.9-0.6
|
||||
c-0.6,0-1.3,0.2-1.8,0.6C9.9,8,9.5,7.9,9.2,7.7c0.2-0.2,0.4-0.5,0.6-0.8c0.4-0.8,0.4-1.7,0-2.5c-0.5-1-1.5-1.6-2.6-1.6
|
||||
c-0.7,0-1.4,0.3-1.9,0.8c-0.7,0.6-1,1.6-0.9,2.5c0.1,0.6,0.4,1.2,0.8,1.6c-1.8,0.7-3.1,2.5-3.4,4.4c0,0.3,0,0.7,0,1
|
||||
c0,0.2,0,0.2,0.1,0.3c0.1,0.2,0.4,0.3,0.6,0.3c0.3,0,0.5-0.2,0.5-0.5c0,0,0-0.1,0-0.1v-0.3c0-1.4,0.7-2.7,1.8-3.5
|
||||
c1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2C13.7,9.5,14.2,10.4,14.1,11.3z
|
||||
M16.8,3.8l0,0.2c0.7,0,1.4,0.6,1.6,1.3c0.1,0.7-0.3,1.5-1,1.8c-0.6,0.2-1.3,0.1-1.8-0.3c-0.4-0.4-0.6-1-0.5-1.5
|
||||
C15.4,4.6,16,4,16.8,4L16.8,3.8L16.8,3.8z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -37,6 +37,7 @@ Item {
|
|||
property string incomingAudioCallFrom: qsTr("Incoming audio call from {}")
|
||||
property string incomingVideoCallFrom: qsTr("Incoming video call from {}")
|
||||
property string contactSearchConversation: qsTr("Find a user or search for a conversation")
|
||||
property string startASwarm: qsTr("Start a swarm")
|
||||
property string contactSearchInvitations: qsTr("Search your invitations")
|
||||
property string invitations: qsTr("Invitations")
|
||||
property string description: qsTr("Jami is free software for universal communication which respects the freedoms and the privacy of its users.")
|
||||
|
|
|
@ -549,3 +549,10 @@ ConversationsAdapter::connectConversationModel()
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
ConversationsAdapter::createSwarm()
|
||||
{
|
||||
auto convModel = lrcInstance_->getCurrentConversationModel();
|
||||
convModel->createConversation({}, "");
|
||||
}
|
|
@ -48,6 +48,7 @@ protected:
|
|||
|
||||
public:
|
||||
Q_INVOKABLE bool connectConversationModel();
|
||||
Q_INVOKABLE void createSwarm();
|
||||
Q_INVOKABLE void setFilter(const QString& filterString);
|
||||
Q_INVOKABLE QVariantMap getConvInfoMap(const QString& convId);
|
||||
Q_INVOKABLE void restartConversation(const QString& convId);
|
||||
|
|
|
@ -56,8 +56,8 @@ Rectangle {
|
|||
sidePanelTabBar.selectTab(tabIndex)
|
||||
}
|
||||
|
||||
ContactSearchBar {
|
||||
id: contactSearchBar
|
||||
RowLayout {
|
||||
id: startBar
|
||||
|
||||
height: 40
|
||||
anchors.top: sidePanelRect.top
|
||||
|
@ -67,6 +67,12 @@ Rectangle {
|
|||
anchors.right: sidePanelRect.right
|
||||
anchors.rightMargin: 15
|
||||
|
||||
ContactSearchBar {
|
||||
id: contactSearchBar
|
||||
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
onContactSearchBarTextChanged: function (text) {
|
||||
// not calling positionViewAtBeginning will cause
|
||||
// sort animation visual bugs
|
||||
|
@ -83,12 +89,33 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
PushButton {
|
||||
id: startConversation
|
||||
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
radius: JamiTheme.primaryRadius
|
||||
|
||||
imageColor: JamiTheme.textColor
|
||||
imagePadding: 8
|
||||
normalColor: JamiTheme.secondaryBackgroundColor
|
||||
|
||||
preferredSize: startBar.height
|
||||
|
||||
source: JamiResources.create_swarm_svg
|
||||
toolTipText: JamiStrings.startASwarm
|
||||
|
||||
onClicked: {
|
||||
ConversationsAdapter.createSwarm()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SidePanelTabBar {
|
||||
id: sidePanelTabBar
|
||||
|
||||
visible: ConversationsAdapter.pendingRequestCount &&
|
||||
!contactSearchBar.textContent
|
||||
anchors.top: contactSearchBar.bottom
|
||||
anchors.top: startBar.bottom
|
||||
anchors.topMargin: visible ? 10 : 0
|
||||
width: sidePanelRect.width
|
||||
height: visible ? 42 : 0
|
||||
|
|
Loading…
Add table
Reference in a new issue