Update to Angular 14

This commit is contained in:
2026-03-23 20:46:24 +01:00
parent 1dea5953f6
commit f23e34dd09
33 changed files with 2483 additions and 2977 deletions
@@ -1,4 +1,4 @@
import { Component, Input, ViewChild, ElementRef } from '@angular/core';
import { Component, Input, ViewChild, ElementRef, TemplateRef } from '@angular/core';
import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal';
import { ButtonAction } from '../../../common/interfaces';
import { PonyTownGame } from '../../../client/game';
@@ -16,7 +16,7 @@ import { faCog } from '../../../client/icons';
})
export class ActionBar {
@ViewChild('scroller', { static: true }) scroller!: ElementRef;
@ViewChild('actionsModal', { static: true }) actionsModal!: ElementRef;
@ViewChild('actionsModal', { static: true }) actionsModal!: TemplateRef<any>;
@Input() blurred = false;
readonly cogIcon = faCog;
activeAction: ButtonAction | undefined = undefined;
@@ -68,7 +68,7 @@ export class ActionBar {
const settings = { ...this.settings.account, actions: serializeActions(this.actions) };
this.settings.saveAccountSettings(settings);
}
scroll(e: MouseWheelEvent) {
scroll(e: WheelEvent) {
if (e.deltaY) {
const delta = e.deltaY > 0 ? 1 : -1;
this.scroller.nativeElement.scrollLeft += delta * 20;