1.4.0 Release (#45)
* customizations for chooser, coll-index and appmain to support usage in archiveweb.page - chooser: support panel/message view - move apiPrefix to misc - make coll-index extensible, overridable styles, filtering * api changes: make configurable in coll-index, now using '/w/' instead of '/wabac/', '/c/' prefix for coll apis * lint pass! * bulma: update to 0.9.2, fix delete spinner with latest bulma * ui fixes: - show 'Loading Archives...' on initial load until first api response succeeds - fix typo in oncontrollerchange not actually resolving the promise! * embed sandbox: add other allow options, except top-nav - first api load: keep loading message until first successful api load - don't reset hash on purge to keep current page - sw config: fix typo with latest wabac.js - embed: add 'noSandbox' option to avoid adding sandbox to iframe, needed to show PDFs, add more allow rules (all except top-navigation) * ui improvements: - refresh: ensure location refresh from hitting enter in location bar always resets url - pageentry doubleclick: ensure double-clicking on page in sidebar always triggers reload, even if current page - pageentry typo fix: fix missing var causing selection error (fixes webrecorder/archivewebpage#25) - lint: don't include 'event' as global - use latest wabac.js 2.7.0-beta.1 * add CHANGES for 1.4.0, add 'noSandbox' to embedding options - electron app: fix path to 'w/' - bump electron to 11.4.3 * docs: autoload current version from package.json - chooser: support .json files for multiwacz (experimental) - update CHANGES.md - add missing .eslintrc.js file * bump version to 1.4.0
This commit is contained in:
+20
-11
@@ -1,5 +1,5 @@
|
||||
import { LitElement, html, css } from 'lit-element';
|
||||
import { wrapCss, rwpLogo } from './misc';
|
||||
import { LitElement, html, css } from "lit-element";
|
||||
import { wrapCss, rwpLogo } from "./misc";
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class Replay extends LitElement
|
||||
|
||||
showAuth: { type: Boolean },
|
||||
authFileHandle: { type: Object }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
firstUpdated() {
|
||||
@@ -57,7 +57,9 @@ class Replay extends LitElement
|
||||
this.refresh();
|
||||
return;
|
||||
}
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
console.warn(e);
|
||||
}
|
||||
} else {
|
||||
this.authFileHandle = null;
|
||||
}
|
||||
@@ -147,8 +149,8 @@ class Replay extends LitElement
|
||||
// google drive reauth
|
||||
const headers = event.detail.headers;
|
||||
|
||||
const resp = await fetch(`${this.collInfo.apiPrefix}/updateAuth`, {
|
||||
method: 'POST',
|
||||
await fetch(`${this.collInfo.apiPrefix}/updateAuth`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({headers})
|
||||
});
|
||||
} else {
|
||||
@@ -173,7 +175,7 @@ class Replay extends LitElement
|
||||
const iframe = this.renderRoot.querySelector("iframe");
|
||||
if (!iframe || !iframe.contentDocument || !iframe.contentWindow ||
|
||||
(iframe.contentDocument.readyState === "complete" && !iframe.contentWindow._WBWombat)) {
|
||||
this.clearLoading(iframe && iframe.contentWindow);
|
||||
this.clearLoading(iframe && iframe.contentWindow);
|
||||
}
|
||||
}, 5000);
|
||||
}
|
||||
@@ -200,9 +202,16 @@ class Replay extends LitElement
|
||||
refresh() {
|
||||
const iframe = this.renderRoot.querySelector("iframe");
|
||||
|
||||
if (iframe) {
|
||||
if (!iframe) {
|
||||
return;
|
||||
}
|
||||
|
||||
const oldIframeUrl = this.iframeUrl;
|
||||
// set iframe url to expected, refresh if same url
|
||||
this.doSetIframeUrl();
|
||||
if (oldIframeUrl === this.iframeUrl) {
|
||||
this.waitForLoad();
|
||||
iframe.contentWindow.location.reload();
|
||||
iframe.contentWindow.location.href = this.iframeUrl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,7 +271,7 @@ class Replay extends LitElement
|
||||
}
|
||||
|
||||
render() {
|
||||
const title = `Replay of ${this.title ? `${this.title}:` :``} ${this.url}`;
|
||||
const title = `Replay of ${this.title ? `${this.title}:` :""} ${this.url}`;
|
||||
|
||||
return html`
|
||||
|
||||
@@ -302,7 +311,7 @@ class Replay extends LitElement
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`: ``}
|
||||
`: ""}
|
||||
</div>
|
||||
`}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user