diff --git a/frontend/angular.json b/frontend/angular.json index 855afed..fd19985 100644 --- a/frontend/angular.json +++ b/frontend/angular.json @@ -15,11 +15,12 @@ "prefix": "app", "architect": { "build": { - "builder": "@angular-devkit/build-angular:browser", + "builder": "@angular/build:application", "options": { - "outputPath": "dist", + "outputPath": { + "base": "dist" + }, "index": "src/index.html", - "main": "src/main.ts", "polyfills": [ "zone.js" ], @@ -34,7 +35,8 @@ "styles": [ "src/styles.scss" ], - "scripts": [] + "scripts": [], + "browser": "src/main.ts" }, "configurations": { "production": { @@ -47,9 +49,7 @@ "optimization": true, "outputHashing": "all", "sourceMap": false, - "namedChunks": false, - "vendorChunk": false, - "buildOptimizer": true + "namedChunks": false }, "development": { "sourceMap": true, @@ -71,14 +71,12 @@ "optimization": true, "outputHashing": "all", "sourceMap": false, - "namedChunks": false, - "vendorChunk": false, - "buildOptimizer": true + "namedChunks": false } } }, "serve": { - "builder": "@angular-devkit/build-angular:dev-server", + "builder": "@angular/build:dev-server", "configurations": { "production": { "buildTarget": "frontend:build:production" @@ -90,10 +88,10 @@ "defaultConfiguration": "development" }, "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n" + "builder": "@angular/build:extract-i18n" }, "test": { - "builder": "@angular-devkit/build-angular:karma", + "builder": "@angular/build:karma", "options": { "polyfills": [ "zone.js", @@ -119,5 +117,31 @@ }, "cli": { "analytics": false + }, + "schematics": { + "@schematics/angular:component": { + "type": "component" + }, + "@schematics/angular:directive": { + "type": "directive" + }, + "@schematics/angular:service": { + "type": "service" + }, + "@schematics/angular:guard": { + "typeSeparator": "." + }, + "@schematics/angular:interceptor": { + "typeSeparator": "." + }, + "@schematics/angular:module": { + "typeSeparator": "." + }, + "@schematics/angular:pipe": { + "typeSeparator": "." + }, + "@schematics/angular:resolver": { + "typeSeparator": "." + } } } diff --git a/frontend/package.json b/frontend/package.json index 5d014eb..f467025 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -14,14 +14,14 @@ "private": true, "dependencies": { "@angular/cdk": "^19.2.18", - "@angular/common": "^19.2.0", - "@angular/compiler": "^19.2.0", - "@angular/core": "^19.2.0", - "@angular/forms": "^19.2.0", + "@angular/common": "^20.1.0", + "@angular/compiler": "^20.1.0", + "@angular/core": "^20.1.0", + "@angular/forms": "^20.1.0", "@angular/material": "^19.2.19", - "@angular/platform-browser": "^19.2.0", - "@angular/platform-browser-dynamic": "^19.2.0", - "@angular/router": "^19.2.0", + "@angular/platform-browser": "^20.1.0", + "@angular/platform-browser-dynamic": "^20.1.0", + "@angular/router": "^20.1.0", "@auth0/angular-jwt": "^5.2.0", "@types/three": "^0.177.0", "ngx-cookie-service": "^19.1.2", @@ -31,9 +31,9 @@ "zone.js": "~0.15.0" }, "devDependencies": { - "@angular-devkit/build-angular": "^19.2.5", - "@angular/cli": "^19.2.5", - "@angular/compiler-cli": "^19.2.0", + "@angular/build": "^20.1.0", + "@angular/cli": "^20.1.0", + "@angular/compiler-cli": "^20.1.0", "@types/jasmine": "~5.1.0", "jasmine-core": "~5.6.0", "karma": "~6.4.0", @@ -43,4 +43,4 @@ "karma-jasmine-html-reporter": "~2.1.0", "typescript": "^5.8.3" } -} +} \ No newline at end of file diff --git a/frontend/src/app/pages/altitude/about/about.component.ts b/frontend/src/app/pages/altitude/about/about.component.ts index 5b1c42e..5cd45de 100644 --- a/frontend/src/app/pages/altitude/about/about.component.ts +++ b/frontend/src/app/pages/altitude/about/about.component.ts @@ -1,15 +1,14 @@ import {Component} from '@angular/core'; import {ScrollService} from '@services/scroll.service'; -import {CommonModule} from '@angular/common'; + import {HeaderComponent} from '@header/header.component'; @Component({ selector: 'app-about', standalone: true, imports: [ - CommonModule, HeaderComponent - ], +], templateUrl: './about.component.html', styleUrl: './about.component.scss' }) diff --git a/frontend/src/app/pages/altitude/birthdays/birthdays.component.ts b/frontend/src/app/pages/altitude/birthdays/birthdays.component.ts index 684af9b..104d74f 100644 --- a/frontend/src/app/pages/altitude/birthdays/birthdays.component.ts +++ b/frontend/src/app/pages/altitude/birthdays/birthdays.component.ts @@ -1,15 +1,14 @@ import {Component} from '@angular/core'; import {ScrollService} from '@services/scroll.service'; -import {CommonModule} from '@angular/common'; + import {HeaderComponent} from '@header/header.component'; @Component({ selector: 'app-birthdays', standalone: true, imports: [ - CommonModule, HeaderComponent - ], +], templateUrl: './birthdays.component.html', styleUrl: './birthdays.component.scss' }) diff --git a/frontend/src/app/pages/altitude/socials/socials.component.ts b/frontend/src/app/pages/altitude/socials/socials.component.ts index 7efec87..a66a68a 100644 --- a/frontend/src/app/pages/altitude/socials/socials.component.ts +++ b/frontend/src/app/pages/altitude/socials/socials.component.ts @@ -1,16 +1,15 @@ import {Component} from '@angular/core'; import {ScrollService} from '@services/scroll.service'; -import {CommonModule, NgOptimizedImage} from '@angular/common'; +import { NgOptimizedImage } from '@angular/common'; import {HeaderComponent} from '@header/header.component'; @Component({ selector: 'app-socials', standalone: true, imports: [ - CommonModule, HeaderComponent, NgOptimizedImage - ], +], templateUrl: './socials.component.html', styleUrl: './socials.component.scss' }) diff --git a/frontend/src/app/pages/altitude/team/team.component.html b/frontend/src/app/pages/altitude/team/team.component.html index 41a8e50..3e3182d 100644 --- a/frontend/src/app/pages/altitude/team/team.component.html +++ b/frontend/src/app/pages/altitude/team/team.component.html @@ -1,10 +1,10 @@ > + [overlay_gradient]="0.5">>

