Update to set 5 and add static data from League of Legend
This commit is contained in:
parent
9fb13409d1
commit
5f06b288b1
201 changed files with 1362 additions and 935 deletions
|
|
@ -1,11 +1,11 @@
|
|||
<div id="champions">
|
||||
<div id="rolesFilterWrap">
|
||||
<div class="roleFilter" *ngFor="let role of roles">
|
||||
<img title="{{role}}" src="../../assets/images/{{role}}.png" (click)="selectRole(role)" alt="{{role}}" [ngClass]="{'selectedFilter': checkRoleFilter(role)}">
|
||||
<img title="{{role}}" src="../../assets/images/traits/{{role.toLowerCase()}}.png" (click)="selectRole(role)" alt="{{role}}" [ngClass]="{'selectedFilter': checkRoleFilter(role)}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="champion" *ngFor="let champion of champions">
|
||||
<div title="{{champion.name}}" class="imageWrap" [style.background-image]="getImage(champion.name)" (click)="selectChampion(champion)"
|
||||
<div title="{{champion.name}}" class="imageWrap" [style.background-image]="getImage(champion.img)" (click)="selectChampion(champion)"
|
||||
[ngClass]="{
|
||||
'selected': champion.isSelected,
|
||||
'sinergy': champion.sinergy && !champion.isSelected,
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
<div class="rolesWrap">
|
||||
<div *ngFor="let role of champion.roles" class="roles">
|
||||
<img title="{{role}}" src="../../assets/images/{{role}}.png" alt="{{role}}">
|
||||
<img title="{{role }}" src="../../assets/images/traits/{{role.toLowerCase()}}.png" alt="{{role}}">
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
<div id="selectedRolesWrap">
|
||||
<div class="roleSelectedRoles" *ngFor="let role of rolesPool">
|
||||
<span>{{rolesCount[role]}}</span>
|
||||
<img title="{{role}}" src="../../assets/images/{{role}}.png" alt="{{role}}"
|
||||
<img title="{{role}}" src="../../assets/images/traits/{{role.toLowerCase()}}.png" alt="{{role}}"
|
||||
[ngClass]="{
|
||||
'bonus1': bonusesPool[role] && bonusesPool[role].units === 1 && bonusesPool[role].maxUnits !== 1,
|
||||
'bonus1e':bonusesPool[role] && bonusesPool[role].units === 1 && bonusesPool[role].maxUnits === 1,
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export class HomeComponent implements OnInit, OnDestroy {
|
|||
* @param name Champion name
|
||||
*/
|
||||
getImage(name) {
|
||||
return this.sanitizer.bypassSecurityTrustStyle(`url(${'../../assets/images/' + name + '.png'})`);
|
||||
return this.sanitizer.bypassSecurityTrustStyle(`url(${'../../assets/images/champions/' + name + '.png'})`);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,21 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { PoolRoutingModule } from './pool-routing.module';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
|
||||
import { PoolService } from 'src/modules/pool/services/pool.service';
|
||||
|
||||
import { LayoutComponent } from './components/layout/layout.component';
|
||||
import { HomeComponent } from './components/home/home.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { removeSetPipe } from 'src/pipes/removeSet.pipe';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
LayoutComponent,
|
||||
HomeComponent
|
||||
HomeComponent,
|
||||
removeSetPipe
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
|
|
@ -19,4 +24,5 @@ import { CommonModule } from '@angular/common';
|
|||
],
|
||||
providers: [PoolService]
|
||||
})
|
||||
|
||||
export class PoolModule { }
|
||||
|
|
|
|||
|
|
@ -152,7 +152,6 @@ export class PoolService {
|
|||
* Update role pool
|
||||
*/
|
||||
updatePool() {
|
||||
this.rolesPool = [];
|
||||
this.championsPool.forEach(champion => {
|
||||
this.rolesPool = _.union(this.rolesPool, champion.roles);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue