Commit 6b1ad33b authored by Dan Gershony's avatar Dan Gershony

merge from master

parents 4ac0b2c6 344af23c
...@@ -5,29 +5,32 @@ matrix: ...@@ -5,29 +5,32 @@ matrix:
include: include:
- os: linux # Ubuntu 14.04 - os: linux # Ubuntu 14.04
dist: trusty dist: trusty
sudo: required sudo: required
env: os_identifier=ubuntu.14.04
- os: osx # OSX 10.11 - os: osx # OSX 10.11
osx_image: xcode7.3 osx_image: xcode7.3
env: os_identifier=osx.10.11
- os: osx # OSX 10.12 - os: osx # OSX 10.12
osx_image: xcode8.1 osx_image: xcode8.1
env: os_identifier=osx.10.12
# branches to build # branches to build
branches: branches:
only: only:
- master - master
env: env:
global: global:
- log_prefix="[$TRAVIS_OS_NAME]" - log_prefix=[$TRAVIS_OS_NAME]
- arch=x64 - arch=x64
- configuration="Release" - configuration=Release
- app_output_name="breeze-$arch-$TRAVIS_OS_NAME-Release"
- api_output_name="api-$arch-$TRAVIS_OS_NAME-Release"
- os_platform=linux - os_platform=linux
- TRAVIS_TAG=cd-unstable - TRAVIS_TAG=cd-unstable
# Work around NuGet issue #2163 # Work around NuGet issue #2163
# https://github.com/NuGet/Home/issues/2163 # https://github.com/NuGet/Home/issues/2163
# https://github.com/travis-ci/travis-ci/issues/7728 # https://github.com/travis-ci/travis-ci/issues/7728
before_install: before_install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ulimit -n 1024 ; os_platform=darwin ; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then ulimit -n 1024 ; os_platform=darwin ; fi
...@@ -39,7 +42,7 @@ script: ...@@ -39,7 +42,7 @@ script:
deploy: deploy:
provider: releases provider: releases
api_key: api_key:
secure: NOLMkLtCu/WCUHBXroBPJsGT0U0Lw5x0SwZvxvCmQfqzM0R4XQ0ZV3GPRLSHHBOLER8CSucgFJ4XAbNG7yiIA2TrNfmv38su2KuBPQwA5DBpOBzBxQa2cqJV+9lgF48r5J+C0kkyQ8VUwpwXVeTenfxw7pPBIMfpFblOXFGRWHExJHX5o9u972heO1i/s6mM0v8EdJ72JswklLLHqevAIHw4NZ7ZMmvisnbTWuOt4IuOLbw/eobbZF9xX+9ks6uOUmfUEQ51KKRsIOFuOGW/1zxBudv60JypiYgGLcG7jbUR8m06MPDmWv5TLd8rAWNbb/djEJjm1aRjN30rVi1NXIl4Ybg3GfGF/Pqc67j0hLMIQD5Mp8h62yopXIAroTpKhcmeRDlMoG6fbcwOtlP+F5osZT25yJH7+zDesv57pMJZkL+RpG7W3bHQIiT4lq8xD1490NFLpUWLoaIDMwTWFLlp+uVfmMa+snx1A1MDKw3BkJrt3ten3/BMVXIu3sLkI5xJFJJgri756CxDeyuuj7UkMzYNvzqDZnlI1Gv0rjXAfIdMR/jRGRIbBx0b4YQf3Nwx+EymzvrKLYX1qX3DfW6b8qn2gIa6r3jUEwLTY/4tc0U+IXjl0hJnY9Rv871oWnV2k7mqfFxnaKAqWn4gdsliKmPbShMrsNkh/p0RQKg= secure: $secure_github_key # this key is set on the Travis build page
file_glob: true file_glob: true
file: "$TRAVIS_BUILD_DIR/deploy/*.zip" file: "$TRAVIS_BUILD_DIR/deploy/*.zip"
skip_cleanup: true skip_cleanup: true
......
<div *ngIf="loading">Loading...</div> <div *ngIf="loading">
<div class="login d-flex align-items-center text-center">
<div class="container">
<div class="mb-4">
<svg version="1.1" id="loading" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
<path d="M31.6,3.5C5.9,13.6-6.6,42.7,3.5,68.4c10.1,25.7,39.2,38.3,64.9,28.1l-3.1-7.9c-21.3,8.4-45.4-2-53.8-23.3
c-8.4-21.3,2-45.4,23.3-53.8L31.6,3.5z">
<animateTransform attributeName="transform" attributeType="XML" type="rotate" dur="2s" from="0 50 50" to="360 50 50" repeatCount="indefinite"></animateTransform>
</path>
<path d="M42.3,39.6c5.7-4.3,13.9-3.1,18.1,2.7c4.3,5.7,3.1,13.9-2.7,18.1l4.1,5.5c8.8-6.5,10.6-19,4.1-27.7
c-6.5-8.8-19-10.6-27.7-4.1L42.3,39.6z">
<animateTransform attributeName="transform" attributeType="XML" type="rotate" dur="1s" from="0 50 50" to="-360 50 50" repeatCount="indefinite"></animateTransform>
</path>
<path d="M82,35.7C74.1,18,53.4,10.1,35.7,18S10.1,46.6,18,64.3l7.6-3.4c-6-13.5,0-29.3,13.5-35.3s29.3,0,35.3,13.5
L82,35.7z">
<animateTransform attributeName="transform" attributeType="XML" type="rotate" dur="2s" from="0 50 50" to="360 50 50" repeatCount="indefinite"></animateTransform>
</path>
</svg>
</div>
<!-- /row-->
<div>
<em class="display-4 text-center">Loading the future... </em>
</div>
<!-- /row-->
</div>
<!-- /container-->
</div>
<!-- /login-->
</div>
<router-outlet *ngIf="!loading"></router-outlet> <router-outlet *ngIf="!loading"></router-outlet>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div *ngIf="hasWallet"> <div *ngIf="hasWallet">
<p class="lead">Please choose the wallet you would like to open</p> <p class="lead">Please choose the wallet you would like to open</p>
<div class="row d-flex justify-content-center"> <div class="row d-flex justify-content-center">
<form class="col-md-8 col-xs-12 text-left" [formGroup]="openWalletForm"> <form class="col-md-6 col-xs-12 text-left" [formGroup]="openWalletForm">
<div class="form-group"> <div class="form-group">
<label class="col-12 row" for="Select">Wallet</label> <label class="col-12 row" for="Select">Wallet</label>
<select class="form-control custom-select col-12" formControlName="selectWallet"> <select class="form-control custom-select col-12" formControlName="selectWallet">
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<p class="lead">Looks like you're new here. <br />Please create or restore a wallet.</p> <p class="lead">Looks like you're new here. <br />Please create or restore a wallet.</p>
</ng-template> </ng-template>
<div class="row d-flex justify-content-center"> <div class="row d-flex justify-content-center">
<button type="button" class="btn btn-link btn-lg" (click)="onCreateClicked()">Create or restore a wallet</button> <button type="button" class="btn btn-linkgray btn-lg" (click)="onCreateClicked()">Create or restore a wallet</button>
</div> </div>
</div> </div>
<!-- /container--> <!-- /container-->
...@@ -40,4 +40,3 @@ ...@@ -40,4 +40,3 @@
<!-- /login--> <!-- /login-->
</section> </section>
<!-- /breeze--> <!-- /breeze-->
<section id="breeze"> <section id="breeze">
<div class="login d-flex align-items-center text-center"> <div class="login d-flex align-items-center text-center">
<div class="container"> <div class="container">
<p class="textback text-left mb-5 col-6 row"><a (click)="onBackClicked()">Back</a></p> <p class="textback text-left mb-5 offset-3 row"><a (click)="onBackClicked()">Back</a></p>
<h3 class="display-5">Welcome</h3> <h3 class="display-5">Welcome</h3>
<div class="row d-flex justify-content-center"> <div class="row d-flex justify-content-center">
<form class="col-md-8 col-xs-12 text-left" [formGroup]="createWalletForm"> <form class="col-md-6 col-xs-12 text-left" [formGroup]="createWalletForm">
<!--<div class="form-group has-success">--> <!--<div class="form-group has-success">-->
<div class="form-group"> <div class="form-group">
<label class="col-12 row" for="walletName">Name</label> <label class="col-12 row" for="walletName">Name</label>
<input type="text" class="form-control form-control-success" formControlName="walletName" id="walletName" placeholder="Enter a wallet name."> <input type="text" class="form-control form-control-success" formControlName="walletName" id="walletName" placeholder="Enter a wallet name.">
<div *ngIf="formErrors.walletName" class="form-control-feedback">{{ formErrors.walletName }}</div> <div *ngIf="formErrors.walletName" class="text-danger mt-2">{{ formErrors.walletName }}</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="text-left" for="walletPassword">Password</label> <label class="text-left" for="walletPassword">Password</label>
<input type="password" class="form-control form-control-success" formControlName="walletPassword" id="walletPassword" placeholder="Enter a password."> <input type="password" class="form-control form-control-success" formControlName="walletPassword" id="walletPassword" placeholder="Enter a password.">
<div *ngIf="formErrors.walletPassword" class="form-control-feedback">{{ formErrors.walletPassword }}</div> <div *ngIf="formErrors.walletPassword" class="text-danger mt-2">{{ formErrors.walletPassword }}</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="text-left" for="walletPasswordConfirmation">Confirm Password</label> <label class="text-left" for="walletPasswordConfirmation">Confirm Password</label>
......
<section id="breeze"> <section id="breeze">
<div class="login d-flex align-items-center text-center"> <div class="login d-flex align-items-center text-center">
<div class="container"> <div class="container">
<p class="textback text-left mb-5 col-6 row"><a (click)="onBackClicked()">Back</a></p> <p class="textback text-left mb-5 offset-3 row"><a (click)="onBackClicked()">Back</a></p>
<h3 class="display-5">Welcome</h3> <h3 class="display-5">Welcome</h3>
<div class="row d-flex justify-content-center"> <div class="row d-flex justify-content-center">
<form class="col-md-8 col-xs-12 text-left" [formGroup]="recoverWalletForm"> <form class="col-md-6 col-xs-12 text-left" [formGroup]="recoverWalletForm">
<!--<div class="form-group has-success">--> <!--<div class="form-group has-success">-->
<div class="form-group"> <div class="form-group">
<label class="col-12 row" for="walletName">Name</label> <label class="col-12 row" for="walletName">Name</label>
<input type="text" class="form-control form-control-success" formControlName="walletName" id="walletName" placeholder="Enter a wallet name."> <input type="text" class="form-control form-control-success" formControlName="walletName" id="walletName" placeholder="Enter a wallet name.">
<div *ngIf="formErrors.walletName" class="form-control-feedback">{{ formErrors.walletName }}</div> <div *ngIf="formErrors.walletName" class="text-danger mt-2">{{ formErrors.walletName }}</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-12 row" for="creationDate">Creation Date (optional)</label> <label class="col-12 row" for="creationDate">Creation Date (optional)</label>
<material-datepicker class="form-control" [(date)]="creationDate"></material-datepicker> <material-datepicker class="form-control col-7" [(date)]="creationDate"></material-datepicker>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-12 row" for="walletMnemonic">12 Secret Words</label> <label class="col-12 row" for="walletMnemonic">12 Secret Words</label>
<input type="text" class="form-control form-control-success" formControlName="walletMnemonic" id="walletName" placeholder="Enter your 12 secret words."> <input type="text" class="form-control form-control-success" formControlName="walletMnemonic" id="walletName" placeholder="Enter your 12 secret words.">
<div *ngIf="formErrors.walletMnemonic" class="form-control-feedback">{{ formErrors.walletMnemonic }}</div> <div *ngIf="formErrors.walletMnemonic" class="text-danger mt-2">{{ formErrors.walletMnemonic }}</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="text-left" for="walletPassword">Password</label> <label class="text-left" for="walletPassword">Password</label>
<input type="password" class="form-control form-control-success" formControlName="walletPassword" id="walletPassword" placeholder="Enter a password."> <input type="password" class="form-control form-control-success" formControlName="walletPassword" id="walletPassword" placeholder="Enter a password.">
<div *ngIf="formErrors.walletPassword" class="form-control-feedback">{{ formErrors.walletPassword }}</div> <div *ngIf="formErrors.walletPassword" class="text-danger mt-2">{{ formErrors.walletPassword }}</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="text-left" for="walletNetwork">Network</label> <label class="text-left" for="walletNetwork">Network</label>
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
<!--<p class="text-back text-left mb-5 col-6 row"> <!--<p class="text-back text-left mb-5 col-6 row">
<button type="button" class="btn btn-link text-back" (click)="onBackClicked()">Back</button> <button type="button" class="btn btn-link text-back" (click)="onBackClicked()">Back</button>
</p>--> </p>-->
<p class="text-back text-left mb-5 col-6 row"><a (click)="onBackClicked()">Back</a></p> <p class="text-back text-left mb-5 offset-3 row"><a (click)="onBackClicked()">Back</a></p>
<h3 class="display-5">Welcome</h3> <h3 class="display-5">Welcome</h3>
<p class="lead"> <p class="lead mb-6">
If you would like to create a new wallet, please click Create. <br/> If you would like to create a new wallet, please click Create. <br/>
When you have used Breeze before, you can click Restore to recover your wallet. When you have used Breeze before, you can click Restore to recover your wallet.
</p> </p>
<div class="row d-flex justify-content-center"> <div class="row d-flex justify-content-center">
<button type="button" class="btn btn-darkgray btn-lg" (click)="onCreateClicked()">Create</button>
<button type="button" class="btn btn-linkgray btn-lg" (click)="onRecoverClicked()">Restore</button> <button type="button" class="btn btn-linkgray btn-lg" (click)="onRecoverClicked()">Restore</button>
<button type="button" class="btn btn-darkgray btn-lg" (click)="onCreateClicked()">Create</button>
</div> </div>
</div> </div>
<!-- /container--> <!-- /container-->
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<!-- /card--> <!-- /card-->
</div> </div>
</div> </div>
<ng-template #noTransactions class="text-muted">Looks like you haven't made any transactions yet</ng-template> <ng-template #noTransactions><em class="muted">Looks like you haven't made any transactions yet.</em></ng-template>
</section> </section>
<!-- /TRANSACTIONS --> <!-- /TRANSACTIONS -->
<status-bar></status-bar> <status-bar></status-bar>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</div> </div>
<!-- /card--> <!-- /card-->
<div> <div>
<ng-template #noTransactions class="text-muted">Looks like you haven't made any transactions yet.</ng-template> <ng-template #noTransactions><em class="muted">Looks like you haven't made any transactions yet.</em></ng-template>
</div> </div>
</section> </section>
<!-- /TRANSACTIONS --> <!-- /TRANSACTIONS -->
......
<div id="modalLogout" tabindex="-1" role="dialog" aria-labelledby="modal_logout" aria-hidden="true"> <div id="modalLogout" tabindex="-1" role="dialog" aria-labelledby="modal_logout" aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog modalBg" role="document">
<div> <div>
<div class="modal-header"> <div class="modal-header">
<div class="bubble"><i class="icon-download"></i></div> <div class="bubble"><i class="icon-download"></i></div>
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
<h5 class="modal-title text-uppercase" id="modalReceive">Logout</h5> <h5 class="modal-title text-uppercase" id="modalReceive">Logout</h5>
<form> <form>
<div class="form-group clearfix"> <div class="form-group clearfix">
<label class="float-left">Are you sure you want to logout?</label> <p class="text-muted text-center">Are you sure you want to logout?</p>
</div> </div>
<div> <div class="text-center">
<button type="button" class="btn btn-lg btn-primary float-left" data-dismiss="modal" aria-label="Logout" (click)="onLogout()">Yes</button> <button type="button" class="btn btn-secondary" data-dismiss="modal" aria-label="Logout" (click)="onLogout()">Yes</button>
<button type="button" class="btn btn-lg btn-primary float-right" data-dismiss="modal" aria-label="Close" (click)="activeModal.close('Close click')">Cancel</button> <button type="button" class="btn btn-link" data-dismiss="modal" aria-label="Close" (click)="activeModal.close('Close click')">Cancel</button>
</div> </div>
<br> <br>
</form> </form>
......
<div id="modalReceive" tabindex="-1" role="dialog" aria-labelledby="modal_receive" aria-hidden="true"> <div id="modalReceive" tabindex="-1" role="dialog" aria-labelledby="modal_receive" aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog modalBg" role="document">
<div> <div>
<div class="modal-header"> <div class="modal-header">
<div class="bubble"><i class="icon-download"></i></div> <div class="bubble"><i class="icon-download"></i></div>
......
<div id="modalSend" tabindex="-1" role="dialog" aria-labelledby="modal_send" aria-hidden="true"> <div id="modalSend" tabindex="-1" role="dialog" aria-labelledby="modal_send" aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog modalBg" role="document">
<div> <div>
<div class="modal-header"> <div class="modal-header">
<div class="bubble"><i class="icon-upload"></i></div> <div class="bubble"><i class="icon-upload"></i></div>
......
<div class="status"> <div class="status">
<ul class="list-inline align-self-center row" title="Total blocks: {{ chainTip }}&#013;Last block received: {{ lastBlockSyncedHeight }}&#013;Connections: {{ connectedNodes }}"> <ul class="list-inline align-self-center row" title="Total blocks: {{ chainTip }}&#013;Last block received: {{ lastBlockSyncedHeight }}&#013;Connections: {{ connectedNodes }}">
<li class="list-inline-item pending"><i class="icon-syncr text-success"></i></li> <li class="list-inline-item"><i class="icon-syncr text-success"></i></li>
<li class="list-inline-item">{{ percentSynced }}</li> <li class="list-inline-item">{{ percentSynced }}</li>
<li class="list-inline-item"><i class="icon-earth text-success"></i></li> <li class="list-inline-item ml-2"><i class="icon-earth text-info"></i></li>
<li class="list-inline-item">{{ connectedNodes }}</li> <li class="list-inline-item">{{ connectedNodes }}</li>
</ul> </ul>
</div> </div>
<div id="modalDetail" tabindex="-1" role="dialog" aria-labelledby="modal_detail" aria-hidden="true"> <div id="modalDetail" tabindex="-1" role="dialog" aria-labelledby="modal_detail" aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog modalBg" role="document">
<div> <div>
<div class="modal-header"> <div class="modal-header">
<div class="bubble"><i class="icon-block"></i></div> <div class="bubble"><i class="icon-block"></i></div>
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
<h5 class="modal-title text-uppercase" id="modalDetail">Transaction Details</h5> <h5 class="modal-title text-uppercase" id="modalDetail">Transaction Details</h5>
<ul class="list-inline row"> <ul class="list-inline row">
<li class="list-inline-item col blockLabel">Type</li> <li class="list-inline-item col blockLabel">Type</li>
<li class="list-inline-item col-9 blockText">{{ transaction.type }}</li> <li class="list-inline-item col-9 blockText text-capitalize">{{ transaction.type }}</li>
</ul> </ul>
<ul class="list-inline row"> <ul class="list-inline row">
<li class="list-inline-item col blockLabel">Amount</li> <li class="list-inline-item col blockLabel">Amount</li>
<li class="list-inline-item col-9 blockText"><strong class="text-success">{{transaction.amount | coinNotation }}</strong></li> <li class="list-inline-item col-9 blockText text-success">{{transaction.amount | coinNotation }}</li>
</ul> </ul>
<!--<ul class="list-inline row"> <!--<ul class="list-inline row">
<li class="list-inline-item col blockLabel">From</li> <li class="list-inline-item col blockLabel">From</li>
...@@ -20,15 +20,15 @@ ...@@ -20,15 +20,15 @@
</ul>--> </ul>-->
<ul class="list-inline row"> <ul class="list-inline row">
<li class="list-inline-item col blockLabel">Date</li> <li class="list-inline-item col blockLabel">Date</li>
<li class="list-inline-item col-9 blockText"><small>{{ transaction.timestamp * 1000 | date:'medium' }}</small></li> <li class="list-inline-item col-9 blockText">{{ transaction.timestamp * 1000 | date:'medium' }}</li>
</ul> </ul>
<ul class="list-inline row"> <ul class="list-inline row">
<li class="list-inline-item col blockLabel">Block</li> <li class="list-inline-item col blockLabel">Block</li>
<li class="list-inline-item col-9 blockText">#{{ transaction.confirmedInBlock }}</li> <li class="list-inline-item col-9 blockText">#{{ transaction.confirmedInBlock }}</li>
</ul> </ul>
<ul class="list-inline row"> <ul class="list-inline row">
<li class="list-inline-item col blockLabel">Transaction ID</li> <li class="list-inline-item col blockLabel my-3">Transaction ID</li>
<li class="list-inline-item col-9 blockText blockID"><code>{{ transaction.id }}</code></li> <li class="list-inline-item col-10 blockID"><code>{{ transaction.id }}</code></li>
<span class="float-right"><a ngxClipboard [cbContent]="transaction.id" (click)="onCopiedClick()">copy</a></span> <span class="float-right"><a ngxClipboard [cbContent]="transaction.id" (click)="onCopiedClick()">copy</a></span>
<span class="badge badge-success list-inline-item col" *ngIf="copied">The transaction ID has been copied to your clipboard.</span> <span class="badge badge-success list-inline-item col" *ngIf="copied">The transaction ID has been copied to your clipboard.</span>
</ul> </ul>
......
...@@ -8,9 +8,7 @@ a, button {&:hover {cursor: pointer !important;}} ...@@ -8,9 +8,7 @@ a, button {&:hover {cursor: pointer !important;}}
code {color: $spacegray !important;} code {color: $spacegray !important;}
.form-control::-webkit-input-placeholder { color: $input-color-placeholder; } /* WebKit, Blink, Edge */ .form-control::-webkit-input-placeholder { color: $input-color-placeholder; } /* WebKit, Blink, Edge */
.form-control:-moz-placeholder { color: $input-color-placeholder; } /* Mozilla Firefox 4 to 18 */ .form-control:-moz-placeholder { color: $input-color-placeholder; } /* Mozilla Firefox 4 to 18 */
.form-control::-moz-placeholder { color: $input-color-placeholder; } /* Mozilla Firefox 19+ */
.form-control:-ms-input-placeholder { color: $input-color-placeholder; } /* Internet Explorer 10-11 */ .form-control:-ms-input-placeholder { color: $input-color-placeholder; } /* Internet Explorer 10-11 */
.form-control::-ms-input-placeholder { color: $input-color-placeholder; } /* Microsoft Edge */
// button // button
.twitter { .twitter {
...@@ -30,16 +28,47 @@ code {color: $spacegray !important;} ...@@ -30,16 +28,47 @@ code {color: $spacegray !important;}
} }
} }
// loading
#loading {
width: 150px;
height: 150px;
display:inline-block;
fill: $darkgray !important;
}
@-webkit-keyframes blink-caret { 50% { border-color: transparent; } }
em {
&.display-4 {
font-size: 1.6em;
color: $darkgray;
font-weight: 400;
padding-right: 5px;
border-right: .1em solid $blue;
white-space: nowrap;
-webkit-animation: blink-caret .5s step-end infinite alternate;
}
}
// datepicker
.datepicker__input {
border-color: transparent !important;
padding: 0 !important;
text-align: left;
color: $input-color !important;
width: 100%;
text-align: center;
&::-webkit-input-placeholder { color: $input-color-placeholder; } /* WebKit, Blink, Edge */
}
// container // container
#content { #content {
width: 100%; width: 100%;
position: relative; position: relative;
padding-left: 70px; padding: 0 0 70px 70px;
} }
// sidebar // sidebar
#sidebar { #sidebar {
z-index: 1000; z-index: 1035;
position: fixed; position: fixed;
width: 70px; width: 70px;
height: 100%; height: 100%;
...@@ -65,6 +94,7 @@ code {color: $spacegray !important;} ...@@ -65,6 +94,7 @@ code {color: $spacegray !important;}
} }
&:hover { &:hover {
opacity: .8; opacity: .8;
cursor: pointer !important;
.bar {opacity: 0;} .bar {opacity: 0;}
} }
img {width: 42px;} img {width: 42px;}
...@@ -91,6 +121,9 @@ code {color: $spacegray !important;} ...@@ -91,6 +121,9 @@ code {color: $spacegray !important;}
} }
} }
// NAVBAR
#navbarBreeze {}
// jumbotron // jumbotron
.jumbotron { .jumbotron {
h5 { h5 {
...@@ -116,6 +149,8 @@ code {color: $spacegray !important;} ...@@ -116,6 +149,8 @@ code {color: $spacegray !important;}
// transactions // transactions
#transaction { #transaction {
padding-top: 2em;
.muted {opacity: .5;}
h5 { h5 {
font-size: .85em; font-size: .85em;
color: $gray-dark; color: $gray-dark;
...@@ -144,7 +179,7 @@ code {color: $spacegray !important;} ...@@ -144,7 +179,7 @@ code {color: $spacegray !important;}
// status box // status box
.status { .status {
background: $white; background: $white;
width: 80px; width: auto;
height: 40px; height: 40px;
border: 1px solid #DBDBDB; border: 1px solid #DBDBDB;
box-shadow: 0 1px 11px 0 rgba(80,96,120,.2); box-shadow: 0 1px 11px 0 rgba(80,96,120,.2);
...@@ -153,29 +188,33 @@ code {color: $spacegray !important;} ...@@ -153,29 +188,33 @@ code {color: $spacegray !important;}
bottom: 2%; bottom: 2%;
right: 2%; right: 2%;
text-align: center; text-align: center;
ul {transform: translateY(50%) translateX(15%);} ul {
transform: translateY(50%) translateX(0);
display: inline-block;
position: relative;
padding: 0 2em;
}
li { li {
font-size: .9em; font-size: .9em;
position: relative; position: relative;
padding: 0 8px; float: left;
margin-right: 4px;
.text-info {color: $gray-dark !important;}
&.pending { &.pending {
i { i {
font-size: 1.3em; font-size: .9em;
position: absolute;
color: $brand-warning; color: $brand-warning;
animation: spin 4s linear infinite;
} }
} }
&.statusOK { &.statusOK {
i { i {
color: $brand-success; color: $brand-success;
font-size: 1.3em; font-size: .9em;
position: absolute; position: absolute;
} }
} }
} }
} }
@keyframes spin {100%{transform:rotate(360deg);}}
// modal // modal
.modal-header { .modal-header {
...@@ -439,8 +478,9 @@ $curve: cubic-bezier(0.650, 0.000, 0.450, 1.000); ...@@ -439,8 +478,9 @@ $curve: cubic-bezier(0.650, 0.000, 0.450, 1.000);
text-transform: uppercase; text-transform: uppercase;
} }
.lead { .lead {
font-size: 1.25em; font-size: 1.15em;
color: $blue; color: $blue;
font-weight: 400;
line-height: 1.25em; line-height: 1.25em;
margin: 2em 0; margin: 2em 0;
} }
...@@ -453,7 +493,7 @@ $curve: cubic-bezier(0.650, 0.000, 0.450, 1.000); ...@@ -453,7 +493,7 @@ $curve: cubic-bezier(0.650, 0.000, 0.450, 1.000);
text-decoration: underline; text-decoration: underline;
&:hover { &:hover {
text-decoration: none; text-decoration: none;
color: lighten($darkgray,20%); color: lighten($darkgray,10%);
} }
} }
form {margin-bottom: 4em;} form {margin-bottom: 4em;}
......
...@@ -40,19 +40,17 @@ ...@@ -40,19 +40,17 @@
src: url("./assets/fonts/Lato-Black.ttf") format("truetype") src: url("./assets/fonts/Lato-Black.ttf") format("truetype")
} }
// icons
@font-face { @font-face {
font-family: 'icon'; font-family: 'icon';
src: url('./assets/fonts/icon.eot?uu062v'); src: url('./assets/fonts/icon.eot?qz0v16');
src: url('./assets/fonts/icon.eot?uu062v#iefix') format('embedded-opentype'), src: url('./assets/fonts/icon.eot?qz0v16#iefix') format('embedded-opentype'),
url('./assets/fonts/icon.ttf?uu062v') format('truetype'), url('./assets/fonts/icon.ttf?qz0v16') format('truetype'),
url('./assets/fonts/icon.woff?uu062v') format('woff'), url('./assets/fonts/icon.woff?qz0v16') format('woff'),
url('./assets/fonts/icon.svg?uu062v#icomoon') format('svg'); url('./assets/fonts/icon.svg?qz0v16#icomoon') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
[class^="icon-"], [class*=" icon-"] { [class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */ /* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icon' !important; font-family: 'icon' !important;
...@@ -68,19 +66,6 @@ ...@@ -68,19 +66,6 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-stratis:before {
content: "\e900";
}
.icon-syncr:before {
content: "\e902";
}
.icon-bitcoin:before {
content: "\e904";
}
.icon-block:before {
content: "\e92e";
}
.icon-coin-dollar:before { .icon-coin-dollar:before {
content: "\e93b"; content: "\e93b";
} }
...@@ -90,23 +75,80 @@ ...@@ -90,23 +75,80 @@
.icon-coin-pound:before { .icon-coin-pound:before {
content: "\e93d"; content: "\e93d";
} }
.icon-database:before { .icon-coin-yen:before {
content: "\e93e";
}
.icon-bell:before {
content: "\e951";
}
.icon-download:before {
content: "\e960";
}
.icon-upload:before {
content: "\e961";
}
.icon-coin:before {
content: "\e964"; content: "\e964";
} }
.icon-settings:before { .icon-lock:before {
content: "\e98f";
}
.icon-unlocked:before {
content: "\e990";
}
.icon-cog:before {
content: "\e994"; content: "\e994";
} }
.icon-download:before { .icon-bin:before {
content: "\e9ac";
}
.icon-switch:before {
content: "\e9b6";
}
.icon-cloud:before {
content: "\e9c1";
}
.icon-cloud-download:before {
content: "\e9c2"; content: "\e9c2";
} }
.icon-upload:before { .icon-cloud-upload:before {
content: "\e9c3"; content: "\e9c3";
} }
.icon-cancel-circle:before { .icon-cloud-check:before {
content: "\ea0d"; content: "\e9c4";
}
.icon-download2:before {
content: "\e9c5";
}
.icon-upload2:before {
content: "\e9c6";
}
.icon-download3:before {
content: "\e9c7";
}
.icon-upload3:before {
content: "\e9c8";
}
.icon-sphere:before {
content: "\e9c9";
}
.icon-earth:before {
content: "\e9ca";
}
.icon-link:before {
content: "\e9cb";
}
.icon-circle-up:before {
content: "\ea41";
}
.icon-circle-right:before {
content: "\ea42";
} }
.icon-checkmark2:before { .icon-circle-down:before {
content: "\ea11"; content: "\ea43";
}
.icon-circle-left:before {
content: "\ea44";
} }
.icon-checkbox-checked:before { .icon-checkbox-checked:before {
content: "\ea52"; content: "\ea52";
...@@ -120,3 +162,15 @@ ...@@ -120,3 +162,15 @@
.icon-radio-unchecked:before { .icon-radio-unchecked:before {
content: "\ea56"; content: "\ea56";
} }
.icon-block:before {
content: "\eae8";
}
.icon-stratis:before {
content: "\e900";
}
.icon-syncr:before {
content: "\e1";
}
.icon-bitcoin:before {
content: "\e2";
}
.jumbotron { .jumbotron {
padding: $jumbotron-padding; padding: $jumbotron-padding;
margin-bottom: $jumbotron-padding;
background-color: $jumbotron-bg; background-color: $jumbotron-bg;
border-top: 1px solid $gray-light;
border-bottom: 1px solid $gray-light; border-bottom: 1px solid $gray-light;
@include border-radius($border-radius-lg); @include border-radius($border-radius-lg);
......
...@@ -45,14 +45,18 @@ ...@@ -45,14 +45,18 @@
margin: $modal-dialog-margin; margin: $modal-dialog-margin;
} }
// Custom
.modalBg {
background-color: $modal-content-bg;
border: $modal-content-border-width solid $modal-content-border-color;
}
// Actual modal // Actual modal
.modal-content { .modal-content {
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: $modal-content-bg;
background-clip: padding-box; background-clip: padding-box;
border: $modal-content-border-width solid $modal-content-border-color;
@include border-radius($border-radius-lg); @include border-radius($border-radius-lg);
@include box-shadow($modal-content-xs-box-shadow); @include box-shadow($modal-content-xs-box-shadow);
// Remove focus outline from opened modal // Remove focus outline from opened modal
......
...@@ -19,8 +19,11 @@ ...@@ -19,8 +19,11 @@
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: $navbar-padding-y $navbar-padding-x 0 $navbar-padding-x; padding: 0 $navbar-padding-x 0 70px;
box-shadow: inset 0 1px 4px 0 rgba(0,0,0,0.08); box-shadow: inset 0 1px 4px 0 rgba(0,0,0,0.08);
background: $white;
border-bottom: 1px solid $gray-light;
height: auto;
} }
...@@ -60,7 +63,7 @@ ...@@ -60,7 +63,7 @@
font-size: .96rem; font-size: .96rem;
letter-spacing: 0.53px; letter-spacing: 0.53px;
font-weight: 500; font-weight: 500;
padding-bottom: 1.25rem; padding: 1.5rem 0 1.25rem;
} }
} }
......
...@@ -223,7 +223,7 @@ $container-max-widths: ( ...@@ -223,7 +223,7 @@ $container-max-widths: (
sm: 540px, sm: 540px,
md: 720px, md: 720px,
lg: 960px, lg: 960px,
xl: 1140px xl: 1080px
) !default; ) !default;
@include _assert-ascending($container-max-widths, "$container-max-widths"); @include _assert-ascending($container-max-widths, "$container-max-widths");
...@@ -619,7 +619,7 @@ $navbar-toggler-padding-y: .25rem !default; ...@@ -619,7 +619,7 @@ $navbar-toggler-padding-y: .25rem !default;
$navbar-toggler-font-size: $font-size-lg !default; $navbar-toggler-font-size: $font-size-lg !default;
$navbar-toggler-border-radius: $btn-border-radius !default; $navbar-toggler-border-radius: $btn-border-radius !default;
$navbar-inverse-color: $brand-primary !default; $navbar-inverse-color: $gray-dark !default;
$navbar-inverse-hover-color: darken($brand-primary, 20%) !default; $navbar-inverse-hover-color: darken($brand-primary, 20%) !default;
$navbar-inverse-active-color: $brand-primary !default; $navbar-inverse-active-color: $brand-primary !default;
$navbar-inverse-disabled-color: rgba($white,.25) !default; $navbar-inverse-disabled-color: rgba($white,.25) !default;
......
...@@ -30,22 +30,25 @@ $btn-secondary-border: $gray-light !default; ...@@ -30,22 +30,25 @@ $btn-secondary-border: $gray-light !default;
// //
///////////////////////////// /////////////////////////////
#content { // NAVBAR
&.bitcoin { #navbarBreeze {
.navbar-nav {
// NAVBAR .nav-item {
.navbar { .nav-link {
.nav-item { color: $gray-dark;
.nav-link { &:hover {color: lighten($brand-primary,20%);}
color: $gray-dark; &.is-active {
&:hover {color: lighten($brand-primary,20%);} border-bottom: 2px solid $brand-primary !important;
color: $brand-primary !important;
} }
&.active { }
border-bottom: 2px solid $brand-primary;
.nav-link {color: $brand-primary;}
}
}
} }
}
}
#content {
&.bitcoin {
// JUMBOTRON // JUMBOTRON
.jumbotron { .jumbotron {
...@@ -88,6 +91,9 @@ $btn-secondary-border: $gray-light !default; ...@@ -88,6 +91,9 @@ $btn-secondary-border: $gray-light !default;
i {color: $brand-primary;} i {color: $brand-primary;}
} }
} }
.modal-dialog {
.badge {margin: 1em 0;}
}
#modalDetail { #modalDetail {
a { a {
color: $link-color; color: $link-color;
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio 15
VisualStudioVersion = 15.0.26430.15 VisualStudioVersion = 15.0.26430.16
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{807563C4-7259-434D-B604-A14C3DCF8E30}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{807563C4-7259-434D-B604-A14C3DCF8E30}"
EndProject EndProject
...@@ -20,12 +20,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Api.Tests", "src\Bre ...@@ -20,12 +20,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Api.Tests", "src\Bre
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Wallet", "src\Breeze.Wallet\Breeze.Wallet.csproj", "{D16CD478-9D1E-4C69-91AD-43539E94A215}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Wallet", "src\Breeze.Wallet\Breeze.Wallet.csproj", "{D16CD478-9D1E-4C69-91AD-43539E94A215}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.TumbleBit.Client", "src\Breeze.TumbleBit.Client\Breeze.TumbleBit.Client.csproj", "{2490DD1A-6C14-47F2-A9C6-56761A52E2D9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TumbleBit", "TumbleBit", "{1B724678-2B73-483E-B981-3A6733C2194E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NTumbleBit", "src\NTumbleBit\NTumbleBit.csproj", "{29E411B1-5687-43EE-A71B-6CCEC2289129}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Daemon", "src\Breeze.Daemon\Breeze.Daemon.csproj", "{AAF6163B-1BE2-48CE-9F9F-577C6D7AAB8D}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Breeze.Daemon", "src\Breeze.Daemon\Breeze.Daemon.csproj", "{AAF6163B-1BE2-48CE-9F9F-577C6D7AAB8D}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stratis.Bitcoin", "..\StratisBitcoinFullNode\Stratis.Bitcoin\Stratis.Bitcoin.csproj", "{C93CB29F-C0A1-40D6-A4CC-B93C75423ED5}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stratis.Bitcoin", "..\StratisBitcoinFullNode\Stratis.Bitcoin\Stratis.Bitcoin.csproj", "{C93CB29F-C0A1-40D6-A4CC-B93C75423ED5}"
...@@ -54,14 +48,6 @@ Global ...@@ -54,14 +48,6 @@ Global
{D16CD478-9D1E-4C69-91AD-43539E94A215}.Debug|Any CPU.Build.0 = Debug|Any CPU {D16CD478-9D1E-4C69-91AD-43539E94A215}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D16CD478-9D1E-4C69-91AD-43539E94A215}.Release|Any CPU.ActiveCfg = Release|Any CPU {D16CD478-9D1E-4C69-91AD-43539E94A215}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D16CD478-9D1E-4C69-91AD-43539E94A215}.Release|Any CPU.Build.0 = Release|Any CPU {D16CD478-9D1E-4C69-91AD-43539E94A215}.Release|Any CPU.Build.0 = Release|Any CPU
{2490DD1A-6C14-47F2-A9C6-56761A52E2D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2490DD1A-6C14-47F2-A9C6-56761A52E2D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2490DD1A-6C14-47F2-A9C6-56761A52E2D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2490DD1A-6C14-47F2-A9C6-56761A52E2D9}.Release|Any CPU.Build.0 = Release|Any CPU
{29E411B1-5687-43EE-A71B-6CCEC2289129}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29E411B1-5687-43EE-A71B-6CCEC2289129}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29E411B1-5687-43EE-A71B-6CCEC2289129}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29E411B1-5687-43EE-A71B-6CCEC2289129}.Release|Any CPU.Build.0 = Release|Any CPU
{AAF6163B-1BE2-48CE-9F9F-577C6D7AAB8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AAF6163B-1BE2-48CE-9F9F-577C6D7AAB8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AAF6163B-1BE2-48CE-9F9F-577C6D7AAB8D}.Debug|Any CPU.Build.0 = Debug|Any CPU {AAF6163B-1BE2-48CE-9F9F-577C6D7AAB8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AAF6163B-1BE2-48CE-9F9F-577C6D7AAB8D}.Release|Any CPU.ActiveCfg = Release|Any CPU {AAF6163B-1BE2-48CE-9F9F-577C6D7AAB8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
...@@ -90,8 +76,6 @@ Global ...@@ -90,8 +76,6 @@ Global
{E7B3E9EB-34E8-4B10-B296-4D5270E314A4} = {807563C4-7259-434D-B604-A14C3DCF8E30} {E7B3E9EB-34E8-4B10-B296-4D5270E314A4} = {807563C4-7259-434D-B604-A14C3DCF8E30}
{BD5174B4-DCE8-4594-9A16-B83E56767770} = {807563C4-7259-434D-B604-A14C3DCF8E30} {BD5174B4-DCE8-4594-9A16-B83E56767770} = {807563C4-7259-434D-B604-A14C3DCF8E30}
{D16CD478-9D1E-4C69-91AD-43539E94A215} = {807563C4-7259-434D-B604-A14C3DCF8E30} {D16CD478-9D1E-4C69-91AD-43539E94A215} = {807563C4-7259-434D-B604-A14C3DCF8E30}
{2490DD1A-6C14-47F2-A9C6-56761A52E2D9} = {807563C4-7259-434D-B604-A14C3DCF8E30}
{29E411B1-5687-43EE-A71B-6CCEC2289129} = {1B724678-2B73-483E-B981-3A6733C2194E}
{AAF6163B-1BE2-48CE-9F9F-577C6D7AAB8D} = {807563C4-7259-434D-B604-A14C3DCF8E30} {AAF6163B-1BE2-48CE-9F9F-577C6D7AAB8D} = {807563C4-7259-434D-B604-A14C3DCF8E30}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal
...@@ -6,43 +6,42 @@ using Microsoft.Extensions.Logging; ...@@ -6,43 +6,42 @@ using Microsoft.Extensions.Logging;
using Stratis.Bitcoin; using Stratis.Bitcoin;
using Stratis.Bitcoin.Builder; using Stratis.Bitcoin.Builder;
using Stratis.Bitcoin.Builder.Feature; using Stratis.Bitcoin.Builder.Feature;
using Stratis.Bitcoin.Logging;
using Stratis.Bitcoin.Utilities; using Stratis.Bitcoin.Utilities;
namespace Breeze.Api namespace Breeze.Api
{ {
/// <summary> /// <summary>
/// Provides an Api to the full node /// Provides an Api to the full node
/// </summary> /// </summary>
public class ApiFeature : FullNodeFeature public class ApiFeature : FullNodeFeature
{ {
private readonly IFullNodeBuilder fullNodeBuilder; private readonly IFullNodeBuilder fullNodeBuilder;
private readonly FullNode fullNode; private readonly FullNode fullNode;
private readonly ApiFeatureOptions apiFeatureOptions; private readonly ApiFeatureOptions apiFeatureOptions;
private readonly IAsyncLoopFactory asyncLoopFactory; private readonly IAsyncLoopFactory asyncLoopFactory;
private readonly ILogger logger; private readonly ILogger logger;
public ApiFeature( public ApiFeature(
IFullNodeBuilder fullNodeBuilder, IFullNodeBuilder fullNodeBuilder,
FullNode fullNode, FullNode fullNode,
ApiFeatureOptions apiFeatureOptions, ApiFeatureOptions apiFeatureOptions,
IAsyncLoopFactory asyncLoopFactory, IAsyncLoopFactory asyncLoopFactory,
ILoggerFactory loggerFactory) ILoggerFactory loggerFactory)
{ {
this.fullNodeBuilder = fullNodeBuilder; this.fullNodeBuilder = fullNodeBuilder;
this.fullNode = fullNode; this.fullNode = fullNode;
this.apiFeatureOptions = apiFeatureOptions; this.apiFeatureOptions = apiFeatureOptions;
this.asyncLoopFactory = asyncLoopFactory; this.asyncLoopFactory = asyncLoopFactory;
this.logger = loggerFactory.CreateLogger(this.GetType().FullName); this.logger = loggerFactory.CreateLogger(this.GetType().FullName);
} }
public override void Start() public override void Start()
{ {
this.logger.LogInformation($"Api starting on url {this.fullNode.Settings.ApiUri}"); this.logger.LogInformation($"Api starting on url {this.fullNode.Settings.ApiUri}");
Program.Initialize(this.fullNodeBuilder.Services, this.fullNode); Program.Initialize(this.fullNodeBuilder.Services, this.fullNode);
this.TryStartKeepaliveMonitor(); this.TryStartKeepaliveMonitor();
} }
/// <summary> /// <summary>
/// A KeepaliveMonitor when enabled will shutdown the /// A KeepaliveMonitor when enabled will shutdown the
...@@ -50,26 +49,26 @@ namespace Breeze.Api ...@@ -50,26 +49,26 @@ namespace Breeze.Api
/// during a certain trashold window /// during a certain trashold window
/// </summary> /// </summary>
public void TryStartKeepaliveMonitor() public void TryStartKeepaliveMonitor()
{ {
if (this.apiFeatureOptions.KeepaliveMonitor?.KeepaliveInterval.TotalSeconds > 0) if (this.apiFeatureOptions.KeepaliveMonitor?.KeepaliveInterval.TotalSeconds > 0)
{ {
this.asyncLoopFactory.Run("ApiFeature.KeepaliveMonitor", token => this.asyncLoopFactory.Run("ApiFeature.KeepaliveMonitor", token =>
{ {
// shortened for redability // shortened for redability
var monitor = this.apiFeatureOptions.KeepaliveMonitor; var monitor = this.apiFeatureOptions.KeepaliveMonitor;
// check the trashold to trigger a shutdown // check the trashold to trigger a shutdown
if (monitor.LastBeat.Add(monitor.KeepaliveInterval) < DateTime.UtcNow) if (monitor.LastBeat.Add(monitor.KeepaliveInterval) < DateTime.UtcNow)
this.fullNode.Stop(); this.fullNode.Stop();
return Task.CompletedTask; return Task.CompletedTask;
}, },
this.fullNode.NodeLifetime.ApplicationStopping, this.fullNode.NodeLifetime.ApplicationStopping,
repeatEvery: this.apiFeatureOptions.KeepaliveMonitor?.KeepaliveInterval, repeatEvery: this.apiFeatureOptions.KeepaliveMonitor?.KeepaliveInterval,
startAfter: TimeSpans.Minute); startAfter: TimeSpans.Minute);
} }
} }
} }
public class ApiFeatureOptions public class ApiFeatureOptions
{ {
...@@ -82,25 +81,25 @@ namespace Breeze.Api ...@@ -82,25 +81,25 @@ namespace Breeze.Api
} }
public static class ApiFeatureExtension public static class ApiFeatureExtension
{ {
public static IFullNodeBuilder UseApi(this IFullNodeBuilder fullNodeBuilder, Action<ApiFeatureOptions> optionsAction = null) public static IFullNodeBuilder UseApi(this IFullNodeBuilder fullNodeBuilder, Action<ApiFeatureOptions> optionsAction = null)
{ {
// TODO: move the options in to the feature builder // TODO: move the options in to the feature builder
var options = new ApiFeatureOptions(); var options = new ApiFeatureOptions();
optionsAction?.Invoke(options); optionsAction?.Invoke(options);
fullNodeBuilder.ConfigureFeature(features => fullNodeBuilder.ConfigureFeature(features =>
{ {
features features
.AddFeature<ApiFeature>() .AddFeature<ApiFeature>()
.FeatureServices(services => .FeatureServices(services =>
{ {
services.AddSingleton(fullNodeBuilder); services.AddSingleton(fullNodeBuilder);
services.AddSingleton(options); services.AddSingleton(options);
}); });
}); });
return fullNodeBuilder; return fullNodeBuilder;
} }
} }
} }
using System; using System;
using System.ComponentModel.DataAnnotations;
using Breeze.Api.Models;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Stratis.Bitcoin; using Stratis.Bitcoin;
using Stratis.Bitcoin.Builder; using Stratis.Bitcoin.Builder;
namespace Breeze.Api.Controllers namespace Breeze.Api.Controllers
{ {
[Route("api/[controller]")] [Route("api/[controller]")]
public class NodeController : Controller public class NodeController : Controller
{ {
private readonly IFullNode fullNode; private readonly IFullNode fullNode;
private readonly ApiFeatureOptions apiFeatureOptions; private readonly ApiFeatureOptions apiFeatureOptions;
public NodeController(IFullNode fullNode, ApiFeatureOptions apiFeatureOptions) public NodeController(IFullNode fullNode, ApiFeatureOptions apiFeatureOptions)
{ {
this.fullNode = fullNode; this.fullNode = fullNode;
this.apiFeatureOptions = apiFeatureOptions; this.apiFeatureOptions = apiFeatureOptions;
} }
/// <summary> /// <summary>
/// Returns some general information about the status of the underlying node. /// Returns some general information about the status of the underlying node.
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[Route("status")] [Route("status")]
public IActionResult Status() public IActionResult Status()
{ {
return this.NotFound(); return this.NotFound();
} }
/// <summary> /// <summary>
/// Trigger a shoutdown of the current running node. /// Trigger a shoutdown of the current running node.
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("shutdown")] [Route("shutdown")]
public IActionResult Shutdown() public IActionResult Shutdown()
{ {
// start the node shutdown process // start the node shutdown process
this.fullNode.Stop(); this.fullNode.Stop();
return this.Ok(); return this.Ok();
} }
/// <summary>
/// Set the keepalive flag.
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("keepalive")]
public IActionResult Keepalive()
{
if (this.apiFeatureOptions.KeepaliveMonitor == null)
return new ObjectResult("Keepalive Disabled") {StatusCode = 405}; // (405) Method Not Allowed
this.apiFeatureOptions.KeepaliveMonitor.LastBeat = DateTime.UtcNow; /// <summary>
/// Set the keepalive flag.
return this.Ok(); /// </summary>
} /// <returns></returns>
} [HttpPost]
[Route("keepalive")]
public IActionResult Keepalive()
{
if (this.apiFeatureOptions.KeepaliveMonitor == null)
return new ObjectResult("Keepalive Disabled") {StatusCode = 405}; // (405) Method Not Allowed
this.apiFeatureOptions.KeepaliveMonitor.LastBeat = DateTime.UtcNow;
return this.Ok();
}
}
} }
\ No newline at end of file
...@@ -7,22 +7,22 @@ namespace Breeze.Api ...@@ -7,22 +7,22 @@ namespace Breeze.Api
{ {
public static class MvcBuilderExtensions public static class MvcBuilderExtensions
{ {
/// <summary> /// <summary>
/// Finds all the types that are <see cref="Controller"/> and add them to the Api as services. /// Finds all the types that are <see cref="Controller"/> and add them to the Api as services.
/// </summary> /// </summary>
/// <param name="builder">The builder</param> /// <param name="builder">The builder</param>
/// <param name="services">The services to look into</param> /// <param name="services">The services to look into</param>
/// <returns>The Mvc builder</returns> /// <returns>The Mvc builder</returns>
public static IMvcBuilder AddControllers(this IMvcBuilder builder, IServiceCollection services) public static IMvcBuilder AddControllers(this IMvcBuilder builder, IServiceCollection services)
{ {
var controllerTypes = services.Where(s => s.ServiceType.GetTypeInfo().BaseType == typeof(Controller)); var controllerTypes = services.Where(s => s.ServiceType.GetTypeInfo().BaseType == typeof(Controller));
foreach (var controllerType in controllerTypes) foreach (var controllerType in controllerTypes)
{ {
builder.AddApplicationPart(controllerType.ServiceType.GetTypeInfo().Assembly); builder.AddApplicationPart(controllerType.ServiceType.GetTypeInfo().Assembly);
} }
builder.AddControllersAsServices(); builder.AddControllersAsServices();
return builder; return builder;
} }
} }
} }
...@@ -6,45 +6,45 @@ using Stratis.Bitcoin; ...@@ -6,45 +6,45 @@ using Stratis.Bitcoin;
namespace Breeze.Api namespace Breeze.Api
{ {
public class Program public class Program
{ {
public static void Main(string[] args) public static void Main(string[] args)
{ {
} }
public static void Initialize(IEnumerable<ServiceDescriptor> services, FullNode fullNode) public static void Initialize(IEnumerable<ServiceDescriptor> services, FullNode fullNode)
{ {
var host = new WebHostBuilder() var host = new WebHostBuilder()
.UseKestrel() .UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory()) .UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration() .UseIISIntegration()
.UseUrls(fullNode.Settings.ApiUri.ToString()) .UseUrls(fullNode.Settings.ApiUri.ToString())
.ConfigureServices(collection => .ConfigureServices(collection =>
{ {
if (services == null || fullNode == null) if (services == null || fullNode == null)
{ {
return; return;
} }
// copies all the services defined for the full node to the Api.
// also copies over singleton instances already defined
foreach (var service in services)
{
var obj = fullNode.Services.ServiceProvider.GetService(service.ServiceType);
if (obj != null && service.Lifetime == ServiceLifetime.Singleton && service.ImplementationInstance == null)
{
collection.AddSingleton(service.ServiceType, obj);
}
else
{
collection.Add(service);
}
}
})
.UseStartup<Startup>()
.Build();
host.Start(); // copies all the services defined for the full node to the Api.
} // also copies over singleton instances already defined
} foreach (var service in services)
{
var obj = fullNode.Services.ServiceProvider.GetService(service.ServiceType);
if (obj != null && service.Lifetime == ServiceLifetime.Singleton && service.ImplementationInstance == null)
{
collection.AddSingleton(service.ServiceType, obj);
}
else
{
collection.Add(service);
}
}
})
.UseStartup<Startup>()
.Build();
host.Start();
}
}
} }
...@@ -11,83 +11,83 @@ using Swashbuckle.AspNetCore.Swagger; ...@@ -11,83 +11,83 @@ using Swashbuckle.AspNetCore.Swagger;
namespace Breeze.Api namespace Breeze.Api
{ {
public class Startup public class Startup
{ {
public Startup(IHostingEnvironment env) public Startup(IHostingEnvironment env)
{ {
var builder = new ConfigurationBuilder() var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath) .SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
.AddEnvironmentVariables(); .AddEnvironmentVariables();
Configuration = builder.Build(); Configuration = builder.Build();
} }
public IConfigurationRoot Configuration { get; } public IConfigurationRoot Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container. // This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
{ {
// Add service and create Policy to allow Cross-Origin Requests // Add service and create Policy to allow Cross-Origin Requests
services.AddCors services.AddCors
( (
options => options =>
{ {
options.AddPolicy options.AddPolicy
( (
"CorsPolicy", "CorsPolicy",
builder => builder =>
{ {
var allowedDomains = new[]{"http://localhost","http://localhost:4200"}; var allowedDomains = new[] { "http://localhost", "http://localhost:4200" };
builder builder
.WithOrigins(allowedDomains) .WithOrigins(allowedDomains)
.AllowAnyMethod() .AllowAnyMethod()
.AllowAnyHeader() .AllowAnyHeader()
.AllowCredentials(); .AllowCredentials();
} }
); );
}); });
// Add framework services.
services.AddMvc(options => options.Filters.Add(typeof(LoggingActionFilter)))
// add serializers for NBitcoin objects
.AddJsonOptions(options => NBitcoin.JsonConverters.Serializer.RegisterFrontConverters(options.SerializerSettings))
.AddControllers(services);
// Register the Swagger generator, defining one or more Swagger documents // Add framework services.
services.AddSwaggerGen(setup => services.AddMvc(options => options.Filters.Add(typeof(LoggingActionFilter)))
{ // add serializers for NBitcoin objects
setup.SwaggerDoc("v1", new Info { Title = "Breeze.Api", Version = "v1" }); .AddJsonOptions(options => NBitcoin.JsonConverters.Serializer.RegisterFrontConverters(options.SerializerSettings))
.AddControllers(services);
//Set the comments path for the swagger json and ui. // Register the Swagger generator, defining one or more Swagger documents
var basePath = PlatformServices.Default.Application.ApplicationBasePath; services.AddSwaggerGen(setup =>
var apiXmlPath = Path.Combine(basePath, "Breeze.Api.xml"); {
var walletXmlPath = Path.Combine(basePath, "Breeze.Wallet.xml"); setup.SwaggerDoc("v1", new Info { Title = "Breeze.Api", Version = "v1" });
setup.IncludeXmlComments(apiXmlPath);
setup.IncludeXmlComments(walletXmlPath); //Set the comments path for the swagger json and ui.
var basePath = PlatformServices.Default.Application.ApplicationBasePath;
var apiXmlPath = Path.Combine(basePath, "Breeze.Api.xml");
var walletXmlPath = Path.Combine(basePath, "Breeze.Wallet.xml");
setup.IncludeXmlComments(apiXmlPath);
setup.IncludeXmlComments(walletXmlPath);
}); });
} }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{ {
loggerFactory.AddConsole(this.Configuration.GetSection("Logging")); loggerFactory.AddConsole(this.Configuration.GetSection("Logging"));
loggerFactory.AddDebug(); loggerFactory.AddDebug();
app.UseCors("CorsPolicy"); app.UseCors("CorsPolicy");
app.UseMvc(); app.UseMvc();
// Enable middleware to serve generated Swagger as a JSON endpoint. // Enable middleware to serve generated Swagger as a JSON endpoint.
app.UseSwagger(); app.UseSwagger();
// Enable middleware to serve swagger-ui (HTML, JS, CSS etc.), specifying the Swagger JSON endpoint. // Enable middleware to serve swagger-ui (HTML, JS, CSS etc.), specifying the Swagger JSON endpoint.
app.UseSwaggerUI(c => app.UseSwaggerUI(c =>
{ {
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Breeze.Api V1"); c.SwaggerEndpoint("/swagger/v1/swagger.json", "Breeze.Api V1");
}); });
} }
} }
} }
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\StratisBitcoinFullNode\Stratis.Bitcoin\Stratis.Bitcoin.csproj" /> <ProjectReference Include="..\..\..\StratisBitcoinFullNode\Stratis.Bitcoin\Stratis.Bitcoin.csproj" />
<ProjectReference Include="..\Breeze.Api\Breeze.Api.csproj" /> <ProjectReference Include="..\Breeze.Api\Breeze.Api.csproj" />
<ProjectReference Include="..\Breeze.TumbleBit.Client\Breeze.TumbleBit.Client.csproj" />
<ProjectReference Include="..\Breeze.Wallet\Breeze.Wallet.csproj" /> <ProjectReference Include="..\Breeze.Wallet\Breeze.Wallet.csproj" />
</ItemGroup> </ItemGroup>
...@@ -25,7 +24,7 @@ ...@@ -25,7 +24,7 @@
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<RuntimeIdentifiers>win10-x64;osx.10.10-x64;ubuntu.14.04-x64;ubuntu.16.04-x64</RuntimeIdentifiers> <RuntimeIdentifiers>win7-x86;win7-x64;win10-x86;win10-x64;osx.10.10-x64;osx.10.11-x64;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64</RuntimeIdentifiers>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
using System; using System;
using System.Linq; using System.Linq;
using System.Threading;
using Breeze.Api; using Breeze.Api;
using Stratis.Bitcoin; using Stratis.Bitcoin;
using Stratis.Bitcoin.Builder; using Stratis.Bitcoin.Builder;
using Stratis.Bitcoin.Configuration; using Stratis.Bitcoin.Configuration;
using Stratis.Bitcoin.Logging;
using Breeze.Wallet; using Breeze.Wallet;
using NBitcoin; using NBitcoin;
using NBitcoin.Protocol; using NBitcoin.Protocol;
...@@ -88,17 +86,7 @@ namespace Breeze.Daemon ...@@ -88,17 +86,7 @@ namespace Breeze.Daemon
.UseApi(); .UseApi();
} }
} }
// TODO: Add this when TB is enabled
//// add the tumbler's settings
//var tumblerAddress = args.SingleOrDefault(arg => arg.StartsWith("-tumbler-uri="));
//if (!string.IsNullOrEmpty(tumblerAddress))
//{
// tumblerAddress = tumblerAddress.Replace("-tumbler-uri=", string.Empty);
// fullNodeBuilder.UseTumbleBit(new Uri(tumblerAddress));
// fullNodeBuilder.UseWatchOnlyWallet();
//}
var node = fullNodeBuilder.Build(); var node = fullNodeBuilder.Build();
//start Full Node - this will also start the API //start Full Node - this will also start the API
......
using System; using System.Threading;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Stratis.Bitcoin.Builder.Feature; using Stratis.Bitcoin.Builder.Feature;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
...@@ -24,9 +23,9 @@ namespace Breeze.Wallet ...@@ -24,9 +23,9 @@ namespace Breeze.Wallet
private readonly ConcurrentChain chain; private readonly ConcurrentChain chain;
private readonly NodeDeployments nodeDeployments; private readonly NodeDeployments nodeDeployments;
private readonly IAsyncLoopFactory asyncLoopFactory; private readonly IAsyncLoopFactory asyncLoopFactory;
private readonly INodeLifetime nodeLifetime; private readonly INodeLifetime nodeLifetime;
public LightWalletFeature(IWalletSyncManager walletSyncManager, IWalletManager walletManager, IConnectionManager connectionManager, public LightWalletFeature(IWalletSyncManager walletSyncManager, IWalletManager walletManager, IConnectionManager connectionManager,
ConcurrentChain chain, NodeDeployments nodeDeployments, IAsyncLoopFactory asyncLoopFactory, INodeLifetime nodeLifetime) ConcurrentChain chain, NodeDeployments nodeDeployments, IAsyncLoopFactory asyncLoopFactory, INodeLifetime nodeLifetime)
{ {
this.walletSyncManager = walletSyncManager; this.walletSyncManager = walletSyncManager;
...@@ -35,7 +34,7 @@ namespace Breeze.Wallet ...@@ -35,7 +34,7 @@ namespace Breeze.Wallet
this.chain = chain; this.chain = chain;
this.nodeDeployments = nodeDeployments; this.nodeDeployments = nodeDeployments;
this.asyncLoopFactory = asyncLoopFactory; this.asyncLoopFactory = asyncLoopFactory;
this.nodeLifetime = nodeLifetime; this.nodeLifetime = nodeLifetime;
} }
public override void Start() public override void Start()
......
using System; using System;
using System.Linq; using System.Linq;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using NBitcoin; using NBitcoin;
...@@ -22,20 +21,20 @@ namespace Breeze.Wallet ...@@ -22,20 +21,20 @@ namespace Breeze.Wallet
private readonly ILogger logger; private readonly ILogger logger;
private readonly Signals signals; private readonly Signals signals;
private ChainedBlock walletTip; private ChainedBlock walletTip;
private readonly INodeLifetime nodeLifetime; private readonly INodeLifetime nodeLifetime;
private readonly IAsyncLoopFactory asyncLoopFactory; private readonly IAsyncLoopFactory asyncLoopFactory;
public ChainedBlock WalletTip => this.walletTip; public ChainedBlock WalletTip => this.walletTip;
public LightWalletSyncManager( public LightWalletSyncManager(
ILoggerFactory loggerFactory, ILoggerFactory loggerFactory,
IWalletManager walletManager, IWalletManager walletManager,
ConcurrentChain chain, ConcurrentChain chain,
Network network, Network network,
BlockNotification blockNotification, BlockNotification blockNotification,
Signals signals, Signals signals,
INodeLifetime nodeLifetime, INodeLifetime nodeLifetime,
IAsyncLoopFactory asyncLoopFactory) IAsyncLoopFactory asyncLoopFactory)
{ {
this.walletManager = walletManager as WalletManager; this.walletManager = walletManager as WalletManager;
this.chain = chain; this.chain = chain;
...@@ -44,7 +43,7 @@ namespace Breeze.Wallet ...@@ -44,7 +43,7 @@ namespace Breeze.Wallet
this.coinType = (CoinType)network.Consensus.CoinType; this.coinType = (CoinType)network.Consensus.CoinType;
this.logger = loggerFactory.CreateLogger(this.GetType().FullName); this.logger = loggerFactory.CreateLogger(this.GetType().FullName);
this.nodeLifetime = nodeLifetime; this.nodeLifetime = nodeLifetime;
this.asyncLoopFactory = asyncLoopFactory; this.asyncLoopFactory = asyncLoopFactory;
} }
/// <inheritdoc /> /// <inheritdoc />
...@@ -182,7 +181,7 @@ namespace Breeze.Wallet ...@@ -182,7 +181,7 @@ namespace Breeze.Wallet
// if the chain is already past the height we want to sync from, we don't wait, even though the chain might not be fully downloaded. // if the chain is already past the height we want to sync from, we don't wait, even though the chain might not be fully downloaded.
if (this.chain.Tip.Height < height) if (this.chain.Tip.Height < height)
{ {
this.asyncLoopFactory.RunUntil("WalletFeature.DownloadChain", this.nodeLifetime.ApplicationStopping, this.asyncLoopFactory.RunUntil("WalletFeature.DownloadChain", this.nodeLifetime.ApplicationStopping,
() => this.chain.Tip.Height >= height, () => this.chain.Tip.Height >= height,
() => this.StartSync(height), () => this.StartSync(height),
(ex) => (ex) =>
......
...@@ -48,18 +48,23 @@ To skip a build, for example if you've made very minor changes, include the text ...@@ -48,18 +48,23 @@ To skip a build, for example if you've made very minor changes, include the text
If you want the :sparkles: latest :sparkles: (unstable :bomb:) version of the Breeze app, you can get it here: If you want the :sparkles: latest :sparkles: (unstable :bomb:) version of the Breeze app, you can get it here:
| | x86 Release | x64 Release | | | x86 Release | x64 Release | Notes |
|:---|----------------:|------------------:| |:---|----------------:|------------------:|------------------:|
|**Windows 7**| [download][7] | [download][8] | |**Windows 7**| [download][7] | [download][8] | continuous build - up to date with commits |
|**Windows 10**| [download][9] | [download][10] | |**Windows 10**| [download][9] | [download][10] | continuous build - up to date with commits |
|**Ubuntu 14.04**| - | coming soon | |**Ubuntu 14.04**| - | coming soon | manual build |
|**OS X 10.11**| - | coming soon | |**Ubuntu 16.04**| - | coming soon | manual build |
|**OS X 10.12**| - | coming soon | |**OS X 10.11**| - | [download][13] | continuous build - up to date with commits |
|**OS X 10.12**| - | [download][14] | continuous build - up to date with commits |
[7]: https://ci.appveyor.com/api/projects/stratis/breeze/artifacts/breeze_out/breeze-win7-x86-Release.zip?job=Environment%3A%20win_runtime%3Dwin7-x86%3B%20Configuration%3A%20Release
[8]: https://ci.appveyor.com/api/projects/stratis/breeze/artifacts/breeze_out/breeze-win7-x64-Release.zip?job=Environment%3A%20win_runtime%3Dwin7-x64%3B%20Configuration%3A%20Release [7]: https://ci.appveyor.com/api/projects/stratis/breeze/artifacts/breeze_out/breeze-win7-x86-Release.zip?job=Environment%3A%20win_runtime%3Dwin7-x86
[9]: https://ci.appveyor.com/api/projects/stratis/breeze/artifacts/breeze_out/breeze-win10-x86-Release.zip?job=Environment%3A%20win_runtime%3Dwin10-x86%3B%20Configuration%3A%20Release [8]: https://ci.appveyor.com/api/projects/stratis/breeze/artifacts/breeze_out/breeze-win7-x64-Release.zip?job=Environment%3A%20win_runtime%3Dwin7-x64
[10]: https://ci.appveyor.com/api/projects/stratis/breeze/artifacts/breeze_out/breeze-win10-x64-Release.zip?job=Environment%3A%20win_runtime%3Dwin10-x64%3B%20Configuration%3A%20Release [9]: https://ci.appveyor.com/api/projects/stratis/breeze/artifacts/breeze_out/breeze-win10-x86-Release.zip?job=Environment%3A%20win_runtime%3Dwin10-x86
[10]: https://ci.appveyor.com/api/projects/stratis/breeze/artifacts/breeze_out/breeze-win10-x64-Release.zip?job=Environment%3A%20win_runtime%3Dwin10-x64
[11]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/breeze-ubuntu.14.04-x64-Release.zip
[12]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/breeze-ubuntu.14.04-x64-Release.zip
[13]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/breeze-osx.10.11-x64-Release.zip
[14]: https://github.com/stratisproject/Breeze/releases/download/cd-unstable/breeze-osx.10.12-x64-Release.zip
...@@ -21,26 +21,30 @@ branches: ...@@ -21,26 +21,30 @@ branches:
image: Visual Studio 2017 image: Visual Studio 2017
clone_folder: c:\projects\breeze clone_folder: c:\projects\breeze
configuration: configuration:
- Debug # - Debug
- Release - Release
build:
parallel: true
environment: environment:
matrix: matrix:
- win_runtime: win7-x64 - win_runtime: win7-x64
arch: x64
plat: win32
- win_runtime: win7-x86 - win_runtime: win7-x86
arch: ia32
plat: win32
- win_runtime: win10-x64 - win_runtime: win10-x64
arch: x64
plat: win32
- win_runtime: win10-x86 - win_runtime: win10-x86
arch: ia32
plat: win32
init: init:
- ps: | - ps: |
$env:log_prefix = "[$env:win_runtime][$env:configuration]" $env:log_prefix = "[$env:win_runtime][$env:configuration]"
if($env:win_runtime -ilike "*x86")
{
$env:arch = "ia32"
}
else
{
$env:arch = "x64"
}
$env:app_output_name = "breeze-$env:win_runtime-$env:configuration" $env:app_output_name = "breeze-$env:win_runtime-$env:configuration"
$env:api_output_name = "api-$env:win_runtime-$env:configuration" $env:api_output_name = "api-$env:win_runtime-$env:configuration"
...@@ -53,8 +57,7 @@ before_build: ...@@ -53,8 +57,7 @@ before_build:
cd Breeze cd Breeze
# Initialize dependencies # Initialize dependencies
git submodule init git submodule update --init --recursive
git submodule update
dotnet restore -v m dotnet restore -v m
cd ../Breeze.UI cd ../Breeze.UI
...@@ -72,7 +75,7 @@ build_script: ...@@ -72,7 +75,7 @@ build_script:
Write-Host "$env:log_prefix running 'dotnet publish'" -foregroundcolor "magenta" Write-Host "$env:log_prefix running 'dotnet publish'" -foregroundcolor "magenta"
dotnet publish -c $env:configuration -v m -r $env:win_runtime -o $env:APPVEYOR_BUILD_FOLDER\dotnet_out\$env:win_runtime dotnet publish -c $env:configuration -v m -r $env:win_runtime -o $env:APPVEYOR_BUILD_FOLDER\dotnet_out\$env:win_runtime
Write-Host "$env:log_prefix zipping results of 'dotnet publish'" -foregroundcolor "magenta" Write-Host "$env:log_prefix zipping results of 'dotnet publish'" -foregroundcolor "magenta"
7z a $env:APPVEYOR_BUILD_FOLDER\dotnet_out\$env:api_output_name.zip $env:APPVEYOR_BUILD_FOLDER\dotnet_out\$env:win_runtime\* 7z a $env:APPVEYOR_BUILD_FOLDER\dotnet_out\$env:api_output_name.zip $env:APPVEYOR_BUILD_FOLDER\dotnet_out\$env:win_runtime\*
cd ../../../Breeze.UI cd ../../../Breeze.UI
...@@ -80,11 +83,13 @@ build_script: ...@@ -80,11 +83,13 @@ build_script:
Write-Host "$env:log_prefix running 'npm run'" -foregroundcolor "magenta" Write-Host "$env:log_prefix running 'npm run'" -foregroundcolor "magenta"
npm run build:prod npm run build:prod
Write-Host "$env:log_prefix packaging breeze" -foregroundcolor "magenta" Write-Host "$env:log_prefix packaging breeze" -foregroundcolor "magenta"
node package.js --platform=win32 --arch=$env:arch --path=$env:APPVEYOR_BUILD_FOLDER\breeze_out node package.js --platform=$env:plat --arch=$env:arch --path=$env:APPVEYOR_BUILD_FOLDER\breeze_out
Write-Host "$env:log_prefix copying the Breeze api into the app" -foregroundcolor "magenta" Write-Host "$env:log_prefix copying the Breeze api into the app" -foregroundcolor "magenta"
xcopy /s $env:APPVEYOR_BUILD_FOLDER\dotnet_out\$env:win_runtime\* $env:APPVEYOR_BUILD_FOLDER\breeze_out\breeze-ui-win32-$env:arch\resources\app\assets\daemon\ New-Item -Path $env:APPVEYOR_BUILD_FOLDER\breeze_out\breeze-ui-$env:plat-$env:arch\resources\app\assets\daemon -ItemType directory
xcopy /s $env:APPVEYOR_BUILD_FOLDER\dotnet_out\$env:win_runtime\* $env:APPVEYOR_BUILD_FOLDER\breeze_out\breeze-ui-$env:plat-$env:arch\resources\app\assets\daemon\
Write-Host "$env:log_prefix zipping the result" -foregroundcolor "magenta" Write-Host "$env:log_prefix zipping the result" -foregroundcolor "magenta"
7z a $env:APPVEYOR_BUILD_FOLDER\breeze_out\$env:app_output_name.zip $env:APPVEYOR_BUILD_FOLDER\breeze_out\breeze-ui-win32-$env:arch\* 7z a $env:APPVEYOR_BUILD_FOLDER\breeze_out\$env:app_output_name.zip $env:APPVEYOR_BUILD_FOLDER\breeze_out\breeze-ui-$env:plat-$env:arch
Write-Host "[$env:configuration][$env:win_runtime] FINISHED dotnet build" -foregroundcolor "magenta" Write-Host "[$env:configuration][$env:win_runtime] FINISHED dotnet build" -foregroundcolor "magenta"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
......
...@@ -3,44 +3,61 @@ ...@@ -3,44 +3,61 @@
# exit if error # exit if error
set -o errexit set -o errexit
if [ "$TRAVIS_OS_NAME" = "osx" ]
then
dotnet_resources_path_in_app=$TRAVIS_BUILD_DIR/breeze_out/breeze-ui-$os_platform-$arch/breeze-ui.app/contents/resources/app/assets/daemon
else
dotnet_resources_path_in_app=$TRAVIS_BUILD_DIR/breeze_out/breeze-ui-$os_platform-$arch/resources/app/assets/daemon
fi
# define a few variables
app_output_name="breeze-$os_identifier-$arch-$configuration"
api_output_name="api-$os_identifier-$arch-$configuration"
echo "current environment variables:" echo "current environment variables:"
echo "OS name:" $TRAVIS_OS_NAME echo "OS name:" $TRAVIS_OS_NAME
echo "OS identifier:" $os_identifier
echo "Platform:" $os_platform echo "Platform:" $os_platform
echo "Build directory:" $TRAVIS_BUILD_DIR echo "Build directory:" $TRAVIS_BUILD_DIR
echo "Node version:" $TRAVIS_NODE_VERSION echo "Node version:" $TRAVIS_NODE_VERSION
echo "Architecture:" $arch echo "Architecture:" $arch
echo "Configuration:" $configuration echo "Configuration:" $configuration
echo "App output name" $app_output_name echo "App output name:" $app_output_name
echo "Api output name" $api_output_name echo "Api output name:" $api_output_name
echo "dotnet resources path in app:" $dotnet_resources_path_in_app
dotnet --info dotnet --info
# Initialize dependencies # Initialize dependencies
echo $log_prefix STARTED restoring dotnet and npm packages echo $log_prefix STARTED restoring dotnet and npm packages
cd Breeze cd $TRAVIS_BUILD_DIR/Breeze
git submodule init git submodule update --init --recursive
git submodule update
dotnet restore -v m dotnet restore -v m
cd ../Breeze.UI cd $TRAVIS_BUILD_DIR/Breeze.UI
npm install npm install
echo $log_prefix FINISHED restoring dotnet and npm packages echo $log_prefix FINISHED restoring dotnet and npm packages
# dotnet build # dotnet build
echo $log_prefix running 'dotnet build' echo $log_prefix running 'dotnet build'
cd ../Breeze/src/Breeze.Daemon cd $TRAVIS_BUILD_DIR/Breeze/src/Breeze.Daemon
dotnet build -c $configuration -v m dotnet build -c $configuration -r $os_identifier-$arch -v m
echo $log_prefix running 'dotnet publish' echo $log_prefix running 'dotnet publish'
dotnet publish -c $configuration -v m -o $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME dotnet publish -c $configuration -r $os_identifier-$arch -v m -o $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME
echo $log_prefix chmoding the Breeze.Daemon file
chmod +x $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME/Breeze.Daemon
echo $log_prefix zipping results of 'dotnet publish' into $TRAVIS_BUILD_DIR/dotnet_out/$api_output_name.zip echo $log_prefix zipping results of 'dotnet publish' into $TRAVIS_BUILD_DIR/dotnet_out/$api_output_name.zip
mkdir -p $TRAVIS_BUILD_DIR/deploy/ mkdir -p $TRAVIS_BUILD_DIR/deploy/
zip -r $TRAVIS_BUILD_DIR/deploy/$api_output_name.zip $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME/* cd $TRAVIS_BUILD_DIR/dotnet_out
zip -r $TRAVIS_BUILD_DIR/deploy/$api_output_name.zip $TRAVIS_OS_NAME/*
# node Build # node Build
cd ../../../Breeze.UI cd $TRAVIS_BUILD_DIR/Breeze.UI
echo $log_prefix running 'npm run' echo $log_prefix running 'npm run'
npm run build:prod npm run build:prod
...@@ -50,12 +67,13 @@ node package.js --platform=$os_platform --arch=$arch --path=$TRAVIS_BUILD_DIR/br ...@@ -50,12 +67,13 @@ node package.js --platform=$os_platform --arch=$arch --path=$TRAVIS_BUILD_DIR/br
# copy api libs into app # copy api libs into app
echo $log_prefix copying the Breeze api into the app echo $log_prefix copying the Breeze api into the app
mkdir -p $TRAVIS_BUILD_DIR/breeze_out/breeze-ui-$os_platform-$arch/resources/app/assets/daemon/ mkdir -p $dotnet_resources_path_in_app
cp -r $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME/* $TRAVIS_BUILD_DIR/breeze_out/breeze-ui-$os_platform-$arch/resources/app/assets/daemon/ cp -r $TRAVIS_BUILD_DIR/dotnet_out/$TRAVIS_OS_NAME/* $dotnet_resources_path_in_app
# zip result # zip result
echo $log_prefix zipping the app into $TRAVIS_BUILD_DIR/breeze_out/$app_output_name.zip echo $log_prefix zipping the app into $TRAVIS_BUILD_DIR/breeze_out/$app_output_name.zip
zip -r $TRAVIS_BUILD_DIR/deploy/$app_output_name.zip $TRAVIS_BUILD_DIR/breeze_out/breeze-ui-$os_platform-$arch/* cd $TRAVIS_BUILD_DIR/breeze_out
zip -r $TRAVIS_BUILD_DIR/deploy/$app_output_name.zip breeze-ui-$os_platform-$arch/*
#tests #tests
echo $log_prefix running tests echo $log_prefix running tests
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment