initial setup

This commit is contained in:
MrPlatnum committed 2025-09-08 08:42:53 +02:00
commit ff12bb40ad
77 files changed
+98381

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { DataExportService } from './data-export.service';
describe('DataExportService', () => {
let service: DataExportService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(DataExportService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
+9
View File
@@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class DataExportService {
constructor() { }
}
+54
View File
@@ -0,0 +1,54 @@
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { Router } from '@angular/router';
@Injectable({
providedIn: 'root'
})
export class TestProgressService {
private totalTests = 7;
private currentTestSubject = new BehaviorSubject<number>(1);
private progressSubject = new BehaviorSubject<number>(14.3); // (1/7) * 100
currentTest$ = this.currentTestSubject.asObservable();
progress$ = this.progressSubject.asObservable();
constructor(private router: Router) {}
getCurrentTest(): number {
return this.currentTestSubject.value;
}
getTotalTests(): number {
return this.totalTests;
}
nextTest(): void {
const current = this.currentTestSubject.value;
if (current < this.totalTests) {
const nextTest = current + 1;
this.currentTestSubject.next(nextTest);
this.updateProgress(nextTest);
} else {
// All tests completed, navigate to completion screen
this.router.navigate(['/completion']);
}
}
goToTest(testNumber: number): void {
if (testNumber >= 1 && testNumber <= this.totalTests) {
this.currentTestSubject.next(testNumber);
this.updateProgress(testNumber);
}
}
private updateProgress(testNumber: number): void {
const progress = (testNumber / this.totalTests) * 100;
this.progressSubject.next(progress);
}
resetProgress(): void {
this.currentTestSubject.next(1);
this.updateProgress(1);
}
}
+16
View File
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { WebxrService } from './webxr.service';
describe('WebxrService', () => {
let service: WebxrService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(WebxrService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
+9
View File
@@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class WebxrService {
constructor() { }
}