core: add setting to open application launch URL in a new browser tab (#3037)

* core: add setting to open application launch URL in a new browser tab

* core: fix failing applications unit tests

* core: fix formatting

* core: include models only generated when debug mode is enabled
This commit is contained in:
Frédérick Permantier
2022-06-05 14:32:22 +02:00
committed by GitHub
parent c11435780d
commit 2dfa6c2c82
17 changed files with 134 additions and 2 deletions

View File

@ -88,7 +88,12 @@ export class LibraryApplication extends LitElement {
style="background: ${this.background} !important"
>
<div class="pf-c-card__header">
<a href="${ifDefined(this.application.launchUrl ?? "")}"> ${this.renderIcon()} </a>
<a
href="${ifDefined(this.application.launchUrl ?? "")}"
target="${ifDefined(this.application.openInNewTab ? "_blank" : undefined)}"
>
${this.renderIcon()}
</a>
${until(
uiConfig().then((config) => {
if (!config.enabledFeatures.applicationEdit) {
@ -110,7 +115,9 @@ export class LibraryApplication extends LitElement {
</div>
<div class="pf-c-card__title">
<p>
<a href="${ifDefined(this.application.launchUrl ?? "")}"
<a
href="${ifDefined(this.application.launchUrl ?? "")}"
target="${ifDefined(this.application.openInNewTab ? "_blank" : undefined)}"
>${this.application.name}</a
>
</p>