web: unify mobile back and audit controls and link pipeline run history
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 { h, canCopyLink, canShare, copyArtifactLink, copyText, shareArtifact } from "../dom.js";
|
||||
import { backChevronIcon, h, canCopyLink, canShare, copyArtifactLink, copyText, shareArtifact } from "../dom.js";
|
||||
import { changeKindTone, describeError } from "../format.js";
|
||||
import {
|
||||
BINARY_DIFF_MESSAGE,
|
||||
@@ -856,6 +856,7 @@ function openStageAudit({ title = "Audit", subtitle = "", tabs = [], trigger = n
|
||||
h(
|
||||
"div",
|
||||
{ class: "audit-head" },
|
||||
h("button", { class: "ghost back-button audit-back", type: "button", "aria-label": "Back to stage", title: "Back to stage", onclick: close }, backChevronIcon()),
|
||||
h(
|
||||
"div",
|
||||
{ class: "audit-titles" },
|
||||
@@ -868,7 +869,7 @@ function openStageAudit({ title = "Audit", subtitle = "", tabs = [], trigger = n
|
||||
const nav = h("nav", {
|
||||
class: "audit-tabs",
|
||||
role: "tablist",
|
||||
"aria-orientation": "vertical",
|
||||
"aria-orientation": window.matchMedia("(max-width: 599px)").matches ? "horizontal" : "vertical",
|
||||
"aria-label": "Audit sections",
|
||||
});
|
||||
const body = h("div", {
|
||||
@@ -901,8 +902,8 @@ function openStageAudit({ title = "Audit", subtitle = "", tabs = [], trigger = n
|
||||
onkeydown: (event) => {
|
||||
const index = available.findIndex((entry) => entry.key === tab.key);
|
||||
let next = -1;
|
||||
if (event.key === "ArrowDown") next = (index + 1) % available.length;
|
||||
else if (event.key === "ArrowUp") next = (index - 1 + available.length) % available.length;
|
||||
if (event.key === "ArrowDown" || event.key === "ArrowRight") next = (index + 1) % available.length;
|
||||
else if (event.key === "ArrowUp" || event.key === "ArrowLeft") next = (index - 1 + available.length) % available.length;
|
||||
else if (event.key === "Home") next = 0;
|
||||
else if (event.key === "End") next = available.length - 1;
|
||||
if (next < 0) return;
|
||||
|
||||
Reference in New Issue
Block a user