Skip to content

Commit 5383ef0

Browse files
committed
Switching to the new Android and iOS icons.
1 parent 64135c1 commit 5383ef0

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-plannings-table/time-plannings-table.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@
5858
<div>
5959
<ng-container *ngIf="row['deviceManufacturer'] === 'iOS' ">
6060
<span [matTooltip]="row['deviceModel']" class="device-icon">
61-
<mat-icon>phone_iphone</mat-icon>
61+
<mat-icon svgIcon="ios-icon"></mat-icon>
6262
</span>
6363
</ng-container>
6464
<ng-container *ngIf="row['deviceManufacturer'] !== 'iOS' ">
6565
<span [matTooltip]="row['deviceModel']" class="device-icon">
66-
<mat-icon>android</mat-icon>
66+
<mat-icon svgIcon="android-icon"></mat-icon>
6767
</span>
6868
</ng-container>
6969
{{row['softwareVersion']}}
@@ -119,12 +119,12 @@
119119
<div>
120120
<ng-container *ngIf="row['deviceManufacturer'] === 'iOS' ">
121121
<span [matTooltip]="row['deviceModel']" class="device-icon">
122-
<mat-icon>phone_iphone</mat-icon>
122+
<mat-icon svgIcon="ios-icon"></mat-icon>
123123
</span>
124124
</ng-container>
125125
<ng-container *ngIf="row['deviceManufacturer'] !== 'iOS' ">
126126
<span [matTooltip]="row['deviceModel']" class="device-icon">
127-
<mat-icon>android</mat-icon>
127+
<mat-icon svgIcon="android-icon"></mat-icon>
128128
</span>
129129
</ng-container>
130130
{{row['softwareVersion']}}

eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-plannings-table/time-plannings-table.component.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ import * as R from 'ramda';
1414
import {TimePlanningMessagesEnum} from '../../../enums';
1515
import {Store} from "@ngrx/store";
1616
import {selectAuthIsAdmin, selectCurrentUserIsFirstUser} from "src/app/state";
17+
import {AndroidIcon, iOSIcon} from "src/app/common/const";
18+
import {MatIconRegistry} from "@angular/material/icon";
19+
import {DomSanitizer} from "@angular/platform-browser";
1720

1821
@Component({
1922
selector: 'app-time-plannings-table',
@@ -31,6 +34,8 @@ export class TimePlanningsTableComponent implements OnInit, OnChanges {
3134
private translateService = inject(TranslateService);
3235
protected datePipe = inject(DatePipe);
3336
private cdr = inject(ChangeDetectorRef);
37+
private iconRegistry = inject(MatIconRegistry);
38+
private sanitizer = inject(DomSanitizer);
3439

3540
@Input() timePlannings: TimePlanningModel[] = [];
3641
@Input() dateFrom!: Date;
@@ -47,9 +52,9 @@ export class TimePlanningsTableComponent implements OnInit, OnChanges {
4752
protected selectAuthIsAdmin$ = this.store.select(selectAuthIsAdmin);
4853
public selectCurrentUserIsFirstUser$ = this.store.select(selectCurrentUserIsFirstUser);
4954

50-
51-
5255
ngOnInit(): void {
56+
this.iconRegistry.addSvgIconLiteral('android-icon', this.sanitizer.bypassSecurityTrustHtml(AndroidIcon));
57+
this.iconRegistry.addSvgIconLiteral('ios-icon', this.sanitizer.bypassSecurityTrustHtml(iOSIcon));
5358
this.enumKeys = Object.keys(TimePlanningMessagesEnum).filter(key => isNaN(Number(key)));
5459
this.updateTableHeaders();
5560
this.translateService.onLangChange.subscribe((lang) => {

0 commit comments

Comments
 (0)