Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-uwp
Commits
1ba34442
Commit
1ba34442
authored
Oct 30, 2016
by
Nicolas Jager
Browse files
fix : wizzard create account with good credentials
Change-Id: Ie64dd640cea11876575e3e9fad4d0e4f88973818 Tuleap: #1283
parent
e46fd0d9
Changes
5
Show whitespace changes
Inline
Side-by-side
RingD.cpp
View file @
1ba34442
...
...
@@ -354,6 +354,13 @@ void RingClientUWP::RingD::deleteAccount(String ^ accountId)
tasksList_
.
push
(
task
);
}
void
RingClientUWP
::
RingD
::
registerThisDevice
(
String
^
pin
,
String
^
archivePassword
)
{
tasksList_
.
push
(
ref
new
RingD
::
Task
(
Request
::
RegisterDevice
,
pin
,
archivePassword
));
archivePassword
=
""
;
pin
=
""
;
}
void
RingClientUWP
::
RingD
::
startDaemon
()
{
...
...
@@ -649,13 +656,8 @@ RingClientUWP::RingD::startDaemon()
else
{
switch
(
_startingStatus
)
{
case
StartingStatus
::
REGISTERING_ON_THIS_PC
:
{
tasksList_
.
push
(
ref
new
RingD
::
Task
(
Request
::
AddRingAccount
));
break
;
}
case
StartingStatus
::
REGISTERING_THIS_DEVICE
:
{
tasksList_
.
push
(
ref
new
RingD
::
Task
(
Request
::
RegisterDevice
,
_pin
,
_password
));
break
;
}
case
StartingStatus
::
NORMAL
:
...
...
@@ -771,8 +773,8 @@ RingD::dequeueTasks()
break
;
case
Request
::
RegisterDevice
:
{
auto
pin
=
Utils
::
toString
(
_pin
);
auto
password
=
Utils
::
toString
(
_password
);
auto
pin
=
Utils
::
toString
(
task
->
_pin
);
auto
password
=
Utils
::
toString
(
task
->
_password
);
std
::
map
<
std
::
string
,
std
::
string
>
deviceDetails
;
deviceDetails
.
insert
(
std
::
make_pair
(
DRing
::
Account
::
ConfProperties
::
TYPE
,
"RING"
));
...
...
RingD.h
View file @
1ba34442
...
...
@@ -61,8 +61,6 @@ public:
}
}
property
StartingStatus
_startingStatus
;
property
String
^
_pin
;
// you should RM ME
property
String
^
_password
;
// refatco : think a little... RM ME
void
cancelOutGoingCall2
(
String
^
callId
);
// marche
...
...
@@ -100,10 +98,9 @@ internal:
void
eraseCacheFolder
();
void
updateAccount
(
String
^
accountId
);
void
deleteAccount
(
String
^
accountId
);
void
registerThisDevice
(
String
^
pin
,
String
^
archivePassword
);
/* TODO : move members */
///bool hasConfig; // replaced by startingStatus
std
::
string
accountName
;
// YOU SHOULD RM ME
String
^
currentCallId
;
// to save ongoing call id during visibility change
/* events */
...
...
Wizard.xaml
View file @
1ba34442
...
...
@@ -54,9 +54,13 @@
<TextBox x:Name="_aliasTextBox_"
Margin="10"
PlaceholderText="Enter your username"/>
<PasswordBox Margin="10"
<PasswordBox x:Name="_password_"
Margin="10"
PasswordChanged="validatePassword"
PlaceholderText="Enter your password"/>
<PasswordBox Margin="10,10,10,20"
<PasswordBox x:Name="_passwordCheck_"
Margin="10,10,10,20"
PasswordChanged="validatePassword"
PlaceholderText="Repeat your Password"/>
</StackPanel>
<!-- SIP account. -->
...
...
@@ -81,6 +85,7 @@
VerticalAlignment="Center"
HorizontalAlignment="Center"
Content=""
IsEnabled="False"
Click="_createAccountYes__Click"
Style="{StaticResource ButtonStyle2}"/>
</StackPanel>
...
...
Wizard.xaml.cpp
View file @
1ba34442
...
...
@@ -32,14 +32,12 @@ void
Wizard
::
_createAccountYes__Click
(
Object
^
sender
,
RoutedEventArgs
^
e
)
{
auto
alias
=
_aliasTextBox_
->
Text
;
if
(
alias
->
IsEmpty
())
alias
=
"windows user"
;
std
::
wstring
wstr
(
alias
->
Begin
());
std
::
string
str
(
wstr
.
begin
(),
wstr
.
end
());
RingD
::
instance
->
_startingStatus
=
StartingStatus
::
REGISTERING_ON_THIS_PC
;
RingD
::
instance
->
accountName
=
std
::
string
(
wstr
.
begin
(),
wstr
.
end
());
this
->
Dispatcher
->
RunAsync
(
Windows
::
UI
::
Core
::
CoreDispatcherPriority
::
High
,
ref
new
Windows
::
UI
::
Core
::
DispatchedHandler
([
this
]
()
{
this
->
Frame
->
Navigate
(
Windows
::
UI
::
Xaml
::
Interop
::
TypeName
(
RingClientUWP
::
MainPage
::
typeid
));
RingD
::
instance
->
createRINGAccount
(
_aliasTextBox_
->
Text
,
_password_
->
Password
,
true
);
_password_
->
Password
=
""
;
}));
}
...
...
@@ -118,11 +116,21 @@ Wizard::_avatarWebcamCaptureBtn__Click(Platform::Object^ sender, Windows::UI::Xa
void
RingClientUWP
::
Views
::
Wizard
::
_addAccountYes__Click
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
RoutedEventArgs
^
e
)
{
RingD
::
instance
->
_pin
=
_PINTextBox_
->
Text
;
RingD
::
instance
->
_password
=
_ArchivePassword_
->
Password
;
RingD
::
instance
->
_startingStatus
=
StartingStatus
::
REGISTERING_THIS_DEVICE
;
this
->
Dispatcher
->
RunAsync
(
Windows
::
UI
::
Core
::
CoreDispatcherPriority
::
Normal
,
ref
new
Windows
::
UI
::
Core
::
DispatchedHandler
([
this
]()
{
this
->
Frame
->
Navigate
(
Windows
::
UI
::
Xaml
::
Interop
::
TypeName
(
RingClientUWP
::
MainPage
::
typeid
));
RingD
::
instance
->
registerThisDevice
(
_PINTextBox_
->
Text
,
_ArchivePassword_
->
Password
);
_ArchivePassword_
->
Password
=
""
;
_PINTextBox_
->
Text
=
""
;
}));
}
void
RingClientUWP
::
Views
::
Wizard
::
validatePassword
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
RoutedEventArgs
^
e
)
{
_createAccountYes_
->
IsEnabled
=
(
_password_
->
Password
==
_passwordCheck_
->
Password
&&
_password_
->
Password
->
Length
()
>
0
)
?
true
:
false
;
}
Wizard.xaml.h
View file @
1ba34442
...
...
@@ -17,6 +17,7 @@ private:
void
_showAddAccountMenuBtn__Click
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
RoutedEventArgs
^
e
);
void
_avatarWebcamCaptureBtn__Click
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
RoutedEventArgs
^
e
);
void
_addAccountYes__Click
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
RoutedEventArgs
^
e
);
void
validatePassword
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
RoutedEventArgs
^
e
);
};
}
...
...
Write
Preview
Supports
Markdown
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