Skip to content

fix: More accurate archived item details #2364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/features/archived-items/archived-item-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ export class ArchivedItemList extends TailwindElement {
{
cssCol: "1fr",
cell: html`<btrix-table-header-cell>
${msg("Pages Crawled")}
${msg("Pages")}
</btrix-table-header-cell>`,
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -853,43 +853,21 @@ export class ArchivedItemDetail extends BtrixElement {
</btrix-desc-list-item>
`,
)}

<btrix-desc-list-item label=${msg("Pages")}>
${this.item
? html`${this.localize.number(this.item.pageCount || 0)}
${pluralOf("pages", this.item.pageCount || 0)}`
: html`<sl-skeleton class="h-[16px] w-24"></sl-skeleton>`}
</btrix-desc-list-item>
<btrix-desc-list-item label=${msg("Size")}>
${this.item
? html`${this.item.fileSize
? html`${this.localize.bytes(this.item.fileSize || 0, {
unitDisplay: "narrow",
})}${this.item.stats?.done
? html`<span>,</span
><span
class="tracking-tighter${this.isActive
? " text-violet-600"
: ""} font-mono"
>
${this.localize.number(+this.item.stats.done)}
<span class="text-0-400">/</span>
${this.localize.number(+this.item.stats.found)}
</span>
<span
>${pluralOf("pages", +this.item.stats.found)}</span
>`
: html`<span>,</span
><span>
${this.localize.number(
this.item.pageCount ? +this.item.pageCount : 0,
)}
</span>
<span
>${pluralOf(
"pages",
this.item.pageCount ? +this.item.pageCount : 0,
)}</span
>`}`
? this.localize.bytes(this.item.fileSize || 0)
: html`<span class="text-0-400">${msg("Unknown")}</span>`}`
: html`<sl-skeleton class="h-[16px] w-24"></sl-skeleton>`}
</btrix-desc-list-item>
${this.renderCrawlChannelVersion()}
<btrix-desc-list-item label=${msg("Crawl ID")}>
<btrix-desc-list-item label=${msg("Archived Item ID")}>
${this.item
? html`<btrix-copy-field
value="${this.item.id}"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/org/archived-items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ export class CrawlsList extends BtrixElement {
@click=${() => ClipboardController.copyToClipboard(item.id)}
>
<sl-icon name="copy" slot="prefix"></sl-icon>
${msg("Copy Crawl ID")}
${msg("Copy Archived Item ID")}
</sl-menu-item>
`
: nothing}
Expand Down
Loading