Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cesium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin Bertrand
Cesium
Commits
1827a7f8
Commit
1827a7f8
authored
6 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
[fix] Assistant de création de compte > Message d'erreur furtif - FIX #715
parent
fa6617e4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
www/js/controllers/join-controllers.js
+22
-15
22 additions, 15 deletions
www/js/controllers/join-controllers.js
www/templates/join/modal_join_member.html
+44
-42
44 additions, 42 deletions
www/templates/join/modal_join_member.html
with
66 additions
and
57 deletions
www/js/controllers/join-controllers.js
+
22
−
15
View file @
1827a7f8
...
@@ -185,12 +185,16 @@ function JoinModalController($scope, $state, $interval, $timeout, Device, UIUtil
...
@@ -185,12 +185,16 @@ function JoinModalController($scope, $state, $interval, $timeout, Device, UIUtil
CryptoUtils
.
scryptKeypair
(
$scope
.
formData
.
username
,
$scope
.
formData
.
password
)
CryptoUtils
.
scryptKeypair
(
$scope
.
formData
.
username
,
$scope
.
formData
.
password
)
.
then
(
function
(
keypair
)
{
.
then
(
function
(
keypair
)
{
$scope
.
formData
.
pubkey
=
CryptoUtils
.
util
.
encode_base58
(
keypair
.
signPk
);
$scope
.
formData
.
pubkey
=
CryptoUtils
.
util
.
encode_base58
(
keypair
.
signPk
);
return
$scope
.
checkAccountAvailable
();
})
.
then
(
function
()
{
return
$timeout
(
function
(){
$scope
.
formData
.
computing
=
false
;
$scope
.
formData
.
computing
=
false
;
$scope
.
checkAccountAvailable
(
);
},
400
);
})
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
$scope
.
formData
.
computing
=
false
;
$scope
.
formData
.
pubkey
=
undefined
;
$scope
.
formData
.
pubkey
=
undefined
;
$scope
.
formData
.
computing
=
false
;
UIUtils
.
onError
(
'
ERROR.CRYPTO_UNKNOWN_ERROR
'
)(
err
);
UIUtils
.
onError
(
'
ERROR.CRYPTO_UNKNOWN_ERROR
'
)(
err
);
});
});
};
};
...
@@ -301,6 +305,11 @@ function JoinModalController($scope, $state, $interval, $timeout, Device, UIUtil
...
@@ -301,6 +305,11 @@ function JoinModalController($scope, $state, $interval, $timeout, Device, UIUtil
$scope
.
slideBehavior
=
$scope
.
computeSlideBehavior
();
$scope
.
slideBehavior
=
$scope
.
computeSlideBehavior
();
};
};
$scope
.
doPrev
=
function
()
{
$scope
.
slidePrev
();
$scope
.
slideBehavior
=
$scope
.
computeSlideBehavior
();
};
$scope
.
doNewAccount
=
function
(
confirm
)
{
$scope
.
doNewAccount
=
function
(
confirm
)
{
if
(
!
confirm
)
{
if
(
!
confirm
)
{
...
@@ -462,27 +471,25 @@ function JoinModalController($scope, $state, $interval, $timeout, Device, UIUtil
...
@@ -462,27 +471,25 @@ function JoinModalController($scope, $state, $interval, $timeout, Device, UIUtil
$scope
.
checkAccountAvailable
=
function
()
{
$scope
.
checkAccountAvailable
=
function
()
{
delete
$scope
.
accountAvailable
;
delete
$scope
.
accountAvailable
;
// Search for tx source, from pubkey
// Search for tx source, from pubkey
BMA
.
tx
.
sources
({
pubkey
:
$scope
.
formData
.
pubkey
})
return
BMA
.
tx
.
sources
({
pubkey
:
$scope
.
formData
.
pubkey
})
.
then
(
function
(
res
)
{
.
then
(
function
(
res
)
{
if
(
!
res
.
sources
.
length
)
{
$scope
.
accountAvailable
=
!
res
||
!
res
.
sources
.
length
;
$scope
.
formData
.
computing
=
false
;
$scope
.
accountAvailable
=
true
;
}
else
{
$scope
.
formData
.
computing
=
false
;
$scope
.
accountAvailable
=
false
;
}
})
})
.
catch
(
function
(
err
)
{
.
catch
(
function
(
err
)
{
console
.
error
(
err
);
console
.
error
(
err
);
$scope
.
formData
.
computing
=
false
;
$scope
.
accountAvailable
=
false
;
$scope
.
accountAvailable
=
false
;
});
});
};
};
$scope
.
identifierRecovery
=
function
()
{
$scope
.
identifierRecovery
=
function
()
{
for
(
var
i
=
0
;
i
<
2
;
i
++
)
// Go back
$scope
.
slidePrev
();
$scope
.
slides
.
slider
.
unlockSwipes
();
for
(
var
i
=
0
;
i
<
2
;
i
++
)
{
$scope
.
slides
.
slider
.
slidePrev
();
}
$scope
.
slides
.
slider
.
lockSwipes
();
// Recompute behavior
$scope
.
slideBehavior
=
$scope
.
computeSlideBehavior
();
};
};
// TODO: remove auto add account when done
// TODO: remove auto add account when done
...
...
This diff is collapsed.
Click to expand it.
www/templates/join/modal_join_member.html
+
44
−
42
View file @
1827a7f8
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
ng-click=
"closeModal()"
translate
>
COMMON.BTN_CANCEL
ng-click=
"closeModal()"
translate
>
COMMON.BTN_CANCEL
</button>
</button>
<button
class=
"button button-icon button-clear icon ion-ios-arrow-back buttons header-item"
<button
class=
"button button-icon button-clear icon ion-ios-arrow-back buttons header-item"
ng-click=
"
slide
Prev()"
ng-click=
"
do
Prev()"
ng-if=
"slides.slider.activeIndex && slideBehavior.hasPreviousButton"
>
ng-if=
"slides.slider.activeIndex && slideBehavior.hasPreviousButton"
>
</button>
</button>
<button
class=
"button button-icon button-clear icon ion-ios-help-outline visible-xs"
<button
class=
"button button-icon button-clear icon ion-ios-help-outline visible-xs"
...
@@ -356,7 +356,8 @@
...
@@ -356,7 +356,8 @@
</div>
</div>
<!-- Account available -->
<!-- Account available -->
<div
ng-if=
"accountAvailable && !formData.computing"
>
<ng-if
ng-if=
"!formData.computing"
>
<div
class=
"animate-fade-in animate-show-hide ng-hide"
ng-show=
"accountAvailable"
>
<div
class=
"padding text-center"
translate
>
ACCOUNT.NEW.LAST_SLIDE_CONGRATULATION
</div>
<div
class=
"padding text-center"
translate
>
ACCOUNT.NEW.LAST_SLIDE_CONGRATULATION
</div>
<div
class=
"list"
>
<div
class=
"list"
>
...
@@ -381,7 +382,7 @@
...
@@ -381,7 +382,7 @@
</div>
</div>
<!-- Existing non-empty account -->
<!-- Existing non-empty account -->
<div
ng-if=
"!accountAvailable && !formData.computing
"
>
<div
class=
"animate-fade-in animate-show-hide ng-hide"
ng-show=
"!accountAvailable
"
>
<ion-item
class=
"item-icon-left item-text-wrap text-center"
>
<ion-item
class=
"item-icon-left item-text-wrap text-center"
>
<i
class=
"icon ion-minus-circled assertive"
></i>
<i
class=
"icon ion-minus-circled assertive"
></i>
...
@@ -410,6 +411,7 @@
...
@@ -410,6 +411,7 @@
</button>
</button>
</div>
</div>
</div>
</div>
</ng-if>
</ion-content>
</ion-content>
</ion-slide-page>
</ion-slide-page>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment