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
a9607f6a
Commit
a9607f6a
authored
Jun 01, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Main/Assistant): supports activation on phone number
parent
d301a906
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
167 additions
and
69 deletions
+167
-69
en.ts
linphone-desktop/assets/languages/en.ts
+16
-1
fr.ts
linphone-desktop/assets/languages/fr.ts
+16
-1
resources.qrc
linphone-desktop/resources.qrc
+2
-0
AssistantModel.cpp
linphone-desktop/src/components/assistant/AssistantModel.cpp
+11
-36
AssistantModel.hpp
linphone-desktop/src/components/assistant/AssistantModel.hpp
+5
-0
ActivateLinphoneSipAccountWithPhoneNumber.qml
...n/Assistant/ActivateLinphoneSipAccountWithPhoneNumber.qml
+70
-0
ActivateLinphoneSipAccountWithPhoneNumberStyle.qml
...istant/ActivateLinphoneSipAccountWithPhoneNumberStyle.qml
+15
-0
qmldir
linphone-desktop/ui/views/App/Styles/qmldir
+32
-31
No files found.
linphone-desktop/assets/languages/en.ts
View file @
a9607f6a
...
@@ -23,6 +23,21 @@
...
@@ -23,6 +23,21 @@
<
translation
>
To
activate
your
account
:
Follow
the
instructions
that
we
sent
you
at
%
1
,
then
click
on
the
button
below
.
<
/translation
>
<
translation
>
To
activate
your
account
:
Follow
the
instructions
that
we
sent
you
at
%
1
,
then
click
on
the
button
below
.
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
name
>
ActivateLinphoneSipAccountWithPhoneNumber
<
/name
>
<
message
>
<
source
>
activateLinphoneSipAccount
<
/source
>
<
translation
>
CREATE
A
LINPHONE
ACCOUNT
<
/translation
>
<
/message
>
<
message
>
<
source
>
confirmAction
<
/source
>
<
translation
>
ACTIVATE
<
/translation
>
<
/message
>
<
message
>
<
source
>
activationSteps
<
/source
>
<
translation
>
We
have
sent
a
SMS
with
a
validation
code
to
%
1
.
To
complete
your
phone
number
verification
,
please
enter
the
4
-
digits
code
below
.
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
context
>
<
name
>
App
<
/name
>
<
name
>
App
<
/name
>
<
message
>
<
message
>
...
@@ -592,7 +607,7 @@ Server url not configured.</translation>
...
@@ -592,7 +607,7 @@ Server url not configured.</translation>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
quitWarning
<
/source
>
<
source
>
quitWarning
<
/source
>
<
translation
>
Your
account
has
been
created
but
is
not
yet
validated
.
If
you
quit
this
view
,
you
should
add
manually
your
account
and
validate
it
within
24
hours
.
<
/translation
>
<
translation
>
Your
account
has
been
created
but
is
not
yet
validated
.
Are
you
sure
you
want
to
quit
this
view
?
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
displayNameLabel
<
/source
>
<
source
>
displayNameLabel
<
/source
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
a9607f6a
...
@@ -23,6 +23,21 @@
...
@@ -23,6 +23,21 @@
<
translation
>
Pour
activer
votre
compte
:
Suivez
les
instructions
que
vous
avez
re
ç
ues
à
%
1
,
puis
cliquez
sur
le
bouton
plus
bas
.
<
/translation
>
<
translation
>
Pour
activer
votre
compte
:
Suivez
les
instructions
que
vous
avez
re
ç
ues
à
%
1
,
puis
cliquez
sur
le
bouton
plus
bas
.
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
name
>
ActivateLinphoneSipAccountWithPhoneNumber
<
/name
>
<
message
>
<
source
>
activateLinphoneSipAccount
<
/source
>
<
translation
>
CR
É
ER
UN
COMPTE
LINPHONE
<
/translation
>
<
/message
>
<
message
>
<
source
>
confirmAction
<
/source
>
<
translation
>
ACTIVER
<
/translation
>
<
/message
>
<
message
>
<
source
>
activationSteps
<
/source
>
<
translation
>
Nous
vous
avons
envoy
é
un
SMS
avec
un
code
de
validation
au
%
1
.
Pour
compl
é
ter
la
v
é
rification
de
votre
t
é
l
.,
merci
d
&
apos
;
entrer
le
code
à
4
chiffres
ci
-
dessous
.
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
context
>
<
name
>
App
<
/name
>
<
name
>
App
<
/name
>
<
message
>
<
message
>
...
@@ -592,7 +607,7 @@ Url du serveur non configurée.</translation>
...
@@ -592,7 +607,7 @@ Url du serveur non configurée.</translation>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
quitWarning
<
/source
>
<
source
>
quitWarning
<
/source
>
<
translation
>
Votre
compte
a
é
t
é
cr
é
e
mais
il
n
&
apos
;
a
pas
é
t
é
valid
é
.
Si
vous
quittez
cette
vue
,
vous
devrez
ajouter
manuellement
votre
compte
et
le
valider
dans
les
24
heures
.
<
/translation
>
<
translation
>
Votre
compte
a
é
t
é
cr
é
e
mais
il
n
&
apos
;
a
pas
é
t
é
valid
é
.
Ê
tes
-
vous
s
û
r
de
vouloir
quitter
cette
vue
?
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
displayNameLabel
<
/source
>
<
source
>
displayNameLabel
<
/source
>
...
...
linphone-desktop/resources.qrc
View file @
a9607f6a
...
@@ -377,6 +377,7 @@
...
@@ -377,6 +377,7 @@
<file>
ui/views/App/Calls/OutgoingCall.qml
</file>
<file>
ui/views/App/Calls/OutgoingCall.qml
</file>
<file>
ui/views/App/Calls/ZrtpTokenAuthentication.qml
</file>
<file>
ui/views/App/Calls/ZrtpTokenAuthentication.qml
</file>
<file>
ui/views/App/Main/Assistant/ActivateLinphoneSipAccountWithEmail.qml
</file>
<file>
ui/views/App/Main/Assistant/ActivateLinphoneSipAccountWithEmail.qml
</file>
<file>
ui/views/App/Main/Assistant/ActivateLinphoneSipAccountWithPhoneNumber.qml
</file>
<file>
ui/views/App/Main/Assistant/AssistantAbstractView.qml
</file>
<file>
ui/views/App/Main/Assistant/AssistantAbstractView.qml
</file>
<file>
ui/views/App/Main/Assistant/AssistantHome.qml
</file>
<file>
ui/views/App/Main/Assistant/AssistantHome.qml
</file>
<file>
ui/views/App/Main/Assistant/CreateLinphoneSipAccount.qml
</file>
<file>
ui/views/App/Main/Assistant/CreateLinphoneSipAccount.qml
</file>
...
@@ -422,6 +423,7 @@
...
@@ -422,6 +423,7 @@
<file>
ui/views/App/Styles/Calls/Dialogs/CallTransferStyle.qml
</file>
<file>
ui/views/App/Styles/Calls/Dialogs/CallTransferStyle.qml
</file>
<file>
ui/views/App/Styles/Calls/Dialogs/ConferenceManagerStyle.qml
</file>
<file>
ui/views/App/Styles/Calls/Dialogs/ConferenceManagerStyle.qml
</file>
<file>
ui/views/App/Styles/Main/Assistant/ActivateLinphoneSipAccountWithEmailStyle.qml
</file>
<file>
ui/views/App/Styles/Main/Assistant/ActivateLinphoneSipAccountWithEmailStyle.qml
</file>
<file>
ui/views/App/Styles/Main/Assistant/ActivateLinphoneSipAccountWithPhoneNumberStyle.qml
</file>
<file>
ui/views/App/Styles/Main/Assistant/AssistantAbstractViewStyle.qml
</file>
<file>
ui/views/App/Styles/Main/Assistant/AssistantAbstractViewStyle.qml
</file>
<file>
ui/views/App/Styles/Main/Assistant/AssistantHomeStyle.qml
</file>
<file>
ui/views/App/Styles/Main/Assistant/AssistantHomeStyle.qml
</file>
<file>
ui/views/App/Styles/Main/Assistant/CreateLinphoneSipAccountStyle.qml
</file>
<file>
ui/views/App/Styles/Main/Assistant/CreateLinphoneSipAccountStyle.qml
</file>
...
...
linphone-desktop/src/components/assistant/AssistantModel.cpp
View file @
a9607f6a
...
@@ -110,42 +110,6 @@ private:
...
@@ -110,42 +110,6 @@ private:
}
}
}
}
// void onLinkAccount (
// const shared_ptr<linphone::AccountCreator> &creator,
// linphone::AccountCreatorStatus status,
// const string &resp
// ) override {}
//
// void onActivateAlias (
// const shared_ptr<linphone::AccountCreator> &creator,
// linphone::AccountCreatorStatus status,
// const string &resp
// ) override {}
//
// void onIsAliasUsed (
// const shared_ptr<linphone::AccountCreator> &creator,
// linphone::AccountCreatorStatus status,
// const string &resp
// ) override {}
//
// void onIsAccountLinked (
// const shared_ptr<linphone::AccountCreator> &creator,
// linphone::AccountCreatorStatus status,
// const string &resp
// ) override {}
//
// void onRecoverAccount (
// const shared_ptr<linphone::AccountCreator> &creator,
// linphone::AccountCreatorStatus status,
// const string &resp
// ) override {}
//
// void onUpdateAccount (
// const shared_ptr<linphone::AccountCreator> &creator,
// linphone::AccountCreatorStatus status,
// const string &resp
// ) override {}
private:
private:
AssistantModel
*
mAssistant
;
AssistantModel
*
mAssistant
;
};
};
...
@@ -320,6 +284,17 @@ void AssistantModel::setDisplayName (const QString &displayName) {
...
@@ -320,6 +284,17 @@ void AssistantModel::setDisplayName (const QString &displayName) {
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
QString
AssistantModel
::
getActivationCode
()
const
{
return
::
Utils
::
coreStringToAppString
(
mAccountCreator
->
getActivationCode
());
}
void
AssistantModel
::
setActivationCode
(
const
QString
&
activationCode
)
{
mAccountCreator
->
setActivationCode
(
::
Utils
::
appStringToCoreString
(
activationCode
));
emit
activationCodeChanged
(
activationCode
);
}
// -----------------------------------------------------------------------------
QString
AssistantModel
::
getConfigFilename
()
const
{
QString
AssistantModel
::
getConfigFilename
()
const
{
return
mConfigFilename
;
return
mConfigFilename
;
}
}
...
...
linphone-desktop/src/components/assistant/AssistantModel.hpp
View file @
a9607f6a
...
@@ -39,6 +39,7 @@ class AssistantModel : public QObject {
...
@@ -39,6 +39,7 @@ class AssistantModel : public QObject {
Q_PROPERTY
(
QString
phoneNumber
READ
getPhoneNumber
WRITE
setPhoneNumber
NOTIFY
phoneNumberChanged
);
Q_PROPERTY
(
QString
phoneNumber
READ
getPhoneNumber
WRITE
setPhoneNumber
NOTIFY
phoneNumberChanged
);
Q_PROPERTY
(
QString
username
READ
getUsername
WRITE
setUsername
NOTIFY
usernameChanged
);
Q_PROPERTY
(
QString
username
READ
getUsername
WRITE
setUsername
NOTIFY
usernameChanged
);
Q_PROPERTY
(
QString
displayName
READ
getDisplayName
WRITE
setDisplayName
NOTIFY
displayNameChanged
);
Q_PROPERTY
(
QString
displayName
READ
getDisplayName
WRITE
setDisplayName
NOTIFY
displayNameChanged
);
Q_PROPERTY
(
QString
activationCode
READ
getActivationCode
WRITE
setActivationCode
NOTIFY
activationCodeChanged
);
Q_PROPERTY
(
QString
configFilename
READ
getConfigFilename
WRITE
setConfigFilename
NOTIFY
configFilenameChanged
);
Q_PROPERTY
(
QString
configFilename
READ
getConfigFilename
WRITE
setConfigFilename
NOTIFY
configFilenameChanged
);
public:
public:
...
@@ -57,6 +58,7 @@ signals:
...
@@ -57,6 +58,7 @@ signals:
void
phoneNumberChanged
(
const
QString
&
phoneNumber
,
const
QString
&
error
);
void
phoneNumberChanged
(
const
QString
&
phoneNumber
,
const
QString
&
error
);
void
usernameChanged
(
const
QString
&
username
,
const
QString
&
error
);
void
usernameChanged
(
const
QString
&
username
,
const
QString
&
error
);
void
displayNameChanged
(
const
QString
&
displayName
,
const
QString
&
error
);
void
displayNameChanged
(
const
QString
&
displayName
,
const
QString
&
error
);
void
activationCodeChanged
(
const
QString
&
activationCode
);
void
activateStatusChanged
(
const
QString
&
error
);
void
activateStatusChanged
(
const
QString
&
error
);
void
createStatusChanged
(
const
QString
&
error
);
void
createStatusChanged
(
const
QString
&
error
);
...
@@ -83,6 +85,9 @@ private:
...
@@ -83,6 +85,9 @@ private:
QString
getDisplayName
()
const
;
QString
getDisplayName
()
const
;
void
setDisplayName
(
const
QString
&
displayName
);
void
setDisplayName
(
const
QString
&
displayName
);
QString
getActivationCode
()
const
;
void
setActivationCode
(
const
QString
&
activationCode
);
QString
getConfigFilename
()
const
;
QString
getConfigFilename
()
const
;
void
setConfigFilename
(
const
QString
&
configFilename
);
void
setConfigFilename
(
const
QString
&
configFilename
);
...
...
linphone-desktop/ui/views/App/Main/Assistant/ActivateLinphoneSipAccountWithPhoneNumber.qml
0 → 100644
View file @
a9607f6a
import
QtQuick
2.7
import
Common
1.0
import
Linphone
1.0
import
App
.
Styles
1.0
// =============================================================================
AssistantAbstractView
{
property
var
assistantModel
backEnabled
:
false
title
:
qsTr
(
'
activateLinphoneSipAccount
'
)
mainAction
:
requestBlock
.
execute
mainActionEnabled
:
activationCode
.
length
===
4
&&
!
requestBlock
.
loading
mainActionLabel
:
qsTr
(
'
confirmAction
'
)
Column
{
anchors.centerIn
:
parent
spacing
:
ActivateLinphoneSipAccountWithPhoneNumberStyle
.
spacing
width
:
parent
.
width
Text
{
color
:
ActivateLinphoneSipAccountWithPhoneNumberStyle
.
activationSteps
.
color
font.pointSize
:
ActivateLinphoneSipAccountWithPhoneNumberStyle
.
activationSteps
.
fontSize
horizontalAlignment
:
Text
.
AlignHCenter
text
:
qsTr
(
'
activationSteps
'
).
replace
(
'
%1
'
,
assistantModel
.
phoneNumber
)
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
}
TextField
{
id
:
activationCode
anchors.horizontalCenter
:
parent
.
horizontalCenter
validator
:
IntValidator
{
bottom
:
0
top
:
9999
}
onTextChanged
:
assistantModel
.
activationCode
=
text
}
RequestBlock
{
id
:
requestBlock
action
:
assistantModel
.
activate
width
:
parent
.
width
}
}
// ---------------------------------------------------------------------------
// Assistant.
// ---------------------------------------------------------------------------
Connections
{
target
:
assistantModel
onActivateStatusChanged
:
{
requestBlock
.
stop
(
error
)
if
(
!
error
.
length
)
{
window
.
unlockView
()
window
.
setView
(
'
Home
'
)
}
}
}
}
linphone-desktop/ui/views/App/Styles/Main/Assistant/ActivateLinphoneSipAccountWithPhoneNumberStyle.qml
0 → 100644
View file @
a9607f6a
pragma
Singleton
import
QtQuick
2.7
import
Common
1.0
// =============================================================================
QtObject
{
property
int
spacing
:
20
property
QtObject
activationSteps
:
QtObject
{
property
color
color
:
Colors
.
g
property
int
fontSize
:
10
}
}
linphone-desktop/ui/views/App/Styles/qmldir
View file @
a9607f6a
...
@@ -12,6 +12,7 @@ singleton CallTransferStyle 1.0 Calls/Dialogs/CallTransfe
...
@@ -12,6 +12,7 @@ singleton CallTransferStyle 1.0 Calls/Dialogs/CallTransfe
singleton ConferenceManagerStyle 1.0 Calls/Dialogs/ConferenceManagerStyle.qml
singleton ConferenceManagerStyle 1.0 Calls/Dialogs/ConferenceManagerStyle.qml
singleton ActivateLinphoneSipAccountWithEmailStyle 1.0 Main/Assistant/ActivateLinphoneSipAccountWithEmailStyle.qml
singleton ActivateLinphoneSipAccountWithEmailStyle 1.0 Main/Assistant/ActivateLinphoneSipAccountWithEmailStyle.qml
singleton ActivateLinphoneSipAccountWithPhoneNumberStyle 1.0 Main/Assistant/ActivateLinphoneSipAccountWithPhoneNumberStyle.qml
singleton AssistantAbstractViewStyle 1.0 Main/Assistant/AssistantAbstractViewStyle.qml
singleton AssistantAbstractViewStyle 1.0 Main/Assistant/AssistantAbstractViewStyle.qml
singleton AssistantHomeStyle 1.0 Main/Assistant/AssistantHomeStyle.qml
singleton AssistantHomeStyle 1.0 Main/Assistant/AssistantHomeStyle.qml
singleton CreateLinphoneSipAccountStyle 1.0 Main/Assistant/CreateLinphoneSipAccountStyle.qml
singleton CreateLinphoneSipAccountStyle 1.0 Main/Assistant/CreateLinphoneSipAccountStyle.qml
...
...
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