Skip to content

Commit

Permalink
fix(watch): check if watchpage is invoked to modify or add a new watc…
Browse files Browse the repository at this point in the history
…h and act accordingly
  • Loading branch information
MathieuNls committed Nov 2, 2016
1 parent 71ae677 commit 2294afc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/pages/dashboard/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ <h1>{{ 'no-watch' | translate }}</h1>
<h2>{{ watch.brand }}</h2>
<h3>{{ watch.name }}</h3>

</div>

<div id="accuracy">
<span *ngIf="watch.status !== WatchStatus.NeverMeasured && watch.lastCompleteMeasure() !== null">
Expand All @@ -64,8 +65,6 @@ <h3>{{ watch.name }}</h3>
</span>
</div>

</div>



<div class="item-stats">
Expand Down
9 changes: 4 additions & 5 deletions src/pages/dashboard/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@
top:15%;
right:4%;
span{
white-space: nowrap;
overflow: hidden;
margin-right:5%;
text-overflow: clip;
width:100%;
display:block;
text-align:right;
Expand Down Expand Up @@ -113,16 +110,18 @@
}

#right-action{
padding-top:4%;
padding-top:2%;
height:17vw;
padding-left:20%;
width:70%;
}

h2{
width:70%;
width:68%;
font-size:1.2em;
color:#2a2a2c;
overflow: hidden;

}

h3{
Expand Down
4 changes: 3 additions & 1 deletion src/pages/watch/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export class WatchPage extends WatchComponent {
);

let receivedWatch:Watch = this.navParams.get('watch');
this.watchModel = receivedWatch.clone();
if(receivedWatch !== undefined){
this.watchModel = receivedWatch.clone();
}

}

Expand Down
2 changes: 1 addition & 1 deletion src/share
Submodule share updated from 1c09e2 to e3193c

0 comments on commit 2294afc

Please sign in to comment.