use the new selector for profiles

This commit is contained in:
Eugene Pankov
2020-04-11 12:37:46 +02:00
parent 4969c4e2fc
commit 129a7c1a09
4 changed files with 42 additions and 12 deletions

View File

@@ -14,6 +14,13 @@
[class.active]='selectedIndex == i',
*ngFor='let option of filteredOptions; let i = index'
)
i(class='fa-fw fas mr-1 fa-{{option.icon}}')
.mr-2 {{getOptionText(option)}}
i.icon(
class='fa-fw fas fa-{{option.icon}}',
*ngIf='!iconIsSVG(option.icon)'
)
.icon(
[fastHtmlBind]='option.icon',
*ngIf='iconIsSVG(option.icon)'
)
.mr-2.title {{getOptionText(option)}}
.text-muted {{option.description}}

View File

@@ -2,3 +2,12 @@
max-height: 70vh;
overflow: auto;
}
.icon {
width: 1.25rem;
margin-right: 0.25rem;
}
.title {
margin-left: 10px;
}

View File

@@ -71,4 +71,8 @@ export class SelectorModalComponent<T> {
close (): void {
this.modalInstance.dismiss()
}
iconIsSVG (icon: string): boolean {
return icon?.startsWith('<')
}
}