dev #42

Merged
JoeKung merged 12 commits from dev into main 2026-03-11 17:35:12 +01:00
3 changed files with 5 additions and 10 deletions
Showing only changes of commit 63cd4c4f5e - Show all commits

View File

@@ -70,9 +70,9 @@ export const appConfig: ApplicationConfig = {
provideAppInitializer(() => { provideAppInitializer(() => {
const translate = inject(TranslateService); const translate = inject(TranslateService);
const router = inject(Router); const router = inject(Router);
const request = inject(REQUEST, { optional: true }) as const request = inject(REQUEST, { optional: true }) as {
| { url?: string } url?: string;
| null; } | null;
translate.addLangs([...SUPPORTED_LANGS]); translate.addLangs([...SUPPORTED_LANGS]);
translate.setDefaultLang('it'); translate.setDefaultLang('it');

View File

@@ -1,8 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { import { TranslateLoader, TranslationObject } from '@ngx-translate/core';
TranslateLoader,
TranslationObject,
} from '@ngx-translate/core';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import de from '../../../assets/i18n/de.json'; import de from '../../../assets/i18n/de.json';
import en from '../../../assets/i18n/en.json'; import en from '../../../assets/i18n/en.json';

View File

@@ -11,9 +11,7 @@ function isAbsoluteUrl(url: string): boolean {
return /^[a-z][a-z\d+\-.]*:/i.test(url) || url.startsWith('//'); return /^[a-z][a-z\d+\-.]*:/i.test(url) || url.startsWith('//');
} }
function firstHeaderValue( function firstHeaderValue(value: string | string[] | undefined): string | null {
value: string | string[] | undefined,
): string | null {
if (Array.isArray(value)) { if (Array.isArray(value)) {
return value[0] ?? null; return value[0] ?? null;
} }