diff --git a/frontend/src/pages/archive/crawl-templates-list.ts b/frontend/src/pages/archive/crawl-templates-list.ts index 62d8e1c4..d3510d7f 100644 --- a/frontend/src/pages/archive/crawl-templates-list.ts +++ b/frontend/src/pages/archive/crawl-templates-list.ts @@ -109,7 +109,9 @@ export class CrawlTemplatesList extends LiteElement { render() { return html` -
${this.renderControls()}
+
+ ${this.renderControls()} +
${this.crawlTemplates ? this.crawlTemplates.length @@ -177,108 +179,105 @@ export class CrawlTemplatesList extends LiteElement { - ${this.crawlTemplates && this.crawlTemplates.length - ? html`
-
- - - -
-
- ${this.userId - ? html`` - : ""} - -
- ${msg("Sort By")} -
- { - const [field, direction] = e.detail.item.value.split("_"); - this.orderBy = { - field: field, - direction: direction, - }; - }} - > - ${(sortableFieldLabels as any)[this.orderBy.field] || - sortableFieldLabels[ - `${this.orderBy.field}_${this.orderBy.direction}` - ]} +
+ + + +
+
+ ${this.userId + ? html`
-
` - : ""} + + (this.filterByCurrentUser = ( + e.target as SlCheckbox + ).checked)} + ?checked=${this.filterByCurrentUser} + > + ` + : ""} + +
+ ${msg("Sort By")} +
+ { + const [field, direction] = e.detail.item.value.split("_"); + this.orderBy = { + field: field, + direction: direction, + }; + }} + > + ${(sortableFieldLabels as any)[this.orderBy.field] || + sortableFieldLabels[ + `${this.orderBy.field}_${this.orderBy.direction}` + ]} + + ${Object.entries(sortableFieldLabels).map( + ([value, label]) => html` + ${label} + ` + )} + + + { + this.orderBy = { + ...this.orderBy, + direction: this.orderBy.direction === "asc" ? "desc" : "asc", + }; + }} + > +
+ `; } diff --git a/frontend/src/pages/archive/crawls-list.ts b/frontend/src/pages/archive/crawls-list.ts index 81d09349..f454b0ec 100644 --- a/frontend/src/pages/archive/crawls-list.ts +++ b/frontend/src/pages/archive/crawls-list.ts @@ -142,7 +142,9 @@ export class CrawlsList extends LiteElement { return html`
-
${this.renderControls()}
+
+ ${this.renderControls()} +
${this.crawls.length ? this.renderCrawlList()