fix: Hide irrelevant tabs in failed crawl detail view (#2695)

Hides QA, replay, and files tabs for failed ("failed", "canceled", and
skipped) crawls.
This commit is contained in:
sua yoo 2025-06-30 10:07:37 -07:00 committed by GitHub
parent ff10dd02d4
commit 5c78a57cbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -545,27 +545,33 @@ export class ArchivedItemDetail extends BtrixElement {
iconLibrary: "default",
icon: "info-circle-fill",
})}
${when(
this.itemType === "crawl" && this.isCrawler,
() => html`
${renderNavItem({
section: "qa",
iconLibrary: "default",
icon: "clipboard2-data-fill",
detail: html`<btrix-beta-icon></btrix-beta-icon>`,
})}
`,
${when(this.item, (item) =>
isSuccessfullyFinished(item)
? html`
${when(
this.itemType === "crawl" && this.isCrawler,
() => html`
${renderNavItem({
section: "qa",
iconLibrary: "default",
icon: "clipboard2-data-fill",
detail: html`<btrix-beta-icon></btrix-beta-icon>`,
})}
`,
)}
${renderNavItem({
section: "replay",
iconLibrary: "app",
icon: "replaywebpage",
})}
${renderNavItem({
section: "files",
iconLibrary: "default",
icon: "folder-fill",
})}
`
: nothing,
)}
${renderNavItem({
section: "replay",
iconLibrary: "app",
icon: "replaywebpage",
})}
${renderNavItem({
section: "files",
iconLibrary: "default",
icon: "folder-fill",
})}
${when(
this.itemType === "crawl",
() => html`