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", iconLibrary: "default",
icon: "info-circle-fill", icon: "info-circle-fill",
})} })}
${when( ${when(this.item, (item) =>
this.itemType === "crawl" && this.isCrawler, isSuccessfullyFinished(item)
() => html` ? html`
${renderNavItem({ ${when(
section: "qa", this.itemType === "crawl" && this.isCrawler,
iconLibrary: "default", () => html`
icon: "clipboard2-data-fill", ${renderNavItem({
detail: html`<btrix-beta-icon></btrix-beta-icon>`, 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( ${when(
this.itemType === "crawl", this.itemType === "crawl",
() => html` () => html`