Staffing Team

The team that makes Altitude happen. Your owners, admins, moderators, and trainees are all working together to - create Altitude, to create home. This is where the magic happens.

+ create Altitude, to create home. This is where the magic happens.
@@ -12,61 +12,75 @@

Management

-
- {{member.name}}'s Minecraft skin -

{{ member.name }}

-

Owner

-
-
- {{member.name}}'s Minecraft skin -

{{ member.name }}

-

Manager

-
-
-
-
-
-

Admins

-
- {{member.name}}'s Minecraft skin -

{{ member.name }}

-

Admin

-
-
-
-
-
-

Head Moderators

-
- {{member.name}}'s Minecraft skin -

{{ member.name }}

-

Head Mod

-
-
-
-
-
-

Moderators

-
- {{member.name}}'s Minecraft skin -

{{ member.name }}

-
-
-
-
-
-

Trainees

-
- {{member.name}}'s Minecraft skin -

{{ member.name }}

-
-
-
- -
+ @for (member of getTeamMembers('owner') | async; track member) { +
+ {{member.name}}'s Minecraft skin +

{{ member.name }}

+

Owner

+
+ } + @for (member of getTeamMembers('manager') | async; track member) { +
+ {{member.name}}'s Minecraft skin +

{{ member.name }}

+

Manager

+
+ } + + +
+
+

Admins

+ @for (member of getTeamMembers('admin') | async; track member) { +
+ {{member.name}}'s Minecraft skin +

{{ member.name }}

+

Admin

+
+ } +
+
+
+
+

Head Moderators

+ @for (member of getTeamMembers('headmod') | async; track member) { +
+ {{member.name}}'s Minecraft skin +

{{ member.name }}

+

Head Mod

+
+ } +
+
+
+
+

Moderators

