Skip to content
Snippets Groups Projects
Commit d96ee4c4 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

misc: add preferences to enable full UI for swarm

Change-Id: Ied9e8d59fe9dff08ffbc10d2c723b8998d8469f1
GitLab: #670
parent e944e2e0
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@ extern const QString defaultDownloadPath;
X(AcceptTransferBelow, 20) \
X(AutoAcceptFiles, true) \
X(DisplayHyperlinkPreviews, true) \
X(EnableExperimentalSwarm, false) \
X(EnableDarkTheme, false) \
X(AutoUpdate, true) \
X(StartMinimized, false) \
......
......@@ -424,6 +424,8 @@ Item {
property string troubleshootTitle: qsTr("Troubleshoot")
property string troubleshootButton: qsTr("Open logs")
property string troubleshootText: qsTr("Get logs")
property string experimentalSwarm: qsTr("(Experimental) Enable small groups support for Swarm")
property string experimentalSwarmTooltip: qsTr("This feature is in development.")
// Recording Settings
property string tipRecordFolder: qsTr("Select a record directory")
......
......@@ -21,9 +21,10 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import net.jami.Models 1.1
import net.jami.Adapters 1.1
import net.jami.Constants 1.1
import net.jami.Enums 1.1
import net.jami.Models 1.1
import "../../commoncomponents"
......@@ -175,10 +176,20 @@ Rectangle {
preferredSize: startBar.height
visible: UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm)
source: smartListLayout.visible ? JamiResources.create_swarm_svg : JamiResources.round_close_24dp_svg
toolTipText: smartListLayout.visible ? JamiStrings.startASwarm : JamiStrings.cancel
onClicked: createSwarmClicked()
Connections {
target: UtilsAdapter
function onShowExperimentalSwarm() {
startConversation.visible = UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm)
}
}
}
}
......
......@@ -20,9 +20,10 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import net.jami.Models 1.1
import net.jami.Adapters 1.1
import net.jami.Constants 1.1
import net.jami.Enums 1.1
import net.jami.Models 1.1
import "../../commoncomponents"
import "../js/logviewwindowcreation.js" as LogViewWindowCreation
......@@ -83,4 +84,22 @@ ColumnLayout {
}
}
}
ToggleSwitch {
id: checkboxSwarm
Layout.fillWidth: true
Layout.leftMargin: JamiTheme.preferredMarginSize
checked: UtilsAdapter.getAppValue(Settings.EnableExperimentalSwarm)
labelText: JamiStrings.experimentalSwarm
fontPointSize: JamiTheme.settingsFontSize
tooltipText: JamiStrings.experimentalSwarmTooltip
onSwitchToggled: {
UtilsAdapter.setAppValue(Settings.Key.EnableExperimentalSwarm, checked)
}
}
}
......@@ -365,6 +365,8 @@ UtilsAdapter::setAppValue(const Settings::Key key, const QVariant& value)
// If we change the lang preference, reload the translations
if (key == Settings::Key::LANG)
settingsManager_->loadTranslations();
else if (key == Settings::Key::EnableExperimentalSwarm)
Q_EMIT showExperimentalSwarm();
}
QString
......
......@@ -110,6 +110,7 @@ public:
Q_SIGNALS:
void debugMessageReceived(const QString& message);
void showExperimentalSwarm();
private:
QClipboard* clipboard_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment