fix(web): open artifacts outside the installed app context
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// the rendered/raw diff viewer, the artifact viewer, the human-decision sheet,
|
||||
// the shared cancel/retry confirm and the shared Action-failed report.
|
||||
|
||||
import { backChevronIcon, h, canCopyLink, canShare, copyArtifactLink, copyText, shareArtifact } from "../dom.js";
|
||||
import { backChevronIcon, h, canCopyLink, canShare, copyArtifactLink, copyText, shareArtifact, artifactBrowserLinkProps } from "../dom.js";
|
||||
import { changeKindTone, describeError } from "../format.js";
|
||||
import { definitionDocument } from "./stageDefinition.js";
|
||||
import {
|
||||
@@ -663,9 +663,7 @@ function openArtifactViewer(viewable, startIndex, trigger = null) {
|
||||
error.append(
|
||||
h("a", {
|
||||
class: "viewer-external",
|
||||
href: resolved,
|
||||
target: "_blank",
|
||||
rel: "noreferrer",
|
||||
...artifactBrowserLinkProps(resolved),
|
||||
text: `Open ${name} externally`,
|
||||
}),
|
||||
);
|
||||
@@ -752,12 +750,11 @@ function openArtifactViewer(viewable, startIndex, trigger = null) {
|
||||
}
|
||||
if (resolved) {
|
||||
actions.append(
|
||||
h("button", {
|
||||
class: "viewer-action",
|
||||
type: "button",
|
||||
h("a", {
|
||||
class: "viewer-action browser-button",
|
||||
...artifactBrowserLinkProps(resolved),
|
||||
"data-viewer-focus": "open",
|
||||
text: "Open",
|
||||
onclick: () => window.open(resolved, "_blank", "noopener,noreferrer"),
|
||||
text: "Open in browser",
|
||||
}),
|
||||
h("button", {
|
||||
class: "viewer-action",
|
||||
|
||||
Reference in New Issue
Block a user