web/user: fix opening application with Enter not respecting new tab setting (cherry-pick #13115) (#13118)

web/user: fix opening application with Enter not respecting new tab setting (#13115)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens L. <jens@goauthentik.io>
This commit is contained in:
gcp-cherry-pick-bot[bot]
2025-02-19 17:57:18 +01:00
committed by GitHub
parent 7243add30f
commit 13c99c8546

View File

@ -116,8 +116,13 @@ export class LibraryPage extends AKElement {
@bound
launchRequest(event: LibraryPageSearchSelected) {
event.stopPropagation();
if (this.selectedApp?.launchUrl) {
if (!this.selectedApp?.launchUrl) {
return;
}
if (!this.selectedApp.openInNewTab) {
window.location.assign(this.selectedApp?.launchUrl);
} else {
window.open(this.selectedApp.launchUrl);
}
}