wabac.js update

url search: fix loading of additional items for mime type search, sorter optionally pages results
bump to 1.1.2-beta.1
This commit is contained in:
Ilya Kreymer
2020-10-02 16:09:28 -07:00
parent b2fcc4ced1
commit 5d44a7f8d9
7 changed files with 41 additions and 38 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "replaywebpage",
"productName": "ReplayWeb.page",
"version": "1.1.2-beta.0",
"version": "1.1.2-beta.1",
"description": "Serverless Web Archive Replay",
"repository": "https://github.com/webrecorder/replayweb.page",
"homepage": "https://replayweb.page/",
+1
View File
@@ -600,6 +600,7 @@ class Pages extends LitElement
.sortDesc="${this.sortDesc}"
.sortKeys="${Pages.sortKeys}"
.data="${this.filteredPages}"
pageResults="100"
@sort-changed="${this.onSortChanged}"
class="${this.filteredPages.length ? '' : 'is-hidden'}">
</wr-sorter>
+6 -6
View File
@@ -4,7 +4,6 @@ import { wrapCss } from './misc';
import fasSortDown from '@fortawesome/fontawesome-free/svgs/solid/sort-down.svg';
import fasSortUp from '@fortawesome/fontawesome-free/svgs/solid/sort-up.svg';
const DEFAULT_RESULTS = 100;
// ===========================================================================
class Sorter extends LitElement
@@ -14,7 +13,8 @@ class Sorter extends LitElement
this.sortedData = [];
this.data = [];
this.numResults = DEFAULT_RESULTS;
this.pageResults = 0;
this.numResults = 0;
this.sortKey = null
this.sortDesc = null;
@@ -24,7 +24,7 @@ class Sorter extends LitElement
return {
id: { type: String },
numResults: {type: Number},
pageResults: {type: Number},
data: { type: Array },
sortedData: { type: Array },
@@ -67,7 +67,7 @@ class Sorter extends LitElement
sortData() {
this.sortedData = [...this.data];
this.numResults = DEFAULT_RESULTS;
this.numResults = this.pageResults;
if (this.sortKey === "") {
if (this.sortDesc) {
@@ -90,13 +90,13 @@ class Sorter extends LitElement
const detail = {
sortKey: this.sortKey,
sortDesc: this.sortDesc,
sortedData: this.sortedData.slice(0, this.numResults)
sortedData: this.numResults ? this.sortedData.slice(0, this.numResults) : this.sortedData
};
this.dispatchEvent(new CustomEvent("sort-changed", {detail}));
}
getMore(more = 100) {
if (this.numResults >= this.sortedData.length) {
if (this.pageResults && this.numResults >= this.sortedData.length) {
return;
}
+1
View File
@@ -166,6 +166,7 @@ class URLResources extends LitElement
const last = this.results[this.results.length - 1];
params.set("fromMime", last.mime);
params.set("fromUrl", last.url);
params.set("fromStatus", last.status);
params.set("fromTs", new Date(last.date).getTime());
}
+15 -15
View File
File diff suppressed because one or more lines are too long
+15 -14
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -292,8 +292,8 @@
"@xtuc/long" "4.2.2"
"@webrecorder/wabac@github:webrecorder/wabac.js":
version "2.0.8"
resolved "https://codeload.github.com/webrecorder/wabac.js/tar.gz/3e096d6154a6a27b799623ef00d8069e66a7c992"
version "2.0.9"
resolved "https://codeload.github.com/webrecorder/wabac.js/tar.gz/98f0852f3d45571ff9b7f2b35ed001a86644752a"
dependencies:
brotli "github:foliojs/brotli.js"
fast-xml-parser "^3.15.1"