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:
Ilya Kreymer
2021-04-25 16:45:40 -07:00
committed by GitHub
parent 36ae1aefda
commit 0ef8f955db
29 changed files with 832 additions and 663 deletions
+18 -16
View File
@@ -1,12 +1,12 @@
import { LitElement, html, css, unsafeCSS } from 'lit-element';
import { wrapCss } from './misc';
import { LitElement, html, css, unsafeCSS } from "lit-element";
import { wrapCss } from "./misc";
import { unsafeHTML } from 'lit-html/directives/unsafe-html';
import marked from 'marked';
import { unsafeHTML } from "lit-html/directives/unsafe-html";
import marked from "marked";
import { getTS, getReplayLink } from './pageutils';
import { getTS, getReplayLink } from "./pageutils";
import Split from 'split.js'
import Split from "split.js";
@@ -43,7 +43,7 @@ class Story extends LitElement
isSidebar: { type: Boolean },
splitDirection: { type: Boolean }
}
};
}
recalcSplitter(width) {
@@ -53,11 +53,11 @@ class Story extends LitElement
firstUpdated() {
this.recalcSplitter(document.documentElement.clientWidth);
this.obs = new ResizeObserver((entries, observer) => {
this.obs = new ResizeObserver((entries/*, observer*/) => {
this.recalcSplitter(entries[0].contentRect.width);
});
this.obs.observe(this)
this.obs.observe(this);
}
updated(changedProperties) {
@@ -87,7 +87,9 @@ class Story extends LitElement
if (this.splitter) {
try {
this.splitter.destroy();
} catch (e) {}
} catch (e) {
// ignore splitter destory err
}
this.splitter = null;
}
@@ -98,7 +100,7 @@ class Story extends LitElement
gutterSize: 4,
direction: this.splitDirection
}
};
this.splitter = Split([sidebar, content], opts);
}
@@ -160,7 +162,7 @@ class Story extends LitElement
width: 100% !important;
}
${Story.sidebarStyles(unsafeCSS(`:host(.sidebar)`))}
${Story.sidebarStyles(unsafeCSS(":host(.sidebar)"))}
.desc p {
margin-bottom: 1.0em;
@@ -257,13 +259,13 @@ class Story extends LitElement
<aside class="menu">
<ul class="menu-list">
<li>
<a href="#list-0" data-list="0" class="${currListNum === 0 ? 'is-active' : ''} menu-label is-size-4"
<a href="#list-0" data-list="0" class="${currListNum === 0 ? "is-active" : ""} menu-label is-size-4"
@click=${this.onClickScroll}>${this.collInfo.title}</a>
<ul class="menu-list">${this.collInfo.lists.map(list => html`
<li>
<a @click=${this.onClickScroll} href="#list-${list.id}"
data-list="${list.id}"
class="${currListNum === list.id ? 'is-active' : ''}">${list.title}</a>
class="${currListNum === list.id ? "is-active" : ""}">${list.title}</a>
</li>`)}
</ul>
</li>
@@ -273,7 +275,7 @@ class Story extends LitElement
<div @scroll=${this.onScroll} class="column main-content main-scroll">
<section id="list-0" class="desc">
<h2 class="has-text-centered title is-3">${this.collInfo.title}</h2>
${this.collInfo.desc ? unsafeHTML(marked(this.collInfo.desc)) : ''}
${this.collInfo.desc ? unsafeHTML(marked(this.collInfo.desc)) : ""}
</section>
${this.renderLists()}
</div>
@@ -283,7 +285,7 @@ class Story extends LitElement
renderLists() {
return html`
${this.collInfo.lists.map((list, i) => html`
${this.collInfo.lists.map((list) => html`
<article id="list-${list.id}">
<div class="content">
<hr/>