chore(deps): upgrade Angular 18 → 19
- ng update @angular/core@19 @angular/cli@19 @angular/material@19 @angular-eslint/schematics@19 - Migration: remove standalone:true (now default in v19) from 60 components - Migration: zone.js 0.14 → 0.15 - Fix pre-existing build budget error: raise initial bundle limit to 5mb (app ships large static JSON assets)
This commit is contained in:
+6
-10
@@ -9,18 +9,14 @@ import { FortificationCardContentComponent } from '../fortification-card-content
|
||||
import { HWGuildWarFortification, HWGuildWarHeroTeam, HWGuildWarSlots, HWGuildWarTitanTeam, HWMember } from '@models';
|
||||
|
||||
/* JSON data */
|
||||
import guildWarData from 'src/files-data/hw-guild-war.json'; // page Overview -> Statistics | page Guild War -> Guild War
|
||||
import guildWarData from 'src/files-data/hw-guild-war.json'; // page Overview -> Statistics | page Guild War -> Guild War
|
||||
import guildWarSlots from 'src/files-data/hw-guild-war-slots.json'; // no pages
|
||||
|
||||
@Component({
|
||||
selector: 'app-guildwar-defence',
|
||||
standalone: true,
|
||||
imports: [
|
||||
MatCardModule, MatDividerModule, MatIconModule,
|
||||
FortificationCardContentComponent
|
||||
],
|
||||
imports: [MatCardModule, MatDividerModule, MatIconModule, FortificationCardContentComponent],
|
||||
templateUrl: './guildwar-defence.component.html',
|
||||
styleUrl: './guildwar-defence.component.scss'
|
||||
styleUrl: './guildwar-defence.component.scss',
|
||||
})
|
||||
export class GuildwarDefenceComponent implements OnInit {
|
||||
private _championsByPower: HWMember[] = [];
|
||||
@@ -40,7 +36,7 @@ export class GuildwarDefenceComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
for (const [teamId, teamValues] of Object.entries(guildWarData.teams)) {
|
||||
const index = this.guildMembers.findIndex(member => member.id === teamId);
|
||||
const index = this.guildMembers.findIndex((member) => member.id === teamId);
|
||||
if (index === -1) continue;
|
||||
let totalHeroPower = 0;
|
||||
let totalTitanPower = 0;
|
||||
@@ -75,7 +71,7 @@ export class GuildwarDefenceComponent implements OnInit {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this._championsByPower = this.guildMembers.filter(member => member.champion === true);
|
||||
this._championsByPower = this.guildMembers.filter((member) => member.champion === true);
|
||||
}
|
||||
|
||||
private _getFortification(indexes: number[], type: string, name: string): HWGuildWarFortification {
|
||||
@@ -104,7 +100,7 @@ export class GuildwarDefenceComponent implements OnInit {
|
||||
count: count,
|
||||
teams: teams,
|
||||
positions: this._championSlots,
|
||||
slots: slots[name]
|
||||
slots: slots[name],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user