Skip to content

Commit

Permalink
Fixes the bug: Knowledge Base page crashes if a content description i…
Browse files Browse the repository at this point in the history
…s too long
  • Loading branch information
Nicola Lanzilotto committed Aug 6, 2024
1 parent 79c6bb2 commit df8248d
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,26 @@
{{ kb.createdAt | amTimeAgo }}
</td>

<td class="" style="max-width: 100%; display: grid;" (click)="onOpenBaseModalDetail(kb)">
<!-- <td class="" style="max-width: 100%; display: grid;" (click)="onOpenBaseModalDetail(kb)">
<div [ngClass]="{'imported-file': kb.type === 'pdf' || kb.type === 'txt' || kb.type === 'docx'}" class="ellipsis-text" style="max-width: 100%; font-size: 16px;">{{ kb.name }}</div>
<div *ngIf="kb.type !== 'pdf' && kb.type !== 'txt' && kb.type !== 'docx'" class="subtitle ellipsis-text" style="max-width: 100%;">
{{getSubtitle(kb)}}
</div>
</td> -->

<td class="" style="max-width: 100%; display: grid;" (click)="onOpenBaseModalDetail(kb)">
<div [ngClass]="{'imported-file': kb.type === 'pdf' || kb.type === 'txt' || kb.type === 'docx'}" class="ellipsis-text" style="max-width: 100%; font-size: 16px;">{{ kb.name }}</div>

<div *ngIf="kb.type === 'text'" class="subtitle ellipsis-text" style="max-width: 100%;">

{{kb.content | slice:0:500 }}

</div>
<div *ngIf="kb.type === 'url'" class="subtitle ellipsis-text" style="max-width: 100%;">

{{kb.source }}

</div>
</td>

<td style="max-width: 40px; text-align: end;">
Expand Down

0 comments on commit df8248d

Please sign in to comment.