Merge pull request #857 from mercury233/patch-1

fix completed result tooltip
This commit is contained in:
Alex
2025-12-27 12:17:40 +02:00
committed by GitHub
2 changed files with 11 additions and 1 deletions

View File

@@ -395,7 +395,7 @@
<fa-icon [icon]="faTimesCircle" class="text-danger" />
}
</div>
<span ngbTooltip="{{download.value.msg}} | {{download.value.error}}">@if (!!download.value.filename) {
<span ngbTooltip="{{buildResultItemTooltip(download.value)}}">@if (!!download.value.filename) {
<a href="{{buildDownloadLink(download.value)}}" target="_blank">{{ download.value.title }}</a>
} @else {
{{download.value.title}}

View File

@@ -367,6 +367,16 @@ export class App implements AfterViewInit, OnInit {
return baseDir + encodeURIComponent(download.filename);
}
buildResultItemTooltip(download: Download) {
const parts = [];
if (download.msg) {
parts.push(download.msg);
}
if (download.error) {
parts.push(download.error);
}
return parts.join(' | ');
}
isNumber(event: KeyboardEvent) {
const charCode = +event.code || event.keyCode;