Skip to content

Commit

Permalink
ios/w8 builds + various improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuNls committed Jul 5, 2016
1 parent 0ec2842 commit 36afca1
Show file tree
Hide file tree
Showing 71 changed files with 173 additions and 50 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ Mobile Apps
- [x] Dashboard
- [x] Add Watch
- [x] Edit / Delete watch
- [ ] Result
- [x] Result
- [x] Login
- [ ] Signup
- [ ] Time
- [x] Signup
- [x] Time

### Functionalities

- [x] List watches
- [x] Add/edit/delete watches
- [x] Login (email)
- [ ] Signup (email)
- [x] Signup (email)
- [ ] Login fb
- [ ] Social share
- [x] Social share
4 changes: 4 additions & 0 deletions app/pages/about/about.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.about-page{
background-color: white;
ion-content{

scroll-content{
height: 60%;
}
height: 50%;
top:30%;
width: 90%;
Expand Down
30 changes: 15 additions & 15 deletions app/pages/dashboard/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ export class DashboardPage {

this.twapi.accurateTime();

// this.twapi.login("mathieu[email protected]", "qwerty").then(
// res => {
// this.user = res;
// console.log(this.user);

// for (var i = 0; i < this.user.watches.length; i++) {
// console.log(this.user.watches[i]);
// for (var y = 0; y < this.user.watches[i].measures.length; y++) {
// console.log(this.user.watches[i].measures[y].status == 8);

// console.log(this.user.watches[i].measures[y]);
// }
// }
// }
// );
this.twapi.login("mathieu@toolwatch.io", "qwerty").then(
res => {
this.user = res;
console.log(this.user);

for (var i = 0; i < this.user.watches.length; i++) {
console.log(this.user.watches[i]);
for (var y = 0; y < this.user.watches[i].measures.length; y++) {
console.log(this.user.watches[i].measures[y].status == 8);

console.log(this.user.watches[i].measures[y]);
}
}
}
);
}

updateWatch(watch:Watch){
Expand Down
18 changes: 15 additions & 3 deletions app/pages/footer/footer.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
footer-nav{

.button-icon-only, .button-icon-left{
box-shadow: none;
}

tab{
z-index: 10;
color:white;
Expand All @@ -22,26 +26,34 @@ footer-nav{
.tab-label{
float:left;
width: 100%;
margin-top: -20%;
margin-top: -15%;
margin-left: 2%;
z-index: 10;
font-size: 10px;
font-size: 1.5vh;
text-align: center;
}

.button-icon-only{
margin-top: 0;
padding-left: 5%;
-webkit-transition: none;
transition: none;
background-color: transparent;
box-shadow: none;
}

button{

ion-icon{
width: 100%;
height: 70%;
text-align: center;
padding-left: 3%;
font-size: 5vh;
}

width: 100%;
-webkit-transition: none;
transition: none;
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion app/pages/footer/footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ export class Footer {
}

onTime(){
this.nav.push(TimePage);
this.nav.push(TimePage, {
user:this.user
});
}

onTips(){
Expand Down
2 changes: 1 addition & 1 deletion app/pages/header/header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ion-icon (click)="onBack()" *ngIf="back" class="header left" name="md-arrow-back"></ion-icon>
<ion-icon (click)="onChat()" *ngIf="chat" class="header right" name="ios-chatbubbles"></ion-icon>

<top-nav>
<top-nav [class]="topBg">
<logo>
<logo-bg></logo-bg>
</logo>
Expand Down
28 changes: 27 additions & 1 deletion app/pages/header/header.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
.handBg{
background-image: url('../assets/images/hands.png'), linear-gradient(180deg, #4d77a7 75%, white 76%);
}

.addWatch-background{
background-image: url('../assets/images/add-watch.png'), linear-gradient(180deg, #4d77a7 75%, white 76%);
background-size: contain;
width: 100%;

h1{
padding-top: 8%;
}
}

.time-background{
background-image: linear-gradient(180deg, #4d77a7 75%, white 76%);
width: 100%;
}

.account-background{
h1{
padding-top: 5%;
}
width: 100%;
background-image: url('../assets/images/account-back.png'), linear-gradient(180deg, #4d77a7 75%, white 76%);
}

top-nav{
background-image: url('../assets/images/hands.png'), linear-gradient(180deg, #4d77a7 75%, white 76%);
background-repeat: no-repeat;
background-size: cover;
height: 40%;
Expand Down
4 changes: 4 additions & 0 deletions app/pages/header/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ export class Header {
chat: boolean = false;
@Input()
back:boolean = false;
@Input()
topBg:string = "handBg";

constructor(private nav: NavController, private elementRef: ElementRef) {

console.log(this.topBg);
console.log(this.slogan);
}

onBack(){
Expand Down
2 changes: 1 addition & 1 deletion app/pages/login/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<button id="login" toggle md-raised-button color="primary" type="submit"> {{ 'login' | translate:{value: param} }}</button>
</div>
</form>
<button id="login-fb" toggle md-raised-button color="primary">
<button id="login-fb" toggle md-raised-button color="primary" disabled>
<ion-icon name="logo-facebook"></ion-icon>
{{ 'facebook-login' | translate:{value: param} }}
</button>
Expand Down
18 changes: 15 additions & 3 deletions app/pages/login/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,35 @@ import {Facebook} from 'ionic-native';
})
export class LogInPage extends LoginComponent {


laoding:Loading;

constructor(private nav: NavController, translate: TranslateService,
twapi: TwAPIService, builder: FormBuilder) {
super(translate, twapi, builder);



translate.get('logging-in').subscribe(
sentence => this.laoding = Loading.create({
content: sentence
}
)
);

this.userLogged.subscribe(
user => this.nav.setRoot(DashboardPage, {
user:user
})
);


}

// onSubmit(user:{email:string, password:string}){
// super.onSubmit(user);
// this.laoding.dismiss();
// }

onSignup(){

this.nav.push(SignupPage, {
email:this.email.value,
password:this.password.value
Expand Down
2 changes: 1 addition & 1 deletion app/pages/signup/signup.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<header-nav [back]="true"></header-nav>
<header-nav [slogan]="slogan" [topBg]="background" [back]="true"></header-nav>

<ion-content>
<form
Expand Down
3 changes: 3 additions & 0 deletions app/pages/signup/signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import {Header} from '../header/header';
})
export class SignupPage extends SignupComponent{

background:string = "account-background";
slogan:string = "signin-slogan";

constructor(private nav: NavController, private navParams: NavParams, translate: TranslateService,
twapi: TwAPIService, builder: FormBuilder) {

Expand Down
2 changes: 1 addition & 1 deletion app/pages/time/time.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<header-nav [back]="true"></header-nav>
<header-nav [slogan]="slogan" [topBg]="background" [back]="true"></header-nav>

<ion-content>

Expand Down
16 changes: 10 additions & 6 deletions app/pages/time/time.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
}

.details{
font-size: 2.5vh;
margin-top: 3%;
background-color: white;
width: 100%;
Expand Down Expand Up @@ -116,12 +117,13 @@

.clock {
margin: auto;
margin-top: 8%;
border-radius: 50%;
background: #4d77a7 url(../assets/images/clock-face-bg.png) no-repeat center;
background-size: 98%;
background: url(../assets/images/clock-face-bg.png) no-repeat center;
background-size: contain;
height: 45%;
position: relative;
width: 80%;
width: 90%;
}

.logo{
Expand All @@ -135,6 +137,8 @@
}

.date{
padding-top: 2%;
font-size: 1.8vh;
background-color: #21446f;
height: 20px;
font-family: 'Nunito', sans-serif;
Expand All @@ -147,7 +151,7 @@
.month{
width: 40px;
left: 15%;
padding-left: 2%;
padding-left: 4%;
}

.day{
Expand Down Expand Up @@ -242,7 +246,7 @@
height: 100%;
z-index: 1;
position: absolute;
top:2%;
top:6%;
background: url(../assets/images/clock-cadran.png) no-repeat center;
background-size: 100%;
}
Expand All @@ -253,7 +257,7 @@
position: absolute;
top:0%;
background: url(../assets/images/clock-disque.png) no-repeat center;
background-size: cover;
background-size: contain;
}

.moon-phase-container{
Expand Down
5 changes: 5 additions & 0 deletions app/pages/time/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {Header} from '../header/header';
import {ClockComponent} from 'tw-common/dist/app/directives/clock/clock.component';
import {MoonPhases} from './moon/moon-phases';
import {Footer} from '../footer/footer';
import {User} from 'tw-common/dist/app/models/user.model';


@Component({
Expand All @@ -23,6 +24,8 @@ export class TimePage extends ClockComponent{
Math:any = Math;
interval:number = 100;
offset:number;
user:User;
background:string = "time-background";

constructor(elementRef: ElementRef, private nav: NavController, private navParams: NavParams,
private twapi: TwAPIService, private translate: TranslateService) {
Expand All @@ -43,6 +46,8 @@ export class TimePage extends ClockComponent{
},
this.interval, this.interval, this
);

this.user = this.navParams.get('user');
}

addZero(i:number):string {
Expand Down
5 changes: 4 additions & 1 deletion app/pages/tips/tips.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.tips-page{
background-color: white;
ion-content{
height: 60%;
scroll-content{
height: 60%;
}
height: 55%;
top:30%;
width: 90%;
margin-left: 5%;
Expand Down
2 changes: 1 addition & 1 deletion app/pages/watch/watch.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<header-nav [back]="true"></header-nav>
<header-nav [slogan]= "slogan" [back]="true" [topBg]='background' ></header-nav>

<ion-content>

Expand Down
3 changes: 3 additions & 0 deletions app/pages/watch/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import 'gsap';
})
export class WatchPage extends WatchComponent {

background:string = "addWatch-background";
slogan:string ="add-new-watch";

constructor(private nav: NavController, private navParams: NavParams,
translate: TranslateService,
Expand All @@ -33,6 +35,7 @@ export class WatchPage extends WatchComponent {
let receivedWatch:Watch = this.navParams.get('watch');
if (receivedWatch !== undefined){
this.watchModel = receivedWatch;
this.slogan = "edit-watch";
}


Expand Down
Loading

0 comments on commit 36afca1

Please sign in to comment.