style: apply prettier formatting
This commit is contained in:
@@ -91,9 +91,12 @@ export class PublicMediaService {
|
|||||||
private readonly injector = inject(Injector);
|
private readonly injector = inject(Injector);
|
||||||
private readonly languageService = inject(LanguageService);
|
private readonly languageService = inject(LanguageService);
|
||||||
private readonly baseUrl = `${environment.apiUrl}/api/public/media`;
|
private readonly baseUrl = `${environment.apiUrl}/api/public/media`;
|
||||||
private readonly selectedLang$ = toObservable(this.languageService.currentLang, {
|
private readonly selectedLang$ = toObservable(
|
||||||
injector: this.injector,
|
this.languageService.currentLang,
|
||||||
}).pipe(distinctUntilChanged());
|
{
|
||||||
|
injector: this.injector,
|
||||||
|
},
|
||||||
|
).pipe(distinctUntilChanged());
|
||||||
|
|
||||||
getUsageMedia(
|
getUsageMedia(
|
||||||
usageType: PublicMediaUsageType,
|
usageType: PublicMediaUsageType,
|
||||||
|
|||||||
@@ -159,9 +159,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
[(ngModel)]="
|
[(ngModel)]="getActiveTranslation(section.usageKey).altText"
|
||||||
getActiveTranslation(section.usageKey).altText
|
|
||||||
"
|
|
||||||
placeholder="Testo alternativo"
|
placeholder="Testo alternativo"
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@@ -418,9 +418,7 @@ export class AdminHomeMediaComponent implements OnInit, OnDestroy {
|
|||||||
this.getFormState(sectionKey).activeLanguage = language;
|
this.getFormState(sectionKey).activeLanguage = language;
|
||||||
}
|
}
|
||||||
|
|
||||||
getActiveTranslation(
|
getActiveTranslation(sectionKey: HomeSectionKey): AdminMediaTranslation {
|
||||||
sectionKey: HomeSectionKey,
|
|
||||||
): AdminMediaTranslation {
|
|
||||||
const formState = this.getFormState(sectionKey);
|
const formState = this.getFormState(sectionKey);
|
||||||
return formState.translations[formState.activeLanguage];
|
return formState.translations[formState.activeLanguage];
|
||||||
}
|
}
|
||||||
@@ -585,7 +583,9 @@ export class AdminHomeMediaComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private normalizeTranslations(
|
private normalizeTranslations(
|
||||||
translations: Partial<Record<AdminMediaLanguage, Partial<AdminMediaTranslation>>>,
|
translations: Partial<
|
||||||
|
Record<AdminMediaLanguage, Partial<AdminMediaTranslation>>
|
||||||
|
>,
|
||||||
): Record<AdminMediaLanguage, AdminMediaTranslation> {
|
): Record<AdminMediaLanguage, AdminMediaTranslation> {
|
||||||
return {
|
return {
|
||||||
it: {
|
it: {
|
||||||
|
|||||||
Reference in New Issue
Block a user