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
e6bcd1ba
Commit
e6bcd1ba
authored
Apr 27, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add notation and abbreviation pipes
parent
e75c606e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
56 additions
and
8 deletions
+56
-8
app.module.ts
Breeze.UI/src/app/app.module.ts
+0
-2
setup.module.ts
Breeze.UI/src/app/setup/setup.module.ts
+1
-1
coin-abbreviation.pipe.spec.ts
...ze.UI/src/app/shared/pipes/coin-abbreviation.pipe.spec.ts
+8
-0
coin-abbreviation.pipe.ts
Breeze.UI/src/app/shared/pipes/coin-abbreviation.pipe.ts
+14
-0
coin-notation.pipe.spec.ts
Breeze.UI/src/app/shared/pipes/coin-notation.pipe.spec.ts
+8
-0
coin-notation.pipe.ts
Breeze.UI/src/app/shared/pipes/coin-notation.pipe.ts
+14
-0
shared.module.ts
Breeze.UI/src/app/shared/shared.module.ts
+5
-3
dashboard.component.html
Breeze.UI/src/app/wallet/menu/dashboard.component.html
+2
-2
dashboard.component.spec.ts
Breeze.UI/src/app/wallet/menu/dashboard.component.spec.ts
+2
-0
wallet.module.ts
Breeze.UI/src/app/wallet/wallet.module.ts
+2
-0
No files found.
Breeze.UI/src/app/app.module.ts
View file @
e6bcd1ba
...
...
@@ -3,8 +3,6 @@ import { BrowserModule } from '@angular/platform-browser';
import
{
FormsModule
,
ReactiveFormsModule
}
from
"@angular/forms"
;
import
{
HttpModule
}
from
'@angular/http'
;
import
{
SetupModule
}
from
'./setup/setup.module'
;
import
{
WalletModule
}
from
'./wallet/wallet.module'
;
import
{
SharedModule
}
from
'./shared/shared.module'
;
import
{
AppRoutingModule
}
from
'./app-routing.module'
;
...
...
Breeze.UI/src/app/setup/setup.module.ts
View file @
e6bcd1ba
...
...
@@ -13,7 +13,7 @@ import { RecoverComponent } from './recover/recover.component';
imports
:
[
CommonModule
,
SetupRoutingModule
,
SharedModule
SharedModule
.
forRoot
()
],
declarations
:
[
CreateComponent
,
...
...
Breeze.UI/src/app/shared/pipes/coin-abbreviation.pipe.spec.ts
0 → 100644
View file @
e6bcd1ba
import
{
CoinAbbreviationPipe
}
from
'./coin-abbreviation.pipe'
;
describe
(
'CoinAbbreviationPipe'
,
()
=>
{
it
(
'create an instance'
,
()
=>
{
const
pipe
=
new
CoinAbbreviationPipe
();
expect
(
pipe
).
toBeTruthy
();
});
});
Breeze.UI/src/app/shared/pipes/coin-abbreviation.pipe.ts
0 → 100644
View file @
e6bcd1ba
import
{
Pipe
,
PipeTransform
}
from
'@angular/core'
;
@
Pipe
({
name
:
'coinAbbreviation'
})
export
class
CoinAbbreviationPipe
implements
PipeTransform
{
transform
(
value
:
any
):
any
{
if
(
!
value
)
return
value
;
let
abbreviationAdded
=
value
+
" BTC"
return
abbreviationAdded
;
}
}
Breeze.UI/src/app/shared/pipes/coin-notation.pipe.spec.ts
0 → 100644
View file @
e6bcd1ba
import
{
CoinNotationPipe
}
from
'./coin-notation.pipe'
;
describe
(
'CoinNotationPipe'
,
()
=>
{
it
(
'create an instance'
,
()
=>
{
const
pipe
=
new
CoinNotationPipe
();
expect
(
pipe
).
toBeTruthy
();
});
});
Breeze.UI/src/app/shared/pipes/coin-notation.pipe.ts
0 → 100644
View file @
e6bcd1ba
import
{
Pipe
,
PipeTransform
}
from
'@angular/core'
;
@
Pipe
({
name
:
'coinNotation'
})
export
class
CoinNotationPipe
implements
PipeTransform
{
transform
(
value
:
any
):
any
{
if
(
!
value
)
return
value
;
let
coinNotation
=
Number
(
value
).
toFixed
(
8
);
return
coinNotation
;
}
}
Breeze.UI/src/app/shared/shared.module.ts
View file @
e6bcd1ba
import
{
NgModule
,
ModuleWithProviders
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
CoinNotationPipe
}
from
'./pipes/coin-notation.pipe'
;
import
{
CoinAbbreviationPipe
}
from
'./pipes/coin-abbreviation.pipe'
;
@
NgModule
({
imports
:
[
CommonModule
],
declarations
:
[],
exports
:
[]
declarations
:
[
CoinNotationPipe
,
CoinAbbreviationPipe
],
exports
:
[
CoinNotationPipe
,
CoinAbbreviationPipe
]
})
export
class
SharedModule
{
static
forRoot
():
ModuleWithProviders
{
return
{
ngModule
:
SharedModule
,
providers
:
[
]
providers
:
[]
};
}
}
Breeze.UI/src/app/wallet/menu/dashboard.component.html
View file @
e6bcd1ba
<p>
Balance: {{confirmedBalance}}
</p>
<p>
Unconfirmed: {{unconfirmedBalance}}
<p>
\ No newline at end of file
<p>
Balance: {{confirmedBalance | coinNotation | coinAbbreviation}}
</p>
<p>
Unconfirmed: {{unconfirmedBalance | coinNotation | coinAbbreviation}}
<p>
Breeze.UI/src/app/wallet/menu/dashboard.component.spec.ts
View file @
e6bcd1ba
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
CoinNotationPipe
}
from
'../../shared/pipes/coin-notation.pipe'
;
import
{
CoinAbbreviationPipe
}
from
'../../shared/pipes/coin-abbreviation.pipe'
;
import
{
DashboardComponent
}
from
'./dashboard.component'
;
...
...
Breeze.UI/src/app/wallet/wallet.module.ts
View file @
e6bcd1ba
...
...
@@ -9,12 +9,14 @@ import { SendComponent } from './send/send.component';
import
{
ReceiveComponent
}
from
'./receive/receive.component'
;
import
{
HistoryComponent
}
from
'./history/history.component'
;
import
{
SharedModule
}
from
'../shared/shared.module'
;
import
{
WalletRoutingModule
}
from
'./wallet-routing.module'
;
@
NgModule
({
imports
:
[
CommonModule
,
FormsModule
,
SharedModule
.
forRoot
(),
ReactiveFormsModule
,
WalletRoutingModule
],
...
...
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