Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
ee131b80
Commit
ee131b80
authored
Jul 27, 2018
by
Paul Herbert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2100 - Breeze Updates for ICO: latest
parent
0e0da38d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
35 deletions
+56
-35
advanced-ico.component.html
.../wallet/advanced/advanced-ico/advanced-ico.component.html
+27
-22
advanced-ico.component.ts
...pp/wallet/advanced/advanced-ico/advanced-ico.component.ts
+29
-9
loadingState.ts
...e.UI/src/app/wallet/advanced/advanced-ico/loadingState.ts
+0
-4
No files found.
Breeze.UI/src/app/wallet/advanced/advanced-ico/advanced-ico.component.html
View file @
ee131b80
<div
class=
"container"
style=
"border:1px solid lightgray; border-radius: 4px; padding:10px; position: absolute; left:100px; width:65%"
>
<form
[
formGroup
]='
icoFormGroup
'
>
<div
class=
"container"
style=
"border:1px solid lightgray; border-radius: 4px; padding:10px; position: absolute; left:100px; width:65%"
>
<h4>
ICO
</h4>
<div
style=
"margin-top:15px"
>
...
...
@@ -8,19 +9,23 @@
<ng-template
#
elseFeedback
>
<app-feedback
[
loading
]="
extPubKeyLoadingState
.
loading
"
[
errored
]="
extPubKeyLoadingState
.
errored
"
[
erroredText
]="
extPubKeyLoadingState
.
erroredText
"
></app-feedback>
[
erroredText
]="'
Failed
to
get
Extended
Public
Key
'
"
></app-feedback>
</ng-template>
</div>
<div
style=
"margin-top:20px"
>
<label
style=
"font-size:14px;margin-bottom:1px"
>
Generate Addresses
</label>
<div
class=
"input-group"
style=
"width:55%
; height:35px"
>
<input
pattern=
"^[1-9]+$"
type=
"number
"
class=
"form-control"
placeholder=
"Number to generate..."
style=
"border-radius: 0px"
>
<div
class=
"input-group"
style=
"width:240px
; height:35px"
>
<input
formControlName=
"addressCountControl"
type=
"text
"
class=
"form-control"
placeholder=
"Number to generate..."
style=
"border-radius: 0px"
>
<span
class=
"input-group-btn"
>
<button
class=
"btn btn-default"
type=
"button"
>
Go
</button>
<div>
<button
*
ngIf=
"!addressCountControl.invalid"
style=
"outline: none"
class=
"btn btn-default"
type=
"button"
>
Go
</button>
<button
*
ngIf=
"addressCountControl.invalid"
style=
"outline:none; color: gray"
class=
"btn btn-default"
type=
"button"
>
Go
</button>
</div>
</span>
</div>
</div>
</div>
</div>
</div>
</form>
Breeze.UI/src/app/wallet/advanced/advanced-ico/advanced-ico.component.ts
View file @
ee131b80
import
{
Component
,
On
Destroy
}
from
'@angular/core'
;
import
{
Component
,
On
Init
,
OnDestroy
,
Input
}
from
'@angular/core'
;
import
{
Subscription
}
from
'rxJs/Subscription'
;
import
{
FormGroup
,
FormControl
,
Validators
,
FormBuilder
}
from
'@angular/forms'
;
import
'rxjs/add/operator/filter'
;
import
{
AdvancedService
}
from
'./../advanced.service'
;
import
{
LoadingState
}
from
'./loadingState'
;
...
...
@@ -10,22 +12,24 @@ import { LoadingState } from './loadingState';
templateUrl
:
'./advanced-ico.component.html'
,
styleUrls
:
[
'./advanced-ico.component.css'
]
})
export
class
AdvancedIcoComponent
implements
OnDestroy
{
export
class
AdvancedIcoComponent
implements
OnInit
,
OnDestroy
{
public
icoFormGroup
:
FormGroup
;
private
_extPubKey
=
''
;
private
addressCount
:
string
;
private
extPubKeySubs
:
Subscription
;
private
_extPubKeyLoadingState
:
LoadingState
=
new
LoadingState
(
"Failed to get ExtPubKey"
);
private
_extPubKeyLoadingState
:
LoadingState
=
new
LoadingState
();
constructor
(
private
advancedService
:
AdvancedService
)
{
constructor
(
private
advancedService
:
AdvancedService
,
private
formBuilder
:
FormBuilder
)
{
this
.
loadExtPubKey
();
}
public
get
extPubKey
():
string
{
return
this
.
_extPubKey
;
ngOnInit
()
{
this
.
registerFormControls
()
;
}
public
get
extPubKey
LoadingState
():
LoadingState
{
return
this
.
_extPubKeyLoadingState
;
}
public
get
extPubKey
():
string
{
return
this
.
_extPubKey
;
}
public
get
extPubKeyLoadingState
():
LoadingState
{
return
this
.
_extPubKeyLoadingState
;
}
public
get
addressCountControl
()
{
return
this
.
icoFormGroup
.
get
(
'addressCountControl'
);
}
private
loadExtPubKey
()
{
this
.
extPubKeyLoadingState
.
loading
=
true
;
...
...
@@ -38,6 +42,22 @@ export class AdvancedIcoComponent implements OnDestroy {
this
.
extPubKeyLoadingState
.
loading
=
false
;
}
private
registerFormControls
()
{
this
.
icoFormGroup
=
this
.
formBuilder
.
group
({
addressCountControl
:
[
""
,
[
Validators
.
required
,
Validators
.
pattern
(
'^[1-9][0-9]*$'
)]]
});
let
ignore
=
false
;
this
.
addressCountControl
.
valueChanges
.
filter
(
_
=>
!
ignore
).
subscribe
(
_
=>
{
if
(
this
.
addressCountControl
.
invalid
&&
this
.
addressCountControl
.
value
)
{
ignore
=
true
;
this
.
addressCountControl
.
setValue
(
this
.
addressCount
);
ignore
=
false
;
}
else
{
this
.
addressCount
=
this
.
addressCountControl
.
value
;
}
});
}
ngOnDestroy
()
{
this
.
extPubKeySubs
.
unsubscribe
();
}
...
...
Breeze.UI/src/app/wallet/advanced/advanced-ico/loadingState.ts
View file @
ee131b80
...
...
@@ -4,10 +4,6 @@ export class LoadingState {
private
_errored
=
false
;
private
_erroredText
=
""
;
constructor
(
erroredText
:
string
)
{
this
.
_erroredText
=
erroredText
;
}
public
get
erroredText
():
string
{
return
this
.
_erroredText
;
}
...
...
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