This repository has been archived by the owner on Jul 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #69 from davidcr01/3.2
Release v3.2.0
- Loading branch information
Showing
15 changed files
with
483 additions
and
87 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
25 changes: 25 additions & 0 deletions
25
...ionic/ionic-app/src/app/components/player-info-popover/player-info-popover.component.html
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,25 @@ | ||
<ion-content> | ||
<ion-list *ngIf="playerInfo"> | ||
<div class="popover-container"> | ||
<img src="../../assets/icon/wins-classic.png" alt="Victories Classic"> | ||
<ion-label class="popover-label">Wins</ion-label> | ||
<ion-label class="popover-value">{{ playerInfo.wins }}</ion-label> | ||
</div> | ||
<div class="popover-container"> | ||
<img src="../../assets/icon/wins-pvp.png" alt="Victories PvP"> | ||
<ion-label class="popover-label">Wins PvP</ion-label> | ||
<ion-label class="popover-value">{{ playerInfo.wins_pvp }}</ion-label> | ||
</div> | ||
<div class="popover-container"> | ||
<img src="../../assets/icon/wins-tournaments.png" alt="Victories Tournaments"> | ||
<ion-label class="popover-label">Tournaments</ion-label> | ||
<ion-label class="popover-value">{{ playerInfo.wins_tournament }}</ion-label> | ||
</div> | ||
<div class="popover-container"> | ||
<img src="../../assets/icon/experience.png" alt="Experience"> | ||
<ion-label class="popover-label">XP</ion-label> | ||
<ion-label class="popover-value">{{ playerInfo.xp }}</ion-label> | ||
</div> | ||
</ion-list> | ||
|
||
</ion-content> |
23 changes: 23 additions & 0 deletions
23
...ionic/ionic-app/src/app/components/player-info-popover/player-info-popover.component.scss
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,23 @@ | ||
.popover-container { | ||
display: flex; | ||
align-items: center; | ||
margin-bottom: 1vh; | ||
} | ||
|
||
.popover-container img { | ||
width: 3vh; | ||
height: 3vh; | ||
margin-right: 2vw; | ||
} | ||
|
||
.popover-label { | ||
font-weight: bold; | ||
font-size: 4.5vw; | ||
} | ||
|
||
.popover-value { | ||
margin-left: auto; | ||
margin-right: 3vw; | ||
font-size: 5.5vw; | ||
} | ||
|
24 changes: 24 additions & 0 deletions
24
...ic/ionic-app/src/app/components/player-info-popover/player-info-popover.component.spec.ts
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,24 @@ | ||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; | ||
import { IonicModule } from '@ionic/angular'; | ||
|
||
import { PlayerInfoPopoverComponent } from './player-info-popover.component'; | ||
|
||
describe('PlayerInfoPopoverComponent', () => { | ||
let component: PlayerInfoPopoverComponent; | ||
let fixture: ComponentFixture<PlayerInfoPopoverComponent>; | ||
|
||
beforeEach(waitForAsync(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ PlayerInfoPopoverComponent ], | ||
imports: [IonicModule.forRoot()] | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(PlayerInfoPopoverComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
})); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
31 changes: 31 additions & 0 deletions
31
...+/ionic/ionic-app/src/app/components/player-info-popover/player-info-popover.component.ts
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,31 @@ | ||
import { Component, OnInit, Input } from '@angular/core'; | ||
import { ApiService } from 'src/app/services/api.service'; | ||
|
||
@Component({ | ||
selector: 'app-player-info-popover', | ||
templateUrl: './player-info-popover.component.html', | ||
styleUrls: ['./player-info-popover.component.scss'], | ||
}) | ||
export class PlayerInfoPopoverComponent implements OnInit { | ||
@Input() playerId: string; | ||
playerInfo: any; | ||
|
||
constructor(private apiService: ApiService) {} | ||
|
||
ngOnInit() { | ||
this.loadPlayerData(); | ||
} | ||
|
||
async loadPlayerData() { | ||
if (this.playerId) { | ||
(await this.apiService.getPlayerData(this.playerId)).subscribe( | ||
(response: any) => { | ||
this.playerInfo = response; | ||
}, | ||
(error) => { | ||
console.error('Error retrieving player data:', error); | ||
} | ||
) | ||
} | ||
} | ||
} |
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
Oops, something went wrong.