+ @for (member of getTeamMembers('moderator') | async; track member) { +
+ {{member.name}}'s Minecraft skin +

{{ member.name }}

+
+ } +
+
+ @if ((getTeamMembers('trainee') | async)?.length ?? 0 > 0) { +
+
+

Trainees

+ @for (member of getTeamMembers('trainee') | async; track member) { +
+ {{member.name}}'s Minecraft skin +

{{ member.name }}

+
+ } +
+
+ } + + diff --git a/frontend/src/app/pages/altitude/team/team.component.ts b/frontend/src/app/pages/altitude/team/team.component.ts index dd9cfb2..85d277f 100644 --- a/frontend/src/app/pages/altitude/team/team.component.ts +++ b/frontend/src/app/pages/altitude/team/team.component.ts @@ -1,7 +1,7 @@ import {Component} from '@angular/core'; import {ScrollService} from '@services/scroll.service'; import {BASE_PATH, Player, TeamService} from '@api'; -import {CommonModule, NgOptimizedImage} from '@angular/common'; +import { CommonModule, NgOptimizedImage } from '@angular/common'; import {HeaderComponent} from '@header/header.component'; import {CookieService} from 'ngx-cookie-service'; import {map, Observable, shareReplay} from 'rxjs'; diff --git a/frontend/src/app/pages/features/map/map.component.ts b/frontend/src/app/pages/features/map/map.component.ts index 2eee7e6..d729028 100644 --- a/frontend/src/app/pages/features/map/map.component.ts +++ b/frontend/src/app/pages/features/map/map.component.ts @@ -1,13 +1,12 @@ import {Component} from '@angular/core'; -import {CommonModule} from '@angular/common'; + import {HeaderComponent} from '@header/header.component'; @Component({ standalone: true, imports: [ - CommonModule, HeaderComponent - ], +], selector: 'app-map', templateUrl: './map.component.html', styleUrl: './map.component.scss' diff --git a/frontend/src/app/pages/footer/footer/footer.component.ts b/frontend/src/app/pages/footer/footer/footer.component.ts index 0bd7475..96ca5b3 100644 --- a/frontend/src/app/pages/footer/footer/footer.component.ts +++ b/frontend/src/app/pages/footer/footer/footer.component.ts @@ -1,16 +1,15 @@ import {Component} from '@angular/core'; import {ALTITUDE_VERSION} from '@custom-types/constant'; -import {CommonModule, NgOptimizedImage} from '@angular/common'; +import { NgOptimizedImage } from '@angular/common'; import {RouterLink} from '@angular/router'; @Component({ selector: 'app-footer', standalone: true, imports: [ - CommonModule, RouterLink, NgOptimizedImage - ], +], templateUrl: './footer.component.html', styleUrl: './footer.component.scss' }) diff --git a/frontend/src/app/pages/footer/privacy/privacy.component.ts b/frontend/src/app/pages/footer/privacy/privacy.component.ts index b84598a..c88ffc4 100644 --- a/frontend/src/app/pages/footer/privacy/privacy.component.ts +++ b/frontend/src/app/pages/footer/privacy/privacy.component.ts @@ -1,6 +1,6 @@ import {Component} from '@angular/core'; import {ScrollService} from '@services/scroll.service'; -import {CommonModule} from '@angular/common'; + import {HeaderComponent} from '@header/header.component'; import {RouterLink} from '@angular/router'; @@ -8,10 +8,9 @@ import {RouterLink} from '@angular/router'; selector: 'app-privacy', standalone: true, imports: [ - CommonModule, HeaderComponent, RouterLink - ], +], templateUrl: './privacy.component.html', styleUrl: './privacy.component.scss' }) diff --git a/frontend/src/app/pages/footer/terms/terms.component.ts b/frontend/src/app/pages/footer/terms/terms.component.ts index 89d2eb4..b810816 100644 --- a/frontend/src/app/pages/footer/terms/terms.component.ts +++ b/frontend/src/app/pages/footer/terms/terms.component.ts @@ -1,7 +1,7 @@ import {Component} from '@angular/core'; import {ScrollService} from '@services/scroll.service'; import {HeaderComponent} from '@header/header.component'; -import {CommonModule} from '@angular/common'; + import {RouterLink} from '@angular/router'; @Component({ @@ -9,10 +9,9 @@ import {RouterLink} from '@angular/router'; standalone: true, templateUrl: './terms.component.html', imports: [ - CommonModule, HeaderComponent, RouterLink - ], +], styleUrl: './terms.component.scss' }) export class TermsComponent { diff --git a/frontend/src/app/pages/forms/forms.component.html b/frontend/src/app/pages/forms/forms.component.html index a8b4ffd..526ce61 100644 --- a/frontend/src/app/pages/forms/forms.component.html +++ b/frontend/src/app/pages/forms/forms.component.html @@ -1,17 +1,17 @@ + [overlay_gradient]="0.5">

{{ formTitle }}

- - + @if (!type) { + @for (formType of FormType | keyvalue; track formType) { - - + } + }
diff --git a/frontend/src/app/pages/forms/forms.component.ts b/frontend/src/app/pages/forms/forms.component.ts index 7ef1310..35883a2 100644 --- a/frontend/src/app/pages/forms/forms.component.ts +++ b/frontend/src/app/pages/forms/forms.component.ts @@ -3,7 +3,7 @@ import {HeaderComponent} from '@header/header.component'; import {MatDialog} from '@angular/material/dialog'; import {ActivatedRoute} from '@angular/router'; import {LoginDialogComponent} from '@shared-components/login/login.component'; -import {KeyValuePipe, NgForOf, NgIf} from '@angular/common'; +import { KeyValuePipe } from '@angular/common'; import {FormType} from './form_type'; import {MatButton} from '@angular/material/button'; import {AuthService} from '@services/auth.service'; @@ -12,11 +12,9 @@ import {AuthService} from '@services/auth.service'; selector: 'app-forms', imports: [ HeaderComponent, - NgIf, - NgForOf, MatButton, KeyValuePipe - ], +], templateUrl: './forms.component.html', styleUrl: './forms.component.scss' }) diff --git a/frontend/src/app/pages/header/header/header.component.html b/frontend/src/app/pages/header/header/header.component.html index c93f887..4587f2e 100644 --- a/frontend/src/app/pages/header/header/header.component.html +++ b/frontend/src/app/pages/header/header/header.component.html @@ -1,6 +1,6 @@
+ [ngStyle]="{ 'background-image': getBackgroundImage(),'height': height, 'background-position': getBackgroundPosition() }"> + + + - + -
+
diff --git a/frontend/src/app/pages/header/header/header.component.ts b/frontend/src/app/pages/header/header/header.component.ts index 21d1d29..b401092 100644 --- a/frontend/src/app/pages/header/header/header.component.ts +++ b/frontend/src/app/pages/header/header/header.component.ts @@ -5,7 +5,6 @@ import {RouterLink} from '@angular/router'; import {AuthService} from '@services/auth.service'; import {Subscription} from 'rxjs'; import {LoginDialogComponent} from '@shared-components/login/login.component'; -import {MatButton} from '@angular/material/button'; import {MatDialog} from '@angular/material/dialog'; @Component({ @@ -14,8 +13,7 @@ import {MatDialog} from '@angular/material/dialog'; CommonModule, ThemeComponent, RouterLink, - NgOptimizedImage, - MatButton + NgOptimizedImage ], selector: 'app-header', templateUrl: './header.component.html', diff --git a/frontend/src/app/pages/home/home.component.html b/frontend/src/app/pages/home/home.component.html index 5d1e7ac..95c3338 100644 --- a/frontend/src/app/pages/home/home.component.html +++ b/frontend/src/app/pages/home/home.component.html @@ -1,157 +1,157 @@ + [background_image]="'/public/img/backgrounds/120spawn-min.png'">

Altitude

The Altitude Minecraft Server -

Altitude now on {{ ALTITUDE_VERSION }}!

- - -

Scroll Down

-
-
-
-
-
- -

Loading...

-

Server IP: play.alttd.com

-
- + width="550"> +

Altitude now on {{ ALTITUDE_VERSION }}!

+ + +

Scroll Down

+
-
-
-
-
-

Adventure Begins

-

You awake in a strange town, where are you? There are residents running about trading with each other and - stories of distant realms with more towns. It's time to write your story. Welcome to Altitude, the laid-back - community-oriented server that hosts your home for Minecraft.

+ +
+
+ +

Loading...

+

Server IP: play.alttd.com

+
+
- Alternative Altitude Server Logo -
-
- -
-
- -
-

Meet the Community

-

Altitude is home to players young and old from all around the globe, and here, everyone is family. Altitude - is your place to get together with friends and relax - and maybe enjoy some survival too. Altitude is - intended for older players, but all are welcome!

-

Don't have Discord? Keep up with news and announcements at the blog.

- -
-
-
-
-
-

Survival Shaped by You

-

Altitude is built by the - community, for the community. We've added features requested by our members and several custom plugins to - create our "perfect" survival experience.

-
-
-

McMMO & MyPet

-

Two of the most requested plugins on Altitude, level up yourself and your pet with these MMO-based - plugins!

- -
- MyPet Info +
+ --> +
+ -
-

Dynamic map

-

See the world and the players around it in real-time! The map shows the entire survival world with claims - and warps.

- -
- Visit Map +
+
+ - -
-
-
-

Community Builds

-

Thank you to our brilliant players for sharing - their impressive builds. Take a look at some of them here!
- If you know of any builds that should be featured, please let us know!

-
-
-
-
-
-
- +
+
+

Community Builds

+

Thank you to our brilliant players for sharing + their impressive builds. Take a look at some of them here!
+ If you know of any builds that should be featured, please let us know!

+
+
+
+
+
+
+ + [style.display]="'block'"> +
+
+
+ @for (slide of getSlideIndices(); track slide) { + + } +
-
- - - -
-
-
-
-
-
-

"Great - community, great people, great server all round . . . If it can bring back my love for minecraft, it could - work wonders for you."

-

- /u/seanhanley1993

-
-
-
-
- Alternative Altitude Server Logo -

play.alttd.com

- -
-
- - -

Scroll Down

-
-
-
+ +
+
+

"Great + community, great people, great server all round . . . If it can bring back my love for minecraft, it could + work wonders for you."

+

- /u/seanhanley1993

+
+
+
+
+ Alternative Altitude Server Logo +

play.alttd.com

+ +
+
+ + +

Scroll Down

+
+ +
diff --git a/frontend/src/app/pages/home/home.component.ts b/frontend/src/app/pages/home/home.component.ts index d61bb1e..8b26f6f 100644 --- a/frontend/src/app/pages/home/home.component.ts +++ b/frontend/src/app/pages/home/home.component.ts @@ -2,7 +2,7 @@ import {Component, OnInit} from '@angular/core'; import {Title} from '@angular/platform-browser'; import {ALTITUDE_VERSION} from '@custom-types/constant'; import {ScrollService} from '@services/scroll.service'; -import {CommonModule, NgOptimizedImage} from '@angular/common'; +import { CommonModule, NgOptimizedImage } from '@angular/common'; import {HeaderComponent} from '@header/header.component'; import {CopyIpComponent} from '@shared-components/copy-ip/copy-ip.component'; import {RouterLink} from '@angular/router'; diff --git a/frontend/src/app/pages/particles/components/frames/frames.component.html b/frontend/src/app/pages/particles/components/frames/frames.component.html index 29add5d..26cb5ad 100644 --- a/frontend/src/app/pages/particles/components/frames/frames.component.html +++ b/frontend/src/app/pages/particles/components/frames/frames.component.html @@ -6,36 +6,42 @@
- -
-

Particles in {{ frameId }}

-
-
- - Particle {{ i + 1 }}: ({{ particle.x.toFixed(2) }}, {{ particle.y.toFixed(2) }} - , {{ particle.z.toFixed(2) }}) - - - + +
+ } + @if (!particleData.frames[frameId] || particleData.frames[frameId].length === 0) { +
+ No particles in this frame. Click on the plane to add particles. +
+ } +
+
+
-
- No particles in this frame. Click on the plane to add particles. -
-
- -
-
- + + }
+ placeholder="Search for a particle type" + matInput + [formControl]="particleTypeControl" + [matAutocomplete]="auto"> + + @for (type of filteredParticleTypes | async; track type) { + + {{ type }} + + } + + + -
- - - - Size: {{ selectedSize }} +
+ + + + Size: {{ selectedSize }} +
- -
- - + + + diff --git a/frontend/src/app/pages/particles/components/particle/particle.component.ts b/frontend/src/app/pages/particles/components/particle/particle.component.ts index 2f7146e..6d71575 100644 --- a/frontend/src/app/pages/particles/components/particle/particle.component.ts +++ b/frontend/src/app/pages/particles/components/particle/particle.component.ts @@ -10,7 +10,7 @@ import {MatInputModule} from '@angular/material/input'; import {MatAutocompleteModule} from '@angular/material/autocomplete'; import {Observable} from 'rxjs'; import {map, startWith} from 'rxjs/operators'; -import {AsyncPipe, NgForOf} from '@angular/common'; +import { AsyncPipe } from '@angular/common'; @Component({ selector: 'app-particle', @@ -26,9 +26,8 @@ import {AsyncPipe, NgForOf} from '@angular/common'; MatFormFieldModule, MatInputModule, MatAutocompleteModule, - NgForOf, AsyncPipe - ], +], templateUrl: './particle.component.html', styleUrl: './particle.component.scss' }) diff --git a/frontend/src/app/pages/particles/components/properties/properties.component.html b/frontend/src/app/pages/particles/components/properties/properties.component.html index 3c392f4..8299662 100644 --- a/frontend/src/app/pages/particles/components/properties/properties.component.html +++ b/frontend/src/app/pages/particles/components/properties/properties.component.html @@ -22,7 +22,9 @@ Particle Type - {{ type }} + @for (type of particleTypes; track type) { + {{ type }} + } @@ -73,21 +75,21 @@ Repeat Delay - - + placeholder="Enter repeat delay"> + + -
- - Random Offset - - -
+
+ + Random Offset + + +
-
- Stationary -
- - - +
+ Stationary +
+ + + diff --git a/frontend/src/app/pages/particles/components/properties/properties.component.ts b/frontend/src/app/pages/particles/components/properties/properties.component.ts index 69ca7f9..9586142 100644 --- a/frontend/src/app/pages/particles/components/properties/properties.component.ts +++ b/frontend/src/app/pages/particles/components/properties/properties.component.ts @@ -2,7 +2,7 @@ import {Component} from '@angular/core'; import {MatCard, MatCardContent, MatCardHeader, MatCardTitle} from "@angular/material/card"; import {MatCheckbox} from "@angular/material/checkbox"; import {MatFormField, MatInput, MatLabel} from "@angular/material/input"; -import {NgForOf} from "@angular/common"; + import {FormsModule, ReactiveFormsModule} from "@angular/forms"; import {ParticleData, ParticleType} from '../../models/particle.model'; import {MatSelect} from '@angular/material/select'; @@ -22,10 +22,9 @@ import {ParticleManagerService} from '../../services/particle-manager.service'; MatLabel, MatOption, MatSelect, - NgForOf, ReactiveFormsModule, FormsModule - ], +], templateUrl: './properties.component.html', styleUrl: './properties.component.scss' }) diff --git a/frontend/src/app/pages/particles/components/render-container/render-container.component.html b/frontend/src/app/pages/particles/components/render-container/render-container.component.html index 57d9fc2..c3d47df 100644 --- a/frontend/src/app/pages/particles/components/render-container/render-container.component.html +++ b/frontend/src/app/pages/particles/components/render-container/render-container.component.html @@ -8,47 +8,49 @@
-
- - - - - - -
+ @if (isPlaneLocked) { +
+ + + + + + +
+ } diff --git a/frontend/src/app/pages/particles/components/render-container/render-container.component.ts b/frontend/src/app/pages/particles/components/render-container/render-container.component.ts index 2da9ffc..b68ea6d 100644 --- a/frontend/src/app/pages/particles/components/render-container/render-container.component.ts +++ b/frontend/src/app/pages/particles/components/render-container/render-container.component.ts @@ -1,6 +1,6 @@ import {AfterViewInit, Component, ElementRef, OnDestroy, ViewChild} from '@angular/core'; import {MatMiniFabButton} from '@angular/material/button'; -import {NgIf} from '@angular/common'; + import {IntersectionPlaneService, PlaneOrientation} from '../../services/intersection-plane.service'; import {MatIcon} from '@angular/material/icon'; import {MatTooltip} from '@angular/material/tooltip'; @@ -16,12 +16,11 @@ import {MatFormField, MatInput, MatLabel} from '@angular/material/input'; MatIcon, MatMiniFabButton, MatTooltip, - NgIf, FormsModule, MatInput, MatFormField, MatLabel - ], +], templateUrl: './render-container.component.html', styleUrl: './render-container.component.scss' }) diff --git a/frontend/src/app/pages/particles/particles.component.ts b/frontend/src/app/pages/particles/particles.component.ts index c63b8d7..8c00767 100644 --- a/frontend/src/app/pages/particles/particles.component.ts +++ b/frontend/src/app/pages/particles/particles.component.ts @@ -1,5 +1,5 @@ import {Component, ElementRef, ViewChild} from '@angular/core'; -import {CommonModule} from '@angular/common'; + import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {MatButtonModule} from '@angular/material/button'; import {MatInputModule} from '@angular/material/input'; @@ -28,7 +28,6 @@ import {ParticlesService} from '@api'; selector: 'app-particles', standalone: true, imports: [ - CommonModule, FormsModule, ReactiveFormsModule, MatButtonModule, @@ -44,8 +43,8 @@ import {ParticlesService} from '@api'; PropertiesComponent, ParticleComponent, FramesComponent, - RenderContainerComponent, - ], + RenderContainerComponent +], templateUrl: './particles.component.html', styleUrl: './particles.component.scss' }) diff --git a/frontend/src/app/pages/reference/bans/bans.component.html b/frontend/src/app/pages/reference/bans/bans.component.html index 687b754..d8c5683 100644 --- a/frontend/src/app/pages/reference/bans/bans.component.html +++ b/frontend/src/app/pages/reference/bans/bans.component.html @@ -1,6 +1,6 @@ > + [overlay_gradient]="0.5">>

Minecraft Punishments

@@ -13,78 +13,81 @@
All + [ngClass]="active">All
Bans + [ngClass]="active">Bans
Mutes + [ngClass]="active">Mutes
Warnings + [ngClass]="active">Warnings
+ style="margin-left: 120px;"> Player + [ngClass]="active">Player
Staff + [ngClass]="active">Staff
-
+
+ + +
+
+ + + {{ this.page }} / {{ getMaxPage() }} + + +
-
- - -
-
- - - {{ this.page }} / {{ getMaxPage() }} - - -
- - - -
+ + + diff --git a/frontend/src/app/pages/reference/bans/bans.component.ts b/frontend/src/app/pages/reference/bans/bans.component.ts index 0aecc90..b19e874 100644 --- a/frontend/src/app/pages/reference/bans/bans.component.ts +++ b/frontend/src/app/pages/reference/bans/bans.component.ts @@ -2,7 +2,7 @@ import {Component, OnInit} from '@angular/core'; import {HeaderComponent} from "@header/header.component"; import {HistoryComponent} from './history/history.component'; import {HistoryCount, HistoryService} from '@api'; -import {NgClass, NgForOf, NgIf} from '@angular/common'; +import { NgClass } from '@angular/common'; import {FormsModule} from '@angular/forms'; import {catchError, map, Observable} from 'rxjs'; import {SearchParams} from './search-terms'; @@ -12,11 +12,9 @@ import {SearchParams} from './search-terms'; imports: [ HeaderComponent, HistoryComponent, - NgIf, FormsModule, - NgForOf, NgClass - ], +], templateUrl: './bans.component.html', styleUrl: './bans.component.scss' }) diff --git a/frontend/src/app/pages/reference/bans/details/details.component.html b/frontend/src/app/pages/reference/bans/details/details.component.html index 035db8a..31c8005 100644 --- a/frontend/src/app/pages/reference/bans/details/details.component.html +++ b/frontend/src/app/pages/reference/bans/details/details.component.html @@ -1,6 +1,6 @@ > + [overlay_gradient]="0.5">>

