-
+
@@ -41,7 +41,7 @@ {{ level.name }}
Server unavailable
Try again later
-
+
diff --git a/apps/client/src/app/fly-squasher/high-score/high-score.component.spec.ts b/apps/client/src/app/fly-squasher/high-score/high-score.component.spec.ts
index 7e38a9a4..633ba0f0 100644
--- a/apps/client/src/app/fly-squasher/high-score/high-score.component.spec.ts
+++ b/apps/client/src/app/fly-squasher/high-score/high-score.component.spec.ts
@@ -8,6 +8,7 @@ import { authServiceStub } from "../../auth/auth.service.spec";
import { HighScoreService } from "./high-score.service";
import { highScoreServiceStub } from "./high-score.service.spec";
import { FontAwesomeTestingModule } from "@fortawesome/angular-fontawesome/testing";
+import { RouterTestingModule } from "@angular/router/testing";
describe("HighScoreComponent", () => {
let component: HighScoreComponent;
@@ -15,7 +16,6 @@ describe("HighScoreComponent", () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
- declarations: [HighScoreComponent],
providers: [
{
provide: ServerHealthService,
@@ -30,7 +30,7 @@ describe("HighScoreComponent", () => {
useValue: highScoreServiceStub
}
],
- imports: [FontAwesomeTestingModule]
+ imports: [HighScoreComponent, FontAwesomeTestingModule, RouterTestingModule]
}).compileComponents();
fixture = TestBed.createComponent(HighScoreComponent);
diff --git a/apps/client/src/app/fly-squasher/high-score/high-score.component.ts b/apps/client/src/app/fly-squasher/high-score/high-score.component.ts
index dacb5221..18e90d2f 100644
--- a/apps/client/src/app/fly-squasher/high-score/high-score.component.ts
+++ b/apps/client/src/app/fly-squasher/high-score/high-score.component.ts
@@ -1,14 +1,18 @@
-import { Component, OnInit } from "@angular/core";
+import { Component, inject, OnInit } from "@angular/core";
import { HighScoreService } from "./high-score.service";
import { FlySquasherLevelEnum, FlySquasherLevels, ScoreDto } from "@fuzzy-waddle/api-interfaces";
import { faExclamationTriangle, faSpinner } from "@fortawesome/free-solid-svg-icons";
import { ServerHealthService } from "../../shared/services/server-health.service";
-import { AuthService } from "../../auth/auth.service";
+import { CommonModule } from "@angular/common";
+import { FaIconComponent } from "@fortawesome/angular-fontawesome";
+import { RouterLink } from "@angular/router";
@Component({
selector: "fly-squasher-high-score",
templateUrl: "./high-score.component.html",
- styleUrls: ["./high-score.component.scss"]
+ styleUrls: ["./high-score.component.scss"],
+ standalone: true,
+ imports: [CommonModule, FaIconComponent, RouterLink]
})
export class HighScoreComponent implements OnInit {
protected readonly faSpinner = faSpinner;
@@ -16,10 +20,8 @@ export class HighScoreComponent implements OnInit {
protected loading = true;
protected highScores: ScoreDto[] = [];
- constructor(
- private readonly highScoreService: HighScoreService,
- protected readonly serverHealthService: ServerHealthService
- ) {}
+ private readonly highScoreService = inject(HighScoreService);
+ protected readonly serverHealthService = inject(ServerHealthService);
async ngOnInit(): Promise
{
await this.serverHealthService.checkHealth();
diff --git a/apps/client/src/app/fly-squasher/home/home.component.html b/apps/client/src/app/fly-squasher/home/home.component.html
index 2f1301bf..d7554c8d 100644
--- a/apps/client/src/app/fly-squasher/home/home.component.html
+++ b/apps/client/src/app/fly-squasher/home/home.component.html
@@ -3,8 +3,11 @@
-
+
Warning! Server is not available. Your score will not be saved.
diff --git a/apps/client/src/app/fly-squasher/home/home.component.spec.ts b/apps/client/src/app/fly-squasher/home/home.component.spec.ts
index a52557cf..6939d53f 100644
--- a/apps/client/src/app/fly-squasher/home/home.component.spec.ts
+++ b/apps/client/src/app/fly-squasher/home/home.component.spec.ts
@@ -6,6 +6,7 @@ import { serverHealthServiceStub } from "../../shared/services/server-health.ser
import { AuthService } from "../../auth/auth.service";
import { authServiceStub } from "../../auth/auth.service.spec";
import { FontAwesomeTestingModule } from "@fortawesome/angular-fontawesome/testing";
+import { RouterTestingModule } from "@angular/router/testing";
describe("HomeComponent", () => {
let component: HomeComponent;
@@ -13,7 +14,6 @@ describe("HomeComponent", () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
- declarations: [HomeComponent],
providers: [
{
provide: ServerHealthService,
@@ -24,7 +24,7 @@ describe("HomeComponent", () => {
useValue: authServiceStub
}
],
- imports: [FontAwesomeTestingModule]
+ imports: [HomeComponent, FontAwesomeTestingModule, RouterTestingModule]
}).compileComponents();
fixture = TestBed.createComponent(HomeComponent);
diff --git a/apps/client/src/app/fly-squasher/home/home.component.ts b/apps/client/src/app/fly-squasher/home/home.component.ts
index 105df542..87cf0dc9 100644
--- a/apps/client/src/app/fly-squasher/home/home.component.ts
+++ b/apps/client/src/app/fly-squasher/home/home.component.ts
@@ -1,18 +1,21 @@
-import { Component } from "@angular/core";
+import { Component, inject } from "@angular/core";
import { AuthService } from "../../auth/auth.service";
import { faExclamationTriangle } from "@fortawesome/free-solid-svg-icons";
import { ServerHealthService } from "../../shared/services/server-health.service";
+import { CommonModule } from "@angular/common";
+import { FaIconComponent } from "@fortawesome/angular-fontawesome";
+import { RouterLink } from "@angular/router";
@Component({
selector: "fly-squasher-home",
templateUrl: "./home.component.html",
- styleUrls: ["./home.component.scss"]
+ styleUrls: ["./home.component.scss"],
+ standalone: true,
+ imports: [CommonModule, FaIconComponent, RouterLink]
})
export class HomeComponent {
protected readonly faExclamationTriangle = faExclamationTriangle;
- constructor(
- protected readonly authService: AuthService,
- protected readonly serverHealthService: ServerHealthService
- ) {}
+ protected readonly authService = inject(AuthService);
+ protected readonly serverHealthService = inject(ServerHealthService);
}
diff --git a/apps/client/src/app/fly-squasher/main/main.component.html b/apps/client/src/app/fly-squasher/main/main.component.html
index a8af0b4f..4e5f2640 100644
--- a/apps/client/src/app/fly-squasher/main/main.component.html
+++ b/apps/client/src/app/fly-squasher/main/main.component.html
@@ -1,8 +1,6 @@
-
-
diff --git a/apps/client/src/app/fly-squasher/options/options.component.ts b/apps/client/src/app/fly-squasher/options/options.component.ts
index a5678aa6..0eb3afd9 100644
--- a/apps/client/src/app/fly-squasher/options/options.component.ts
+++ b/apps/client/src/app/fly-squasher/options/options.component.ts
@@ -5,7 +5,6 @@ import { FormsModule } from "@angular/forms";
import { VolumeSettings } from "../shared/volumeSettings";
@Component({
- selector: "fuzzy-waddle-options",
standalone: true,
imports: [CommonModule, RouterLink, FormsModule],
templateUrl: "./options.component.html",
diff --git a/apps/client/src/app/home/chat/chat-float/chat-float.component.html b/apps/client/src/app/home/chat/chat-float/chat-float.component.html
index 3f64bc39..00647f9d 100644
--- a/apps/client/src/app/home/chat/chat-float/chat-float.component.html
+++ b/apps/client/src/app/home/chat/chat-float/chat-float.component.html
@@ -8,6 +8,10 @@
-