dont render title if its the same with name (#546)

This commit is contained in:
Cilibiu Bogdan
2018-08-03 08:30:00 +03:00
committed by Denys Vuika
parent 65777185b4
commit ad6e027e6d
2 changed files with 5 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
<div class="line">
<span *ngIf="isFile" (click)="showPreview()" class="link"> {{ name }} </span>
<span *ngIf="!isFile" (click)="navigate()" class="bold link"> {{ name }} </span>
<span *ngIf="hasTitle"> ( {{ title }} ) </span>
<span *ngIf="hasTitle && showTitle"> ( {{ title }} ) </span>
</div>
<div *ngIf="hasDescription" class="line"> {{ description }} </div>

View File

@@ -81,6 +81,10 @@ export class SearchResultsRowComponent implements OnInit {
return this.title;
}
get showTitle() {
return this.name !== this.title;
}
get hasSize() {
return this.size;
}