Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
17efccd5
Commit
17efccd5
authored
May 30, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Calls/ZrtpTokenAuthentication): coding style & refactoring
parent
9ccbd52d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
144 additions
and
106 deletions
+144
-106
en.ts
linphone-desktop/assets/languages/en.ts
+7
-7
fr.ts
linphone-desktop/assets/languages/fr.ts
+8
-8
Incall.js
linphone-desktop/ui/views/App/Calls/Incall.js
+1
-1
Incall.qml
linphone-desktop/ui/views/App/Calls/Incall.qml
+11
-0
ZrtpTokenAuthentication.qml
...ne-desktop/ui/views/App/Calls/ZrtpTokenAuthentication.qml
+108
-87
CallStyle.qml
linphone-desktop/ui/views/App/Styles/Calls/CallStyle.qml
+9
-3
No files found.
linphone-desktop/assets/languages/en.ts
View file @
17efccd5
...
@@ -833,7 +833,7 @@ your friend's SIP address or username.</translation>
...
@@ -833,7 +833,7 @@ your friend's SIP address or username.</translation>
<
name
>
MessageMenu
<
/name
>
<
name
>
MessageMenu
<
/name
>
<
message
>
<
message
>
<
source
>
copy
<
/source
>
<
source
>
copy
<
/source
>
<
translation
type
=
"
unfinished
"
>
<
/translation
>
<
translation
>
Copy
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -1362,23 +1362,23 @@ your friend's SIP address or username.</translation>
...
@@ -1362,23 +1362,23 @@ your friend's SIP address or username.</translation>
<
context
>
<
context
>
<
name
>
ZrtpTokenAuthentication
<
/name
>
<
name
>
ZrtpTokenAuthentication
<
/name
>
<
message
>
<
message
>
<
source
>
Confirm
the
following
SAS
with
peer
:
<
/source
>
<
source
>
confirmSas
<
/source
>
<
translation
>
Confirm
the
following
SAS
with
peer
:
<
/translation
>
<
translation
>
Confirm
the
following
SAS
with
peer
.
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Say
:
<
/source
>
<
source
>
codeA
<
/source
>
<
translation
>
Say
:
<
/translation
>
<
translation
>
Say
:
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Your
correspondent
should
say
:
<
/source
>
<
source
>
codeB
<
/source
>
<
translation
>
Your
correspondent
should
say
:
<
/translation
>
<
translation
>
Your
correspondent
should
say
:
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
D
eny
<
/source
>
<
source
>
d
eny
<
/source
>
<
translation
>
DENY
<
/translation
>
<
translation
>
DENY
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
A
ccept
<
/source
>
<
source
>
a
ccept
<
/source
>
<
translation
>
ACCEPT
<
/translation
>
<
translation
>
ACCEPT
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
17efccd5
...
@@ -1361,24 +1361,24 @@ un chat ou ajouter un contact.</translation>
...
@@ -1361,24 +1361,24 @@ un chat ou ajouter un contact.</translation>
<
context
>
<
context
>
<
name
>
ZrtpTokenAuthentication
<
/name
>
<
name
>
ZrtpTokenAuthentication
<
/name
>
<
message
>
<
message
>
<
source
>
Confirm
the
following
SAS
with
peer
:
<
/source
>
<
source
>
confirmSas
<
/source
>
<
translation
>
Confirmez
le
SAS
suivant
avec
votre
interlocuteur
:
<
/translation
>
<
translation
>
Confirmez
le
SAS
suivant
avec
votre
interlocuteur
.
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Say
:
<
/source
>
<
source
>
codeA
<
/source
>
<
translation
>
Dites
:
<
/translation
>
<
translation
>
Dites
:
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Your
correspondent
should
say
:
<
/source
>
<
source
>
codeB
<
/source
>
<
translation
>
Votre
interlocuteur
devrait
dire
:
<
/translation
>
<
translation
>
Votre
interlocuteur
devrait
dire
:
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
D
eny
<
/source
>
<
source
>
d
eny
<
/source
>
<
translation
>
RE
JET
ER
<
/translation
>
<
translation
>
RE
FUS
ER
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
A
ccept
<
/source
>
<
source
>
a
ccept
<
/source
>
<
translation
>
VALID
ER
<
/translation
>
<
translation
>
ACCEPT
ER
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
/TS
>
<
/TS
>
linphone-desktop/ui/views/App/Calls/Incall.js
View file @
17efccd5
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
// =============================================================================
// =============================================================================
function
computeAvatarSize
(
maxSize
)
{
function
computeAvatarSize
(
maxSize
)
{
var
height
=
zrtp
.
visible
?
container
.
height
-
zrtp
.
height
:
container
.
height
var
height
=
container
.
height
var
width
=
container
.
width
var
width
=
container
.
width
var
size
=
height
<
maxSize
&&
height
>
0
?
height
:
maxSize
var
size
=
height
<
maxSize
&&
height
>
0
?
height
:
maxSize
...
...
linphone-desktop/ui/views/App/Calls/Incall.qml
View file @
17efccd5
...
@@ -249,8 +249,19 @@ Rectangle {
...
@@ -249,8 +249,19 @@ Rectangle {
}
}
}
}
// -------------------------------------------------------------------------
// Zrtp.
// -------------------------------------------------------------------------
ZrtpTokenAuthentication
{
ZrtpTokenAuthentication
{
id
:
zrtp
id
:
zrtp
Layout.fillWidth
:
true
Layout.margins
:
CallStyle
.
container
.
margins
Layout.preferredHeight
:
CallStyle
.
zrtpArea
.
height
call
:
incall
.
call
z
:
Constants
.
zPopup
}
}
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
...
...
linphone-desktop/ui/views/App/Calls/ZrtpTokenAuthentication.qml
View file @
17efccd5
import
QtQuick
2.7
import
QtQuick
2.7
import
QtQuick
.
Controls
2.1
import
QtQuick
.
Layouts
1.3
import
QtQuick
.
Layouts
1.3
import
Common
1.0
import
Common
1.0
import
Common
.
Styles
1.0
import
Linphone
1.0
import
LinphoneUtils
1.0
import
Utils
1.0
import
App
.
Styles
1.0
import
App
.
Styles
1.0
Item
{
// =============================================================================
height
:
CallStyle
.
zrtpArea
.
height
ColumnLayout
{
id
:
zrtp
// ---------------------------------------------------------------------------
property
var
call
// ---------------------------------------------------------------------------
visible
:
false
visible
:
false
Layout.fillWidth
:
true
anchors.top
:
container
.
bottom
Layout.margins
:
CallStyle
.
container
.
margins
GridLayout
{
// ---------------------------------------------------------------------------
anchors.centerIn
:
parent
// Main text.
columns
:
1
// ---------------------------------------------------------------------------
Text
{
Text
{
Layout.fillWidth
:
true
Layout.fillWidth
:
true
anchors.horizontalCenter
:
parent
.
horizontalCenter
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
verticalAlignment
:
Text
.
AlignVCenter
text
:
qsTr
(
"
Confirm the following SAS with peer:
"
)
text
:
qsTr
(
'
confirmSas
'
)
color
:
CallStyle
.
zrtpArea
.
text
.
colorA
elide
:
Text
.
ElideRight
elide
:
Text
.
ElideRight
font.pointSize
:
CallStyle
.
zrtpArea
.
fontSize
font.bold
:
true
font
{
color
:
Colors
.
j
bold
:
true
pointSize
:
CallStyle
.
zrtpArea
.
text
.
fontSize
}
}
}
RowLayout
{
// ---------------------------------------------------------------------------
anchors.horizontalCenter
:
parent
.
horizontalCenter
// Rules.
spacing
:
CallStyle
.
zrtpArea
.
vu
.
spacing
// ---------------------------------------------------------------------------
Layout.fillWidth
:
true
Row
{
Layout.alignment
:
Qt
.
AlignHCenter
spacing
:
CallStyle
.
zrtpArea
.
text
.
wordsSpacing
Text
{
Text
{
text
:
qsTr
(
"
Say:
"
)
color
:
CallStyle
.
zrtpArea
.
text
.
colorA
font.pointSize
:
CallStyle
.
zrtpArea
.
fontSize
font.pointSize
:
CallStyle
.
zrtpArea
.
text
.
fontSize
color
:
Colors
.
j
text
:
qsTr
(
'
codeA
'
)
}
}
Text
{
Text
{
text
:
incall
.
call
.
localSAS
color
:
CallStyle
.
zrtpArea
.
text
.
colorB
font.pointSize
:
CallStyle
.
zrtpArea
.
fontSize
font.bold
:
true
font
{
color
:
Colors
.
i
bold
:
true
pointSize
:
CallStyle
.
zrtpArea
.
text
.
fontSize
}
text
:
zrtp
.
call
.
localSAS
}
}
Text
{
Text
{
text
:
"
-
"
color
:
CallStyle
.
zrtpArea
.
text
.
colorA
font.pointSize
:
CallStyle
.
zrtpArea
.
fontSize
font.pointSize
:
CallStyle
.
zrtpArea
.
text
.
fontSize
color
:
Colors
.
j
text
:
'
-
'
}
}
Text
{
Text
{
text
:
qsTr
(
"
Your correspondent should say:
"
)
color
:
CallStyle
.
zrtpArea
.
text
.
colorA
font.pointSize
:
CallStyle
.
zrtpArea
.
fontSize
font.pointSize
:
CallStyle
.
zrtpArea
.
text
.
fontSize
color
:
Colors
.
j
text
:
qsTr
(
'
codeB
'
)
}
}
Text
{
Text
{
text
:
incall
.
call
.
remoteSAS
color
:
CallStyle
.
zrtpArea
.
text
.
colorB
font.pointSize
:
CallStyle
.
zrtpArea
.
fontSize
font.bold
:
true
font
{
color
:
Colors
.
i
bold
:
true
pointSize
:
CallStyle
.
zrtpArea
.
text
.
fontSize
}
text
:
zrtp
.
call
.
remoteSAS
}
}
}
}
RowLayout
{
// ---------------------------------------------------------------------------
anchors.horizontalCenter
:
parent
.
horizontalCenter
// Buttons.
spacing
:
CallStyle
.
zrtpArea
.
vu
.
spacing
// ---------------------------------------------------------------------------
Layout.fillWidth
:
true
Row
{
Layout.alignment
:
Qt
.
AlignHCenter
spacing
:
CallStyle
.
zrtpArea
.
buttons
.
spacing
TextButtonA
{
TextButtonA
{
text
:
qsTr
(
'
D
eny
'
)
text
:
qsTr
(
'
d
eny
'
)
onClicked
:
{
onClicked
:
{
zrtp
.
visible
=
false
zrtp
.
visible
=
false
incall
.
call
.
verifyAuthenticationToken
(
false
)
zrtp
.
call
.
verifyAuthenticationToken
(
false
)
}
}
}
}
TextButtonB
{
TextButtonB
{
text
:
qsTr
(
'
A
ccept
'
)
text
:
qsTr
(
'
a
ccept
'
)
onClicked
:
{
onClicked
:
{
zrtp
.
visible
=
false
zrtp
.
visible
=
false
incall
.
call
.
verifyAuthenticationToken
(
true
)
zrtp
.
call
.
verifyAuthenticationToken
(
true
)
}
}
}
}
}
}
}
...
...
linphone-desktop/ui/views/App/Styles/Calls/CallStyle.qml
View file @
17efccd5
...
@@ -79,10 +79,16 @@ QtObject {
...
@@ -79,10 +79,16 @@ QtObject {
property
QtObject
zrtpArea
:
QtObject
{
property
QtObject
zrtpArea
:
QtObject
{
property
int
height
:
50
property
int
height
:
50
property
int
fontSize
:
12
property
QtObject
vu
:
QtObject
{
property
QtObject
buttons
:
QtObject
{
property
int
spacing
:
5
property
int
spacing
:
10
}
property
QtObject
text
:
QtObject
{
property
color
colorA
:
Colors
.
j
property
color
colorB
:
Colors
.
i
property
int
fontSize
:
12
property
int
wordsSpacing
:
5
}
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment