Skip to content

Commit 0e04fd9

Browse files
SuaYooShrinks99
andauthored
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 <[email protected]>
1 parent f8a4425 commit 0e04fd9

File tree

3 files changed

+10
-32
lines changed

3 files changed

+10
-32
lines changed

frontend/src/features/archived-items/archived-item-list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ export class ArchivedItemList extends TailwindElement {
415415
{
416416
cssCol: "1fr",
417417
cell: html`<btrix-table-header-cell>
418-
${msg("Pages Crawled")}
418+
${msg("Pages")}
419419
</btrix-table-header-cell>`,
420420
},
421421
{

frontend/src/pages/org/archived-item-detail/archived-item-detail.ts

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -853,43 +853,21 @@ export class ArchivedItemDetail extends BtrixElement {
853853
</btrix-desc-list-item>
854854
`,
855855
)}
856-
856+
<btrix-desc-list-item label=${msg("Pages")}>
857+
${this.item
858+
? html`${this.localize.number(this.item.pageCount || 0)}
859+
${pluralOf("pages", this.item.pageCount || 0)}`
860+
: html`<sl-skeleton class="h-[16px] w-24"></sl-skeleton>`}
861+
</btrix-desc-list-item>
857862
<btrix-desc-list-item label=${msg("Size")}>
858863
${this.item
859864
? html`${this.item.fileSize
860-
? html`${this.localize.bytes(this.item.fileSize || 0, {
861-
unitDisplay: "narrow",
862-
})}${this.item.stats?.done
863-
? html`<span>,</span
864-
><span
865-
class="tracking-tighter${this.isActive
866-
? " text-violet-600"
867-
: ""} font-mono"
868-
>
869-
${this.localize.number(+this.item.stats.done)}
870-
<span class="text-0-400">/</span>
871-
${this.localize.number(+this.item.stats.found)}
872-
</span>
873-
<span
874-
>${pluralOf("pages", +this.item.stats.found)}</span
875-
>`
876-
: html`<span>,</span
877-
><span>
878-
${this.localize.number(
879-
this.item.pageCount ? +this.item.pageCount : 0,
880-
)}
881-
</span>
882-
<span
883-
>${pluralOf(
884-
"pages",
885-
this.item.pageCount ? +this.item.pageCount : 0,
886-
)}</span
887-
>`}`
865+
? this.localize.bytes(this.item.fileSize || 0)
888866
: html`<span class="text-0-400">${msg("Unknown")}</span>`}`
889867
: html`<sl-skeleton class="h-[16px] w-24"></sl-skeleton>`}
890868
</btrix-desc-list-item>
891869
${this.renderCrawlChannelVersion()}
892-
<btrix-desc-list-item label=${msg("Crawl ID")}>
870+
<btrix-desc-list-item label=${msg("Archived Item ID")}>
893871
${this.item
894872
? html`<btrix-copy-field
895873
value="${this.item.id}"

frontend/src/pages/org/archived-items.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ export class CrawlsList extends BtrixElement {
619619
@click=${() => ClipboardController.copyToClipboard(item.id)}
620620
>
621621
<sl-icon name="copy" slot="prefix"></sl-icon>
622-
${msg("Copy Crawl ID")}
622+
${msg("Copy Archived Item ID")}
623623
</sl-menu-item>
624624
`
625625
: nothing}

0 commit comments

Comments
 (0)