downloadUrl support for multiWACZ + latest wabac (#407)
main menu tweaks: - use downloadUrl for action menu download - don't show download menu if downloadUrl is null - don't show Archive Info if downloadUrl !== sourceUrl and in embed mode improved loading: update to wabac.js 2.21.3 bump to 2.3.3, update CHANGES for release
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
|
||||
## CHANGES
|
||||
|
||||
v2.3.3
|
||||
- UI: Support custom 'downloadUrl' when loading from Multi-WACZ JSON source - don't show download if unset
|
||||
- UI: Don't show 'Archive Info' menu option for Multi-WACZ JSON source in embed mode
|
||||
- UI: Use localized data format for current language settings
|
||||
- Loading: Use negative offset range requests (via wabac.js 2.21.3)
|
||||
|
||||
v2.3.2
|
||||
- Loading: fix dynamic page lookup for URLs with query strings (via wabac.js 2.21.2)
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "replaywebpage",
|
||||
"productName": "ReplayWeb.page",
|
||||
"version": "2.3.2",
|
||||
"version": "2.3.3",
|
||||
"description": "Serverless Web Archive Replay",
|
||||
"repository": "https://github.com/webrecorder/replayweb.page",
|
||||
"homepage": "https://replayweb.page/",
|
||||
@@ -18,7 +18,7 @@
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||
"@shoelace-style/shoelace": "~2.15.1",
|
||||
"@webrecorder/wabac": "^2.21.2",
|
||||
"@webrecorder/wabac": "^2.21.3",
|
||||
"bulma": "^0.9.3",
|
||||
"electron-log": "^4.4.1",
|
||||
"electron-updater": "^6.3.9",
|
||||
|
||||
+20
-8
@@ -115,6 +115,9 @@ class Item extends LitElement {
|
||||
@property({ type: String })
|
||||
sourceUrl: string | null = null;
|
||||
|
||||
@property({ type: String })
|
||||
downloadUrl: string | null = null;
|
||||
|
||||
@property({ type: Object, attribute: false })
|
||||
loadInfo: LoadInfo | null = null;
|
||||
|
||||
@@ -446,8 +449,16 @@ class Item extends LitElement {
|
||||
});
|
||||
}
|
||||
|
||||
if (!this.itemInfo!.title) {
|
||||
this.itemInfo!.title = this.itemInfo!.filename;
|
||||
const { title, name, filename, downloadUrl } = this.itemInfo!;
|
||||
|
||||
if (!title) {
|
||||
this.itemInfo!.title = name || filename;
|
||||
}
|
||||
|
||||
if (downloadUrl === null) {
|
||||
this.downloadUrl = null;
|
||||
} else {
|
||||
this.downloadUrl = downloadUrl || this.sourceUrl;
|
||||
}
|
||||
|
||||
if (this.embed === "replayonly" || this.embed === "replay-with-info") {
|
||||
@@ -1357,11 +1368,11 @@ class Item extends LitElement {
|
||||
<span>Purge Cache + Full Reload</span>
|
||||
</a>`
|
||||
: html``}
|
||||
${(!this.editable && this.sourceUrl?.startsWith("http://")) ||
|
||||
this.sourceUrl?.startsWith("https://")
|
||||
${(!this.editable && this.downloadUrl?.startsWith("http://")) ||
|
||||
this.downloadUrl?.startsWith("https://")
|
||||
? html` <hr class="dropdown-divider" />
|
||||
<a
|
||||
href="${this.sourceUrl}"
|
||||
href="${this.downloadUrl}"
|
||||
role="button"
|
||||
class="dropdown-item"
|
||||
@keyup="${clickOnSpacebarPress}"
|
||||
@@ -1383,7 +1394,8 @@ class Item extends LitElement {
|
||||
<span class="menu-head">Capture Date</span>${dateStr}
|
||||
</div>`
|
||||
: ""}
|
||||
${!this.editable
|
||||
${!this.editable &&
|
||||
(this.downloadUrl === this.sourceUrl || !this.embed)
|
||||
? html` <a
|
||||
href="#"
|
||||
role="button"
|
||||
@@ -1398,9 +1410,9 @@ class Item extends LitElement {
|
||||
></fa-icon>
|
||||
</span>
|
||||
<span>Archive Info</span>
|
||||
</a>
|
||||
<hr class="dropdown-divider" />`
|
||||
</a>`
|
||||
: ``}
|
||||
<hr class="dropdown-divider" />
|
||||
<a
|
||||
href="#"
|
||||
role="button"
|
||||
|
||||
@@ -33,6 +33,7 @@ export type ItemType = {
|
||||
name?: string;
|
||||
title?: string;
|
||||
loadUrl?: string;
|
||||
downloadUrl?: string | null;
|
||||
desc?: string;
|
||||
description?: string;
|
||||
resources?: { path: string; name: string }[];
|
||||
|
||||
@@ -1028,10 +1028,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e"
|
||||
integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==
|
||||
|
||||
"@webrecorder/wabac@^2.21.2":
|
||||
version "2.21.2"
|
||||
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.21.2.tgz#e19d9165e274a00be33d36b44bb0648a6264871d"
|
||||
integrity sha512-Jlr4yLzjR2GiEJ+YZfzSjkhqJsVWPHpgVLmqsDcqoKktap6xoteeasEcbi8vcL/yxtHCnVYzwnt6ZdGbTcu7kg==
|
||||
"@webrecorder/wabac@^2.21.3":
|
||||
version "2.21.3"
|
||||
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.21.3.tgz#2a376e848e1bf09dbe98e78a6c41034f8cef80d9"
|
||||
integrity sha512-RgWFCRj1VEa0o2i8HTIlr5ol3W1C0ySI3cdBb8Q1okSYKzG3Xaqlnui2iTpWiJNgvayKzZs1fTxcQuKz/vMYgQ==
|
||||
dependencies:
|
||||
"@peculiar/asn1-ecc" "^2.3.4"
|
||||
"@peculiar/asn1-schema" "^2.3.3"
|
||||
|
||||
Reference in New Issue
Block a user