wacz loading: support wacz 1.0.0! -- update to wabac.js 2.3.0
local file loading: support purge cache + reload for local files when filehandles are used (chrome) update CHANGES.md bump to 1.3.1
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
## CHANGES
|
## CHANGES
|
||||||
|
|
||||||
|
v1.3.1
|
||||||
|
- Loading: Support updated WACZ Format (1.0.0) with latest wabac.js update
|
||||||
|
- Loading: Archives loaded with via native file system can be reloaded after purge cache (chrome only)
|
||||||
|
|
||||||
v1.3.0
|
v1.3.0
|
||||||
- UI: Condense navbar and location bar: add logo to location bar, condense button spacing, add about link to context menu
|
- UI: Condense navbar and location bar: add logo to location bar, condense button spacing, add about link to context menu
|
||||||
- UI: Add collection info dropdown to be a separate tab instead
|
- UI: Add collection info dropdown to be a separate tab instead
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "replaywebpage",
|
"name": "replaywebpage",
|
||||||
"productName": "ReplayWeb.page",
|
"productName": "ReplayWeb.page",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"description": "Serverless Web Archive Replay",
|
"description": "Serverless Web Archive Replay",
|
||||||
"repository": "https://github.com/webrecorder/replayweb.page",
|
"repository": "https://github.com/webrecorder/replayweb.page",
|
||||||
"homepage": "https://replayweb.page/",
|
"homepage": "https://replayweb.page/",
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^5.13.0",
|
"@fortawesome/fontawesome-free": "^5.13.0",
|
||||||
"@webrecorder/wabac": "^2.2.2",
|
"@webrecorder/wabac": "^2.3.0",
|
||||||
"bulma": "^0.9.0",
|
"bulma": "^0.9.0",
|
||||||
"fetch-ndjson": "^1.1.0",
|
"fetch-ndjson": "^1.1.0",
|
||||||
"flexsearch": "^0.6.32",
|
"flexsearch": "^0.6.32",
|
||||||
|
|||||||
+7
-3
@@ -73,6 +73,7 @@ class Coll extends LitElement
|
|||||||
|
|
||||||
this.appName = "ReplayWeb.page";
|
this.appName = "ReplayWeb.page";
|
||||||
this.appLogo = rwpLogo;
|
this.appLogo = rwpLogo;
|
||||||
|
this.appHomeUrl = "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@@ -107,6 +108,7 @@ class Coll extends LitElement
|
|||||||
|
|
||||||
appName: { type: String },
|
appName: { type: String },
|
||||||
appLogo: { type: String },
|
appLogo: { type: String },
|
||||||
|
appHomeUrl: { type: String }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -703,7 +705,7 @@ class Coll extends LitElement
|
|||||||
<div class="field has-addons">
|
<div class="field has-addons">
|
||||||
|
|
||||||
${!this.embed ? html`
|
${!this.embed ? html`
|
||||||
<a href="/" role="button" class="button is-borderless is-hidden-touch" aria-labelledby="home" @keyup="${clickOnSpacebarPress}">
|
<a href="${this.appHomeUrl}" role="button" class="button is-borderless is-hidden-touch" aria-labelledby="home" @keyup="${clickOnSpacebarPress}">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<fa-icon size="1.0em" .svg="${fasHome}" aria-hidden="true"></fa-icon>
|
<fa-icon size="1.0em" .svg="${fasHome}" aria-hidden="true"></fa-icon>
|
||||||
<span class="is-sr-only">Home</span>
|
<span class="is-sr-only">Home</span>
|
||||||
@@ -765,7 +767,7 @@ class Coll extends LitElement
|
|||||||
<div class="dropdown-menu" id="menu-dropdown">
|
<div class="dropdown-menu" id="menu-dropdown">
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
${!this.embed ? html`
|
${!this.embed ? html`
|
||||||
<a href="/" role="button" class="dropdown-item is-hidden-desktop" @keyup="${clickOnSpacebarPress}">
|
<a href="${this.appHomeUrl}" role="button" class="dropdown-item is-hidden-desktop" @keyup="${clickOnSpacebarPress}">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<fa-icon size="1.0em" class="has-text-grey" aria-hidden="true" .svg="${fasHome}"></fa-icon>
|
<fa-icon size="1.0em" class="has-text-grey" aria-hidden="true" .svg="${fasHome}"></fa-icon>
|
||||||
</span>
|
</span>
|
||||||
@@ -999,7 +1001,9 @@ class Coll extends LitElement
|
|||||||
}
|
}
|
||||||
|
|
||||||
async deleteFully(reload = false) {
|
async deleteFully(reload = false) {
|
||||||
const resp = await fetch(`${this.collInfo.apiPrefix}`, {
|
const deleteURL = this.collInfo.apiPrefix + (reload ? "?reload=1" : "");
|
||||||
|
|
||||||
|
const resp = await fetch(deleteURL, {
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+9
-3
@@ -20,6 +20,8 @@ class Loader extends LitElement
|
|||||||
|
|
||||||
this.currentSize = 0;
|
this.currentSize = 0;
|
||||||
this.totalSize = 0;
|
this.totalSize = 0;
|
||||||
|
|
||||||
|
this.tryFileHandle = !!window.showOpenFilePicker;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@@ -35,7 +37,8 @@ class Loader extends LitElement
|
|||||||
total: { type: Number },
|
total: { type: Number },
|
||||||
status: { type: String },
|
status: { type: String },
|
||||||
coll: { type: String },
|
coll: { type: String },
|
||||||
embed: { type: String }
|
embed: { type: String },
|
||||||
|
tryFileHandle: { type: Boolean }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,6 +60,9 @@ class Loader extends LitElement
|
|||||||
if (event.data.error) {
|
if (event.data.error) {
|
||||||
this.error = event.data.error;
|
this.error = event.data.error;
|
||||||
this.state = "errored";
|
this.state = "errored";
|
||||||
|
if (this.error === "missing_local_file") {
|
||||||
|
this.tryFileHandle = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (event.data.currentSize && event.data.totalSize) {
|
if (event.data.currentSize && event.data.totalSize) {
|
||||||
this.currentSize = event.data.currentSize;
|
this.currentSize = event.data.currentSize;
|
||||||
@@ -114,7 +120,7 @@ Please try loading this page from an HTTPS URL`;
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "file":
|
case "file":
|
||||||
if (!this.loadInfo) {
|
if (!this.loadInfo && !this.tryFileHandle) {
|
||||||
this.state = "errored";
|
this.state = "errored";
|
||||||
this.error = `\
|
this.error = `\
|
||||||
File URLs can not be entered directly or shared.
|
File URLs can not be entered directly or shared.
|
||||||
@@ -179,7 +185,7 @@ You can select a file to upload from the main page by clicking the \'Choose File
|
|||||||
}
|
}
|
||||||
|
|
||||||
updated(changedProperties) {
|
updated(changedProperties) {
|
||||||
if (this.sourceUrl && changedProperties.has("sourceUrl")) {
|
if (this.sourceUrl && changedProperties.has("sourceUrl") || changedProperties.has("tryFileHandle")) {
|
||||||
this.doLoad();
|
this.doLoad();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-13
@@ -191,19 +191,7 @@ class Pages extends LitElement
|
|||||||
const resp = await fetch(`${this.collInfo.apiPrefix}/curated/${this.currList}`);
|
const resp = await fetch(`${this.collInfo.apiPrefix}/curated/${this.currList}`);
|
||||||
const json = await resp.json();
|
const json = await resp.json();
|
||||||
|
|
||||||
const curated = [];
|
const curated = json.curated;
|
||||||
|
|
||||||
for (const c of json.curated) {
|
|
||||||
for (const p of this.filteredPages) {
|
|
||||||
if (p.id === c.page) {
|
|
||||||
if (p.ts) {
|
|
||||||
p.date = new Date(p.ts).toISOString();
|
|
||||||
}
|
|
||||||
curated.push(p);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.filteredPages = curated;
|
this.filteredPages = curated;
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-5
@@ -117,11 +117,15 @@ class Story extends LitElement
|
|||||||
if (!this.curatedPageMap[curated.list]) {
|
if (!this.curatedPageMap[curated.list]) {
|
||||||
this.curatedPageMap[curated.list] = [];
|
this.curatedPageMap[curated.list] = [];
|
||||||
}
|
}
|
||||||
const page = pageMap[curated.page];
|
const page = curated;
|
||||||
if (!page) {
|
|
||||||
console.log("No Page with id: " + page);
|
// if (curated.page) {
|
||||||
continue;
|
// page = pageMap[curated.page];
|
||||||
}
|
// if (!page) {
|
||||||
|
// console.log("No Page with id: " + page);
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
const url = page.url;
|
const url = page.url;
|
||||||
const ts = page.ts;
|
const ts = page.ts;
|
||||||
|
|||||||
@@ -709,10 +709,10 @@
|
|||||||
"@webassemblyjs/wast-parser" "1.9.0"
|
"@webassemblyjs/wast-parser" "1.9.0"
|
||||||
"@xtuc/long" "4.2.2"
|
"@xtuc/long" "4.2.2"
|
||||||
|
|
||||||
"@webrecorder/wabac@^2.2.2":
|
"@webrecorder/wabac@^2.3.0":
|
||||||
version "2.2.2"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.2.2.tgz#9c2335b4656cb3deea2f6c94e2218553fa8d8262"
|
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.3.0.tgz#e57e46acd7c58afe3bfb42ce54e2cb3bdd1fcd81"
|
||||||
integrity sha512-IFUHYdZ9syoAoItjqa0dI3Vz8IsNU4NdA0VNmq3WF6GxuZzru1HQLUQ/0CXWrub4kFu1xUFPVS16u1asKjuRoQ==
|
integrity sha512-8FefSdft62fgafgXMGRTvhXzcjTCHFMO0+6lcUGPoE28WhYCLgxWA250xxhQlPjoov+YjxffnQGYD+DJmTqWqQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@webrecorder/wombat" "^3.0.1"
|
"@webrecorder/wombat" "^3.0.1"
|
||||||
brotli "github:foliojs/brotli.js"
|
brotli "github:foliojs/brotli.js"
|
||||||
@@ -722,7 +722,7 @@
|
|||||||
js-levenshtein "^1.1.6"
|
js-levenshtein "^1.1.6"
|
||||||
js-yaml "^3.13.1"
|
js-yaml "^3.13.1"
|
||||||
json-2-csv "^3.7.1"
|
json-2-csv "^3.7.1"
|
||||||
jszip "^3.4.0"
|
jszip "^3.5.0"
|
||||||
pako "^1.0.10"
|
pako "^1.0.10"
|
||||||
parse5-html-rewriting-stream "^6.0.0"
|
parse5-html-rewriting-stream "^6.0.0"
|
||||||
parse5-sax-parser "^6.0.0"
|
parse5-sax-parser "^6.0.0"
|
||||||
@@ -5233,10 +5233,10 @@ jsprim@^1.2.2:
|
|||||||
json-schema "0.2.3"
|
json-schema "0.2.3"
|
||||||
verror "1.10.0"
|
verror "1.10.0"
|
||||||
|
|
||||||
jszip@^3.4.0:
|
jszip@^3.5.0:
|
||||||
version "3.4.0"
|
version "3.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.4.0.tgz#1a69421fa5f0bb9bc222a46bca88182fba075350"
|
resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.5.0.tgz#b4fd1f368245346658e781fec9675802489e15f6"
|
||||||
integrity sha512-gZAOYuPl4EhPTXT0GjhI3o+ZAz3su6EhLrKUoAivcKqyqC7laS5JEv4XWZND9BgcDcF83vI85yGbDmDR6UhrIg==
|
integrity sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==
|
||||||
dependencies:
|
dependencies:
|
||||||
lie "~3.3.0"
|
lie "~3.3.0"
|
||||||
pako "~1.0.2"
|
pako "~1.0.2"
|
||||||
|
|||||||
Reference in New Issue
Block a user