-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from GoogolApp/refineUS
now, we can view the profiles of users that confirmed presence in an …
- Loading branch information
Showing
8 changed files
with
146 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<ion-header> | ||
<ion-navbar> | ||
<ion-title>Perfil</ion-title> | ||
</ion-navbar> | ||
</ion-header> | ||
|
||
<ion-content padding class="pg-profile"> | ||
<!-- img --> | ||
<section text-center> | ||
<profile-pic-generator word="{{userSearch.username}}" color="#4A90E2"></profile-pic-generator> | ||
</section> | ||
|
||
<!-- name / username --> | ||
<p class="text-xxlarge-normal" text-center> | ||
@{{userSearch.username}} | ||
<br> | ||
<span class="text-default-light" text-center>{{userSearch.email}}</span> | ||
</p> | ||
|
||
<!-- follow grid --> | ||
<ion-grid> | ||
<ion-row> | ||
<ion-col class="text-default-light" text-center> | ||
<span class="text-default-medium">{{userSearch.following.length}}</span> | ||
<br> Seguindo | ||
</ion-col> | ||
|
||
<ion-col class="text-default-light" text-center> | ||
<span class="text-default-medium">{{userSearch.followers.length}}</span> | ||
<br> Seguidores | ||
</ion-col> | ||
|
||
<ion-col class="text-default-light" text-center> | ||
<span class="text-default-medium">{{userSearch.reputation}}</span> | ||
<br> Reputação | ||
</ion-col> | ||
</ion-row> | ||
</ion-grid> | ||
|
||
<!-- teams row --> | ||
<section class="favorite-teams"> | ||
<p class="text-default-light">Times Favoritos</p> | ||
<div *ngIf="userSearch.favTeams.length==0"> | ||
<p class="text-default-light">Usuário sem times favoritos!</p> | ||
</div> | ||
|
||
<div *ngIf="userSearch.favTeams.length==1"> | ||
<img width="40" height="40" src={{userSearch.favTeams[0].teamLogoUrl}}> | ||
</div> | ||
|
||
<div *ngIf="userSearch.favTeams.length==2" (click)="gotoTeamsPage()"> | ||
<img width="40" height="40" src={{userSearch.favTeams[0].teamLogoUrl}}> | ||
<img width="40" height="40" src={{userSearch.favTeams[1].teamLogoUrl}}> | ||
</div> | ||
|
||
<div *ngIf="userSearch.favTeams.length >=3 "> | ||
<img width="40" height="40" src={{userSearch.favTeams[0].teamLogoUrl}}> | ||
<img width="40" height="40" src={{userSearch.favTeams[1].teamLogoUrl}}> | ||
<img width="40" height="40" src={{userSearch.favTeams[2].teamLogoUrl}}> | ||
</div> | ||
</section> | ||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
page-follower-profile { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { Component } from '@angular/core'; | ||
import { IonicPage, NavController, NavParams, LoadingController, Events } from 'ionic-angular'; | ||
import { User } from '../../_models/user'; | ||
import { UsersService } from '../../_services/users'; | ||
import { EventsService } from '../../_services/events'; | ||
|
||
|
||
|
||
@Component({ | ||
selector: 'page-follower-profile', | ||
templateUrl: 'follower-profile.html', | ||
}) | ||
export class FollowerProfilePage { | ||
|
||
userSearch = new User(); | ||
eventos = {}; | ||
|
||
constructor( | ||
public navCtrl: NavController, | ||
public navParams: NavParams, | ||
private userService : UsersService, | ||
private eventsService : EventsService, | ||
private loadingController: LoadingController, | ||
private events: Events) { | ||
|
||
let id = this.navParams.get("id"); | ||
this.fetchUser(id); | ||
this.fetchEvents(); | ||
} | ||
|
||
|
||
fetchEvents(){ | ||
this.eventos = this.eventsService.getAll(); | ||
} | ||
|
||
async fetchUser(id : string){ | ||
let loading = this.loading(); | ||
await loading; | ||
this.userService.getOne(id).subscribe( | ||
data=> { | ||
this.userSearch = data; | ||
loading.dismiss(); | ||
}, | ||
err =>{ | ||
console.log(err); | ||
loading.dismiss(); | ||
} | ||
) | ||
} | ||
|
||
loading(){ | ||
let loading = this.loadingController.create({ | ||
content: 'Por favor, aguarde...', | ||
spinner: 'bubbles' | ||
}); | ||
|
||
loading.present(); | ||
|
||
return loading; | ||
} | ||
|
||
} |