Minecraft Punishments

@@ -10,15 +10,15 @@
- + @if (punishment === undefined) {

Loading...

-
+ } < Back
- + @if (punishment) {
- + @if (punishment) {

Player

{{punishment.username}}'s Minecraft skin -

{{ punishment.username }}

-
-
+ width="150" + height="150" + alt="{{punishment.username}}'s Minecraft skin" + > +

{{ punishment.username }}

+
+ } +
- -
-
- -
-

Moderator

- {{punishment.punishedBy}}'s Minecraft skin -

{{ punishment.punishedBy }}

+
+
+ @if (punishment) { +
+

Moderator

+ {{punishment.punishedBy}}'s Minecraft skin +

{{ punishment.punishedBy }}

+
+ }
- -
-
-
-
- -
-

Reason

-

{{ punishment.reason | removeTrailingPeriod }}

+
+
+
+ @if (punishment) { +
+

Reason

+

{{ punishment.reason | removeTrailingPeriod }}

+
+ }
- -
-
-
-
- -
-

Date

-

{{ this.historyFormat.getPunishmentTime(punishment) }}

+
+
+
+ @if (punishment) { +
+

Date

+

{{ this.historyFormat.getPunishmentTime(punishment) }}

+
+ }
- -
-
-
-
- -
- - -
- - Expires - {{ this.historyFormat.getExpiredTime(punishment) }} - - Un{{ this.historyFormat.getType(punishment).toLocaleLowerCase() }} reason - {{ punishment.removedReason == null ? 'No reason specified' : punishment.removedReason }} + +
+ + - - + + +
+ @if (punishment) { + Expires + {{ this.historyFormat.getExpiredTime(punishment) }} + @if (punishment.removedBy !== undefined && punishment.removedBy.length > 0) { + Un{{ this.historyFormat.getType(punishment).toLocaleLowerCase() }} reason + {{ punishment.removedReason == null ? 'No reason specified' : punishment.removedReason }} + } + } +
diff --git a/frontend/src/app/pages/reference/bans/details/details.component.ts b/frontend/src/app/pages/reference/bans/details/details.component.ts index 4389358..bded5af 100644 --- a/frontend/src/app/pages/reference/bans/details/details.component.ts +++ b/frontend/src/app/pages/reference/bans/details/details.component.ts @@ -1,6 +1,6 @@ import {Component, OnInit} from '@angular/core'; import {HistoryService, PunishmentHistory} from '@api'; -import {NgClass, NgIf, NgOptimizedImage} from '@angular/common'; +import { NgClass, NgOptimizedImage } from '@angular/common'; import {RemoveTrailingPeriodPipe} from '@pipes/RemoveTrailingPeriodPipe'; import {HistoryFormatService} from '../history-format.service'; import {ActivatedRoute, RouterLink} from '@angular/router'; @@ -10,13 +10,12 @@ import {HeaderComponent} from '@header/header.component'; @Component({ selector: 'app-details', imports: [ - NgIf, NgOptimizedImage, RemoveTrailingPeriodPipe, HeaderComponent, RouterLink, NgClass - ], +], templateUrl: './details.component.html', styleUrl: './details.component.scss' }) diff --git a/frontend/src/app/pages/reference/bans/history/history.component.html b/frontend/src/app/pages/reference/bans/history/history.component.html index 00dd731..c0c19dd 100644 --- a/frontend/src/app/pages/reference/bans/history/history.component.html +++ b/frontend/src/app/pages/reference/bans/history/history.component.html @@ -1,53 +1,55 @@ - +@if (history.length === 0) {

No history found

-
+} - +@if (history.length > 0) {
- - - - - - - - + + + + + + + +
- - - - - - - - - - -
TypePlayerBanned ByReasonDateExpires
TypePlayerBanned ByReasonDateExpires
- {{ this.historyFormat.getType(entry) }} - -
- {{entry.username}}'s Minecraft skin - {{ entry.username }} -
-
-
- {{entry.punishedBy}}'s Minecraft skin - {{ entry.punishedBy }} -
-
- {{ entry.reason | removeTrailingPeriod }} - - {{ this.historyFormat.getPunishmentTime(entry) }} - - {{ this.historyFormat.getExpiredTime(entry) }} -
-
+ @for (entry of history; track entry) { + + + {{ this.historyFormat.getType(entry) }} + + +
+ {{entry.username}}'s Minecraft skin + {{ entry.username }} +
+ + +
+ {{entry.punishedBy}}'s Minecraft skin + {{ entry.punishedBy }} +
+ + + {{ entry.reason | removeTrailingPeriod }} + + + {{ this.historyFormat.getPunishmentTime(entry) }} + + + {{ this.historyFormat.getExpiredTime(entry) }} + + + } + + + + } diff --git a/frontend/src/app/pages/reference/bans/history/history.component.ts b/frontend/src/app/pages/reference/bans/history/history.component.ts index a33d1c6..d08bc51 100644 --- a/frontend/src/app/pages/reference/bans/history/history.component.ts +++ b/frontend/src/app/pages/reference/bans/history/history.component.ts @@ -1,7 +1,7 @@ import {Component, EventEmitter, Input, OnChanges, OnInit, Output} from '@angular/core'; import {BASE_PATH, HistoryService, PunishmentHistory} from '@api'; import {catchError, map, Observable, shareReplay} from 'rxjs'; -import {NgForOf, NgIf, NgOptimizedImage} from '@angular/common'; +import { NgOptimizedImage } from '@angular/common'; import {CookieService} from 'ngx-cookie-service'; import {RemoveTrailingPeriodPipe} from '@pipes/RemoveTrailingPeriodPipe'; import {HttpErrorResponse} from '@angular/common/http'; @@ -13,11 +13,9 @@ import {Router} from '@angular/router'; @Component({ selector: 'app-history', imports: [ - NgIf, - NgForOf, NgOptimizedImage, RemoveTrailingPeriodPipe - ], +], templateUrl: './history.component.html', styleUrl: './history.component.scss', providers: [ diff --git a/frontend/src/app/pages/vote/vote.component.ts b/frontend/src/app/pages/vote/vote.component.ts index fcbffd5..9256856 100644 --- a/frontend/src/app/pages/vote/vote.component.ts +++ b/frontend/src/app/pages/vote/vote.component.ts @@ -1,15 +1,14 @@ import {Component} from '@angular/core'; import {ScrollService} from '@services/scroll.service'; -import {CommonModule} from '@angular/common'; + import {HeaderComponent} from '@header/header.component'; @Component({ selector: 'app-vote', standalone: true, imports: [ - CommonModule, HeaderComponent - ], +], templateUrl: './vote.component.html', styleUrl: './vote.component.scss' }) diff --git a/frontend/src/app/shared-components/copy-ip/copy-ip.component.ts b/frontend/src/app/shared-components/copy-ip/copy-ip.component.ts index e49b28e..be88ed4 100644 --- a/frontend/src/app/shared-components/copy-ip/copy-ip.component.ts +++ b/frontend/src/app/shared-components/copy-ip/copy-ip.component.ts @@ -1,13 +1,11 @@ import {Component} from '@angular/core'; -import {CommonModule} from '@angular/common'; + @Component({ selector: 'app-copy-ip', templateUrl: './copy-ip.component.html', standalone: true, - imports: [ - CommonModule - ], + imports: [], styleUrl: './copy-ip.component.scss' }) export class CopyIpComponent { diff --git a/frontend/src/app/shared-components/login/login.component.html b/frontend/src/app/shared-components/login/login.component.html index fbd3757..1d70ee0 100644 --- a/frontend/src/app/shared-components/login/login.component.html +++ b/frontend/src/app/shared-components/login/login.component.html @@ -4,18 +4,26 @@ Enter your code - - Code is required - - - Code must be 8 characters - - - Code cannot exceed 8 characters - - - Code contains invalid characters - + @if (loginForm.get('code')?.errors?.['required']) { + + Code is required + + } + @if (loginForm.get('code')?.errors?.['minlength']) { + + Code must be 8 characters + + } + @if (loginForm.get('code')?.errors?.['maxlength']) { + + Code cannot exceed 8 characters + + } + @if (loginForm.get('code')?.errors?.['pattern']) { + + Code contains invalid characters + + } diff --git a/frontend/src/app/shared-components/login/login.component.ts b/frontend/src/app/shared-components/login/login.component.ts index 068493e..62f61ae 100644 --- a/frontend/src/app/shared-components/login/login.component.ts +++ b/frontend/src/app/shared-components/login/login.component.ts @@ -4,7 +4,7 @@ import {FormBuilder, FormGroup, ReactiveFormsModule, Validators} from '@angular/ import {MatButtonModule} from '@angular/material/button'; import {MatInputModule} from '@angular/material/input'; import {MatFormFieldModule} from '@angular/material/form-field'; -import {NgIf} from '@angular/common'; + import {MatSnackBar} from '@angular/material/snack-bar'; import {AuthService} from '@services/auth.service'; @@ -18,9 +18,8 @@ import {AuthService} from '@services/auth.service'; MatFormFieldModule, MatDialogTitle, MatDialogContent, - MatDialogActions, - NgIf - ], + MatDialogActions +], templateUrl: './login.component.html', styleUrl: './login.component.scss' }) diff --git a/frontend/src/app/shared-components/theme/theme.component.ts b/frontend/src/app/shared-components/theme/theme.component.ts index d84a10d..6d1756d 100644 --- a/frontend/src/app/shared-components/theme/theme.component.ts +++ b/frontend/src/app/shared-components/theme/theme.component.ts @@ -2,13 +2,11 @@ import {Component, OnDestroy, OnInit} from '@angular/core'; import {Subscription} from 'rxjs'; import {ThemeService} from './theme.service'; import {THEME_MODE} from '@custom-types/constant'; -import {CommonModule} from '@angular/common'; + @Component({ standalone: true, - imports: [ - CommonModule, - ], + imports: [], selector: 'app-theme', templateUrl: './theme.component.html', styleUrl: './theme.component.scss'