From 0e04fd98b140522f37360d5457164d4b25391af2 Mon Sep 17 00:00:00 2001 From: sua yoo Date: Tue, 11 Feb 2025 16:46:13 -0800 Subject: [PATCH] fix: More accurate archived item details (#2364) - Moves page count out from under "Size" label in archived item detail - Renames "Pages Crawled" to "Pages" in archived item leading heading and detail overview - Renames "Crawl ID" to "Archived Item ID" --------- Co-authored-by: Henry Wilkinson --- .../archived-items/archived-item-list.ts | 2 +- .../archived-item-detail.ts | 38 ++++--------------- frontend/src/pages/org/archived-items.ts | 2 +- 3 files changed, 10 insertions(+), 32 deletions(-) diff --git a/frontend/src/features/archived-items/archived-item-list.ts b/frontend/src/features/archived-items/archived-item-list.ts index eab15f1b..403e13b7 100644 --- a/frontend/src/features/archived-items/archived-item-list.ts +++ b/frontend/src/features/archived-items/archived-item-list.ts @@ -415,7 +415,7 @@ export class ArchivedItemList extends TailwindElement { { cssCol: "1fr", cell: html` - ${msg("Pages Crawled")} + ${msg("Pages")} `, }, { diff --git a/frontend/src/pages/org/archived-item-detail/archived-item-detail.ts b/frontend/src/pages/org/archived-item-detail/archived-item-detail.ts index 49a201af..c87cad91 100644 --- a/frontend/src/pages/org/archived-item-detail/archived-item-detail.ts +++ b/frontend/src/pages/org/archived-item-detail/archived-item-detail.ts @@ -853,43 +853,21 @@ export class ArchivedItemDetail extends BtrixElement { `, )} - + + ${this.item + ? html`${this.localize.number(this.item.pageCount || 0)} + ${pluralOf("pages", this.item.pageCount || 0)}` + : html``} + ${this.item ? html`${this.item.fileSize - ? html`${this.localize.bytes(this.item.fileSize || 0, { - unitDisplay: "narrow", - })}${this.item.stats?.done - ? html`, - ${this.localize.number(+this.item.stats.done)} - / - ${this.localize.number(+this.item.stats.found)} - - ${pluralOf("pages", +this.item.stats.found)}` - : html`, - ${this.localize.number( - this.item.pageCount ? +this.item.pageCount : 0, - )} - - ${pluralOf( - "pages", - this.item.pageCount ? +this.item.pageCount : 0, - )}`}` + ? this.localize.bytes(this.item.fileSize || 0) : html`${msg("Unknown")}`}` : html``} ${this.renderCrawlChannelVersion()} - + ${this.item ? html` ClipboardController.copyToClipboard(item.id)} > - ${msg("Copy Crawl ID")} + ${msg("Copy Archived Item ID")} ` : nothing}