From 452bab8a47bc5aff26ca543fc21968ac60fb1857 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Tue, 14 Feb 2017 09:18:31 +0100 Subject: [PATCH] feat(ui/views/App/Settings/SettingsNetwork): view in progress --- linphone-desktop/assets/languages/en.ts | 28 ++++++++ linphone-desktop/assets/languages/fr.ts | 28 ++++++++ .../ui/modules/Common/Form/FormGroup.qml | 4 +- .../ui/views/App/Settings/SettingsNetwork.qml | 68 +++++++++++++++++++ 4 files changed, 126 insertions(+), 2 deletions(-) diff --git a/linphone-desktop/assets/languages/en.ts b/linphone-desktop/assets/languages/en.ts index a5cb65f71..3b74cad53 100644 --- a/linphone-desktop/assets/languages/en.ts +++ b/linphone-desktop/assets/languages/en.ts @@ -579,6 +579,34 @@ Server url not configured. transportTitle Transport + + natAndFirewallTitle + NAT and Firewall + + + enableIceLabel + Enable ICE + + + stunServerLabel + STUN/TURN server + + + enableTurnLabel + Enable TURN + + + turnUserLabel + TURN user + + + turnPasswordLabel + TURN password + + + networkProtocolAndPortsTitle + Network protocol and Ports + SettingsWindow diff --git a/linphone-desktop/assets/languages/fr.ts b/linphone-desktop/assets/languages/fr.ts index f5112358d..1596e109e 100644 --- a/linphone-desktop/assets/languages/fr.ts +++ b/linphone-desktop/assets/languages/fr.ts @@ -589,6 +589,34 @@ Url du serveur non configurée. transportTitle Transport + + natAndFirewallTitle + NAT et Pare-feu + + + enableIceLabel + Activer ICE + + + stunServerLabel + Serveur STUN/TURN + + + enableTurnLabel + Activer TURN + + + turnUserLabel + Utilisateur TURN + + + turnPasswordLabel + Mot de passe TURN + + + networkProtocolAndPortsTitle + Protocol réseau et ports + SettingsWindow diff --git a/linphone-desktop/ui/modules/Common/Form/FormGroup.qml b/linphone-desktop/ui/modules/Common/Form/FormGroup.qml index a08b0425a..045c2abc1 100644 --- a/linphone-desktop/ui/modules/Common/Form/FormGroup.qml +++ b/linphone-desktop/ui/modules/Common/Form/FormGroup.qml @@ -32,12 +32,12 @@ RowLayout { id: content Layout.alignment: { - var height = _content[0].height + var height = _content[0] ? _content[0].height : 0 return height < label.height ? Qt.AlignVCenter : Qt.AlignTop } Layout.maximumWidth: FormGroupStyle.content.width - Layout.preferredHeight: _content[0].height + Layout.preferredHeight: _content[0] ? _content[0].height : 0 Layout.preferredWidth: FormGroupStyle.content.width } } diff --git a/linphone-desktop/ui/views/App/Settings/SettingsNetwork.qml b/linphone-desktop/ui/views/App/Settings/SettingsNetwork.qml index ef2eb4e5c..014719edb 100644 --- a/linphone-desktop/ui/views/App/Settings/SettingsNetwork.qml +++ b/linphone-desktop/ui/views/App/Settings/SettingsNetwork.qml @@ -54,5 +54,73 @@ TabContainer { // Network protocol and ports. // ------------------------------------------------------------------------- + Form { + title: qsTr('networkProtocolAndPortsTitle') + width: parent.width + + FormLine { + + } + } + + // ------------------------------------------------------------------------- + // NAT and Firewall. + // ------------------------------------------------------------------------- + + Form { + title: qsTr('natAndFirewallTitle') + width: parent.width + + FormLine { + FormGroup { + label: qsTr('enableIceLabel') + + Switch { + id: enableIce + } + } + + FormGroup { + label: qsTr('stunServerLabel') + + TextField { + readOnly: !enableIce.checked + } + } + } + + FormLine { + FormGroup { + label: qsTr('enableTurnLabel') + + Switch { + id: enableTurn + } + } + + FormGroup { + label: qsTr('turnUserLabel') + + TextField { + readOnly: !enableTurn.checked + } + } + } + + FormLine { + FormGroup { + label: '' + } + + FormGroup { + label: qsTr('turnPasswordLabel') + + TextField { + echoMode: TextInput.Password + readOnly: !enableTurn.checked + } + } + } + } } }