Commit f80b563c authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/InviteFriends): open url externally

parent 28cf495a
...@@ -433,6 +433,14 @@ Server url not configured.</translation> ...@@ -433,6 +433,14 @@ Server url not configured.</translation>
<source>inviteFriendsTitle</source> <source>inviteFriendsTitle</source>
<translation>Linphone - Invite Friends</translation> <translation>Linphone - Invite Friends</translation>
</message> </message>
<message>
<source>defaultMessage</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>defaultSubject</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MainWindow</name> <name>MainWindow</name>
......
...@@ -432,6 +432,14 @@ Url du serveur non configurée.</translation> ...@@ -432,6 +432,14 @@ Url du serveur non configurée.</translation>
<source>inviteFriendsTitle</source> <source>inviteFriendsTitle</source>
<translation>Linphone - Inviter des amis</translation> <translation>Linphone - Inviter des amis</translation>
</message> </message>
<message>
<source>defaultMessage</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>defaultSubject</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MainWindow</name> <name>MainWindow</name>
......
...@@ -18,7 +18,15 @@ DialogPlus { ...@@ -18,7 +18,15 @@ DialogPlus {
enabled: email.length && message.length enabled: email.length && message.length
text: qsTr('confirm') text: qsTr('confirm')
onClicked: exit(0) onClicked: {
Qt.openUrlExternally(
'mailto:' + encodeURIComponent(email.text) +
'?subject=' + encodeURIComponent(qsTr('defaultSubject')) +
'&body=' + encodeURIComponent(message.text)
)
exit(0)
}
} }
] ]
...@@ -61,6 +69,7 @@ DialogPlus { ...@@ -61,6 +69,7 @@ DialogPlus {
TextField { TextField {
id: email id: email
inputMethodHints: Qt.ImhEmailCharactersOnly
width: parent.width width: parent.width
} }
} }
...@@ -87,6 +96,8 @@ DialogPlus { ...@@ -87,6 +96,8 @@ DialogPlus {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr('defaultMessage')
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment