mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 21:55:52 +02:00
Update to angular 22
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { Component, OnInit, OnDestroy, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { remove, uniq } from 'lodash';
|
||||
import {
|
||||
@@ -23,6 +23,7 @@ const defaultDuplicatesLimit = 10;
|
||||
const year = (new Date()).getFullYear();
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'admin-account-details',
|
||||
templateUrl: 'admin-account-details.pug',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { debounce } from 'lodash';
|
||||
import { Account } from '../../../common/adminInterfaces';
|
||||
@@ -12,6 +12,7 @@ let currentPage = 0;
|
||||
let not = false;
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'admin-accounts',
|
||||
templateUrl: 'admin-accounts.pug',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, ViewChild, OnDestroy } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild, OnDestroy, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { fromNow } from '../../../common/utils';
|
||||
import { Event, ChatEvent } from '../../../common/adminInterfaces';
|
||||
import { AdminModel } from '../../services/adminModel';
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
let state: BaseTableState;
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'admin-events',
|
||||
templateUrl: 'admin-events.pug',
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Event } from '../../../common/adminInterfaces';
|
||||
import { AdminModel } from '../../services/adminModel';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'admin-origin-details',
|
||||
templateUrl: 'admin-origin-details.pug',
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { RequestStats, OriginStats, OtherStats } from '../../../common/adminInterfaces';
|
||||
import { faSync, faEraser, faClock, faUser, faChevronDown, faSpinner } from '../../../client/icons';
|
||||
import { AdminModel } from '../../services/adminModel';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'admin-origins',
|
||||
templateUrl: 'admin-origins.pug',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { Component, OnInit, OnDestroy, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { compact } from 'lodash';
|
||||
import { AdminModel } from '../../services/adminModel';
|
||||
import { Account, GeneralSettings } from '../../../common/adminInterfaces';
|
||||
@@ -12,6 +12,7 @@ interface Field {
|
||||
}
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'admin-other',
|
||||
templateUrl: 'admin-other.pug',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { isEqual, debounce } from 'lodash';
|
||||
import { Character, FindPonyQuery } from '../../../common/adminInterfaces';
|
||||
import { AdminModel } from '../../services/adminModel';
|
||||
@@ -9,6 +9,7 @@ let currentPage = 1;
|
||||
let query: FindPonyQuery = {};
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'admin-ponies',
|
||||
templateUrl: 'admin-ponies.pug',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, ViewChild, ElementRef } from '@angular/core';
|
||||
import { Component, ViewChild, ElementRef, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
import { TimingEntry, TimingEntryType, WorldPerfStats, defaultWorldPerfStats } from '../../../../common/adminInterfaces';
|
||||
import { findById, pointInRect, clamp } from '../../../../common/utils';
|
||||
@@ -26,6 +26,7 @@ const frameTime = 1000 / SERVER_FPS;
|
||||
const timePadding = 10; // ms
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'admin-reports-perf',
|
||||
templateUrl: 'admin-reports-perf.pug',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'admin-reports',
|
||||
templateUrl: 'admin-reports.pug',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'admin-sign-in',
|
||||
templateUrl: 'admin-sign-in.pug',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
||||
import {
|
||||
GameServerState, SERVER_SETTINGS, LOGIN_SERVER_SETTINGS, ServerStats, RequestStats,
|
||||
UserCountStats, Stats, StatsTable
|
||||
@@ -8,6 +8,7 @@ import { AdminModel } from '../../services/adminModel';
|
||||
import { faCog, faSlidersH } from '../../../client/icons';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'admin-state',
|
||||
templateUrl: 'admin-state.pug',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule, provideZoneChangeDetection } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
@@ -131,6 +131,7 @@ export const routes: Routes = [
|
||||
AdminApp,
|
||||
],
|
||||
providers: [
|
||||
provideZoneChangeDetection(),
|
||||
ErrorReporter,
|
||||
],
|
||||
bootstrap: [AdminApp],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, HostListener } from '@angular/core';
|
||||
import { Component, HostListener, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { TooltipConfig } from 'ngx-bootstrap/tooltip';
|
||||
import { PopoverConfig } from 'ngx-bootstrap/popover';
|
||||
@@ -17,6 +17,7 @@ export function popoverConfig() {
|
||||
}
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'pony-town-app',
|
||||
templateUrl: 'admin.pug',
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Component, Input, OnDestroy } from '@angular/core';
|
||||
import { Component, Input, OnDestroy, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Account } from '../../../../common/adminInterfaces';
|
||||
import { Subscription } from '../../../../common/interfaces';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'account-info-remote',
|
||||
templateUrl: 'account-info-remote.pug',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnChanges, SimpleChanges, OnInit, TemplateRef, ViewChild } from '@angular/core';
|
||||
import { Component, Input, OnChanges, SimpleChanges, OnInit, TemplateRef, ViewChild, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal';
|
||||
import { compact } from 'lodash';
|
||||
import { DAY, MINUTE, HOUR } from '../../../../common/constants';
|
||||
@@ -56,6 +56,7 @@ const alertExpires = [
|
||||
];
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'account-info',
|
||||
templateUrl: 'account-info.pug',
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Component, OnInit, Input, OnChanges } from '@angular/core';
|
||||
import { Component, OnInit, Input, OnChanges, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
import { Account, AccountStatus as IAccountStatus } from '../../../../common/adminInterfaces';
|
||||
import { faUserSecret } from '../../../../client/icons';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'account-status',
|
||||
templateUrl: 'account-status.pug',
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Account } from '../../../../common/adminInterfaces';
|
||||
import { getAge } from '../../../../common/adminUtils';
|
||||
|
||||
const year = (new Date()).getFullYear();
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'account-tooltip',
|
||||
templateUrl: 'account-tooltip.pug',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnDestroy, ElementRef } from '@angular/core';
|
||||
import { Component, Input, OnDestroy, ElementRef, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
import { Account } from '../../../../common/adminInterfaces';
|
||||
import { ChatDate, createChatDate, createDateRange } from '../../../../common/adminUtils';
|
||||
@@ -9,6 +9,7 @@ import { replaceSwears } from '../../../../client/adminHtmlUtils';
|
||||
import { addDays } from 'date-fns';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'admin-chat-log',
|
||||
templateUrl: 'admin-chat-log.pug',
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Component, OnDestroy, Input } from '@angular/core';
|
||||
import { Component, OnDestroy, Input, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Auth, DuplicateResult } from '../../../../common/adminInterfaces';
|
||||
import { Subscription } from '../../../../common/interfaces';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
import { faInfo, faLock, faTrash, faEyeSlash, faArrowRight } from '../../../../client/icons';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'auth-info-edit',
|
||||
templateUrl: 'auth-info-edit.pug',
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Component, Input, OnDestroy } from '@angular/core';
|
||||
import { Component, Input, OnDestroy, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Subscription } from '../../../../common/interfaces';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
import { Auth } from '../../../../common/adminInterfaces';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'auth-info-remote',
|
||||
templateUrl: 'auth-info-remote.pug',
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Auth } from '../../../../common/adminInterfaces';
|
||||
import { oauthIcons, faGlobe } from '../../../../client/icons';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'auth-info',
|
||||
templateUrl: 'auth-info.pug',
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Component, Input, OnDestroy } from '@angular/core';
|
||||
import { Component, Input, OnDestroy, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Subscription } from '../../../../common/interfaces';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'auth-list-remote',
|
||||
templateUrl: 'auth-list-remote.pug',
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Auth } from '../../../../common/adminInterfaces';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'auth-list',
|
||||
templateUrl: 'auth-list.pug',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'email-list',
|
||||
templateUrl: 'email-list.pug',
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Account, Event, SERVER_LABELS, ChatEvent } from '../../../../common/adminInterfaces';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
import { faLanguage, faTrash, faComment, faClipboard } from '../../../../client/icons';
|
||||
import { getTranslationUrl } from '../../../../common/adminUtils';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'events-table',
|
||||
templateUrl: 'events-table.pug',
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Component, Input, OnDestroy } from '@angular/core';
|
||||
import { Component, Input, OnDestroy, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Subscription } from '../../../../common/interfaces';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
import { Origin } from '../../../../common/adminInterfaces';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'origin-info-remote',
|
||||
templateUrl: 'origin-info-remote.pug',
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Origin, BannedMuted } from '../../../../common/adminInterfaces';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
import { countryCodeToName } from '../../../../common/countries';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'origin-info',
|
||||
templateUrl: 'origin-info.pug',
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Component, Input, OnDestroy } from '@angular/core';
|
||||
import { Component, Input, OnDestroy, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Subscription } from '../../../../common/interfaces';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
import { OriginInfoBase } from '../../../../common/adminInterfaces';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'origin-list-remote',
|
||||
templateUrl: 'origin-list-remote.pug',
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Component, Input, OnDestroy } from '@angular/core';
|
||||
import { Component, Input, OnDestroy, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Subscription } from '../../../../common/interfaces';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
import { Character } from '../../../../common/adminInterfaces';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'pony-info-remote',
|
||||
templateUrl: 'pony-info-remote.pug',
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Component, Input, OnChanges } from '@angular/core';
|
||||
import { Component, Input, OnChanges, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { hasFlag } from '../../../../common/utils';
|
||||
import { Character, CharacterFlags } from '../../../../common/adminInterfaces';
|
||||
import { isForbiddenName } from '../../../../common/security';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'pony-info',
|
||||
templateUrl: 'pony-info.pug',
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Component, Input, OnDestroy } from '@angular/core';
|
||||
import { Component, Input, OnDestroy, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Subscription } from '../../../../common/interfaces';
|
||||
import { AdminModel } from '../../../services/adminModel';
|
||||
import { faTrash, faArrowRight } from '../../../../client/icons';
|
||||
import { Character, PonyIdDateName, DuplicateResult } from '../../../../common/adminInterfaces';
|
||||
|
||||
@Component({
|
||||
changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false,
|
||||
selector: 'pony-list-remote',
|
||||
templateUrl: 'pony-list-remote.pug',
|
||||
|
||||
Reference in New Issue
Block a user