refactor: change titlecase to upperfirst for capitalizing

This commit is contained in:
2026-01-31 22:29:03 -03:00
parent 6615912a35
commit 2e6d0c1f0a
6 changed files with 9 additions and 11 deletions

View File

@@ -2,7 +2,7 @@
@for (item of items(); track item.value) {
<button mat-list-item (click)="action.emit(item.value)">
<img matListItemAvatar src="{{item.iconSrc}}" alt=""/>
<span matListItemTitle>{{item.label|translate|titlecase}}</span>
<span matListItemTitle>{{item.label|translate|upperfirst}}</span>
</button>
}
</mat-action-list>

View File

@@ -2,11 +2,11 @@ import { Component, input, output } from '@angular/core';
import { MatListModule } from '@angular/material/list';
import { IconActionListItem } from './IconActionListItem';
import { TranslatePipe } from '@ngx-translate/core';
import { TitleCasePipe } from '@angular/common';
import { UpperfirstPipe } from "../../pipes/upperfirst-pipe";
@Component({
selector: 'app-icon-action-list',
imports: [MatListModule, TranslatePipe, TitleCasePipe],
imports: [MatListModule, TranslatePipe, UpperfirstPipe],
templateUrl: './icon-action-list.html',
styleUrl: './icon-action-list.scss',
})

View File

@@ -2,7 +2,7 @@
@for (item of items(); track item.label) {
<a mat-list-item [routerLink]="item.routerLink">
<mat-icon matListItemIcon>{{item.icon}}</mat-icon>
<span matListItemTitle>{{item.label|translate|titlecase }}</span>
<span matListItemTitle>{{item.label|translate|upperfirst }}</span>
</a>
}
</mat-nav-list>

View File

@@ -4,11 +4,11 @@ import { MatListModule } from '@angular/material/list';
import { RouterLink } from '@angular/router';
import { IconNavListItem } from './IconNavListItem';
import { TranslatePipe } from '@ngx-translate/core';
import { TitleCasePipe } from '@angular/common';
import { UpperfirstPipe } from "../../pipes/upperfirst-pipe";
@Component({
selector: 'app-icon-nav-list',
imports: [MatListModule, MatIcon, RouterLink, TranslatePipe, TitleCasePipe],
imports: [MatListModule, MatIcon, RouterLink, TranslatePipe, UpperfirstPipe],
templateUrl: './icon-nav-list.html',
styleUrl: './icon-nav-list.scss',
})

View File

@@ -5,7 +5,7 @@
<mat-icon>arrow_back</mat-icon>
</button>
}
<h1>{{title()|translate|titlecase}}</h1>
<h1>{{title()|translate|upperfirst}}</h1>
</header>
<ng-content></ng-content>
</div>

View File

@@ -1,13 +1,11 @@
import { TitleCasePipe } from '@angular/common';
import { Component, inject, input } from '@angular/core';
import { TranslatePipe } from '@ngx-translate/core';
import { RouterLink } from "@angular/router";
import { Location } from '@angular/common';
import { MatIcon } from "@angular/material/icon";
import { MatAnchor, MatButton } from "@angular/material/button";
import { UpperfirstPipe } from "../../pipes/upperfirst-pipe";
@Component({
selector: 'app-simple-layout',
imports: [TranslatePipe, TitleCasePipe, MatIcon],
imports: [TranslatePipe, MatIcon, UpperfirstPipe],
templateUrl: './simple-layout.html',
styleUrl: './simple-layout.scss',
})