Use body as container, allow link

This commit is contained in:
shamoon 2024-11-19 16:56:58 -08:00
parent 432d81845e
commit 7f233dad94
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<a [href]="previewUrl" target="_blank" class="{{btn_classes}}"
[ngbPopover]="previewContent" [popoverTitle]="document.title | documentTitle"
<a [href]="link ?? previewUrl" target="_blank" class="{{btn_classes}}"
[ngbPopover]="previewContent" [popoverTitle]="document.title | documentTitle" container="body"
autoClose="true" [popoverClass]="popoverClass" (mouseenter)="mouseEnterPreview()" (mouseleave)="mouseLeavePreview()" #popover="ngbPopover">
<ng-content></ng-content>
</a>

View File

@ -27,6 +27,9 @@ export class PreviewPopupComponent implements OnDestroy {
@Input()
btn_classes: string = 'btn btn-sm btn-outline-secondary'
@Input()
link: string
unsubscribeNotifier: Subject<any> = new Subject()
error = false