misc fixes:
- fix file download in chrome - fix full-text index loading in older wacz files dependencies: updaate to wabac 2.7.1 bump to 1.4.1
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
## CHANGES
|
||||
|
||||
v1.4.1
|
||||
- Replay: Remove 'download' attribute from anchor tags, which doesn't work in Chrome
|
||||
- Loading: Fix loading of full-text search index from older wacz
|
||||
|
||||
v1.4.0
|
||||
- Embed: add 'noSandbox' option to not add sandbox to embed iframe
|
||||
- UI: Double-clicking on page entry causes reload.
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "replaywebpage",
|
||||
"productName": "ReplayWeb.page",
|
||||
"version": "1.4.0",
|
||||
"version": "1.4.1",
|
||||
"description": "Serverless Web Archive Replay",
|
||||
"repository": "https://github.com/webrecorder/replayweb.page",
|
||||
"homepage": "https://replayweb.page/",
|
||||
@@ -9,7 +9,7 @@
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.13.0",
|
||||
"@webrecorder/wabac": "^2.7.0",
|
||||
"@webrecorder/wabac": "^2.7.1",
|
||||
"bulma": "^0.9.2",
|
||||
"electron-log": "^4.3.0",
|
||||
"electron-updater": "^4.3.5",
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "replaywebpage",
|
||||
"productName": "ReplayWeb.page",
|
||||
"version": "1.4.0",
|
||||
"version": "1.4.1",
|
||||
"description": "Serverless Web Archive Replay",
|
||||
"repository": "https://github.com/webrecorder/replayweb.page",
|
||||
"homepage": "https://replayweb.page/",
|
||||
@@ -9,7 +9,7 @@
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.13.0",
|
||||
"@webrecorder/wabac": "^2.7.0",
|
||||
"@webrecorder/wabac": "^2.7.1",
|
||||
"bulma": "^0.9.2",
|
||||
"electron-log": "^4.3.0",
|
||||
"electron-updater": "^4.3.5",
|
||||
|
||||
+2
-2
@@ -245,8 +245,8 @@ class Pages extends LitElement
|
||||
let curr = lines;
|
||||
lines = [];
|
||||
await flex.add(curr);
|
||||
console.log("added " + count + " " + curr.length);
|
||||
console.log(flex.info());
|
||||
//console.log("added " + count + " " + curr.length);
|
||||
//console.log(flex.info());
|
||||
};
|
||||
|
||||
for await (const line of ndjson(resp.body.getReader())) {
|
||||
|
||||
@@ -387,7 +387,7 @@ const oe=new WeakMap,ne=v(e=>t=>{if(!(t instanceof D))throw new Error("unsafeSVG
|
||||
<div style="display: flex">
|
||||
<div class="has-text-centered" style="width: 220px">
|
||||
<wr-anim-logo class="logo" size="48px"></wr-anim-logo>
|
||||
<div style="font-size: smaller; margin-bottom: 1em">${pe?"App":""} v${"1.4.0"}</div>
|
||||
<div style="font-size: smaller; margin-bottom: 1em">${pe?"App":""} v${"1.4.1"}</div>
|
||||
</div>
|
||||
|
||||
${pe?q`
|
||||
@@ -1178,7 +1178,7 @@ const oe=new WeakMap,ne=v(e=>t=>{if(!(t instanceof D))throw new Error("unsafeSVG
|
||||
<a href="#" role="button" class="dropdown-item" @click="${this.onAbout}">
|
||||
<fa-icon class="menu-logo" size="1.0rem" aria-hidden="true" .svg=${this.appLogo}></fa-icon>
|
||||
<span> About ${this.appName}</span>
|
||||
<span class="menu-version">(${"1.4.0"})</span>
|
||||
<span class="menu-version">(${"1.4.1"})</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1497,7 +1497,7 @@ const Et=new WeakMap,Rt=v(e=>t=>{if(!(t instanceof D))throw new Error("unsafeHTM
|
||||
<div class="">Permission is needed to reload the archive file. (Click <i>Cancel</i> to cancel loading this archive.)</div>
|
||||
<button @click="${this.onAskPermission}" class="button is-primary">Show Permission</button>
|
||||
<a href="/" class="button is-danger">Cancel</a>
|
||||
</div>`;case"waiting":default:return q`<progress class="progress is-primary is-large" style="max-width: 400px"/>`}}async onAskPermission(){"granted"===await this.fileHandle.requestPermission({mode:"read"})&&this.doLoad()}}customElements.define("wr-loader",Ht);var Bt=i(98),Ft=i.n(Bt),Gt=i(99),Wt=i.n(Gt),Vt=i(100),Kt=i.n(Vt),Zt=i(101),Jt=i.n(Zt);class Yt extends re{constructor(){super(),this.filteredPages=[],this.sortedPages=[],this.query="",this.flex=null,this.newQuery=null,this.loading=!1,this.updatingSearch=!1,this.currList=0,this.active=!1,this.editable=!1,this.changeNeeded=!1,this.selectedPages=new Set,this.menuActive=!1,this.sortKey="date",this.sortDesc=!0,this.isSidebar=!1,this.url="",this.ts="",this.editing=!1,this.toDeletePages=null,this.toDeletePage=null}static get sortKeys(){return[{key:"",name:"Best Match"},{key:"title",name:"Title"},{key:"date",name:"Date"}]}static get properties(){return{active:{type:Boolean},collInfo:{type:Object},currList:{type:Number},filteredPages:{type:Array},sortedPages:{type:Array},query:{type:String},defaultKey:{type:String},loading:{type:Boolean},updatingSearch:{type:Boolean},editable:{type:Boolean},selectedPages:{type:Set},allSelected:{type:Boolean},menuActive:{type:Boolean},sortKey:{type:String},sortDesc:{type:Boolean},isSidebar:{type:Boolean},url:{type:String},ts:{type:String},editing:{type:Boolean},toDeletePages:{type:Object},toDeletePage:{type:Object}}}_timedUpdate(){null!==this.newQuery&&(this.query=this.newQuery,this.newQuery=null,this.filter())}async updated(e){if(e.has("collInfo")?this.updateTextSearch():(e.has("query")||e.has("currList"))&&this.filter(),e.has("active")&&this.active&&this.changeNeeded&&this.filter(),e.has("query")){this.query?(this.sortKey="",this.sortDesc=!1):(this.sortKey="date",this.sortDesc=!0);const e=this.renderRoot.querySelector("wr-sorter");e&&(e.sortKey=this.sortKey,e.sortDesc=this.sortDesc)}if(e.has("sortedPages")&&this.isSidebar){const e=this.renderRoot.querySelector(".current");if(e){const t={behavior:"smooth",block:"nearest",inline:"nearest"};setTimeout(()=>e.scrollIntoView(t),100)}}}onChangeQuery(e){this.newQuery=e.currentTarget.value,this._ival&&window.clearTimeout(this._ival),this._ival=window.setTimeout(()=>this._timedUpdate(),250)}async filter(){if(this.loading)return;if(this.active||(this.changeNeeded=!0),this.loading=!0,this.flex&&this.query){const e=await this.flex.search(this.query,{limit:25});this.filteredPages=e}else this.filteredPages=[...this.collInfo.pages];0!==this.currList&&await this.filterCurated();for(const e of this.filteredPages){const{timestamp:t,date:i}=ze(e);e.timestamp=t,e.date=i}this.loading=!1,this.changeNeeded=!1;const e={query:this.query,currList:this.currList};this.sendChangeEvent(e)}async filterCurated(){const e=await fetch(`${this.collInfo.apiPrefix}/curated/${this.currList}`),t=(await e.json()).curated;this.filteredPages=t}sendChangeEvent(e){this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:{data:e}}))}async updateTextSearch(){if(this.updatingSearch)return;this.updatingSearch=!0;let e=0;try{const t=new Wt.a({doc:{id:"id",field:["url","title","text"]},async:!0});this.flex=t;const i=await caches.open("cache:"+this.collInfo.coll),a=this.collInfo.apiPrefix+"/textIndex";let r=await i.match(a);r&&Number(r.headers.get("Content-Length"))||(r=await fetch(this.collInfo.apiPrefix+"/textIndex"),200===r.status&&Number(r.headers.get("Content-Length"))&&i.put(a,r.clone()));let o=[];const n=async()=>{let i=o;o=[],await t.add(i),console.log("added "+e+" "+i.length),console.log(t.info())};for await(const t of Ft()(r.body.getReader()))t.text&&(t.id=++e,o.push(t),e%100==0&&await n());await n()}finally{0===e&&this.flex.add(this.collInfo.pages),this.updatingSearch=!1}await this.filter()}static get styles(){return be(ie`
|
||||
</div>`;case"waiting":default:return q`<progress class="progress is-primary is-large" style="max-width: 400px"/>`}}async onAskPermission(){"granted"===await this.fileHandle.requestPermission({mode:"read"})&&this.doLoad()}}customElements.define("wr-loader",Ht);var Bt=i(98),Ft=i.n(Bt),Gt=i(99),Wt=i.n(Gt),Vt=i(100),Kt=i.n(Vt),Zt=i(101),Jt=i.n(Zt);class Yt extends re{constructor(){super(),this.filteredPages=[],this.sortedPages=[],this.query="",this.flex=null,this.newQuery=null,this.loading=!1,this.updatingSearch=!1,this.currList=0,this.active=!1,this.editable=!1,this.changeNeeded=!1,this.selectedPages=new Set,this.menuActive=!1,this.sortKey="date",this.sortDesc=!0,this.isSidebar=!1,this.url="",this.ts="",this.editing=!1,this.toDeletePages=null,this.toDeletePage=null}static get sortKeys(){return[{key:"",name:"Best Match"},{key:"title",name:"Title"},{key:"date",name:"Date"}]}static get properties(){return{active:{type:Boolean},collInfo:{type:Object},currList:{type:Number},filteredPages:{type:Array},sortedPages:{type:Array},query:{type:String},defaultKey:{type:String},loading:{type:Boolean},updatingSearch:{type:Boolean},editable:{type:Boolean},selectedPages:{type:Set},allSelected:{type:Boolean},menuActive:{type:Boolean},sortKey:{type:String},sortDesc:{type:Boolean},isSidebar:{type:Boolean},url:{type:String},ts:{type:String},editing:{type:Boolean},toDeletePages:{type:Object},toDeletePage:{type:Object}}}_timedUpdate(){null!==this.newQuery&&(this.query=this.newQuery,this.newQuery=null,this.filter())}async updated(e){if(e.has("collInfo")?this.updateTextSearch():(e.has("query")||e.has("currList"))&&this.filter(),e.has("active")&&this.active&&this.changeNeeded&&this.filter(),e.has("query")){this.query?(this.sortKey="",this.sortDesc=!1):(this.sortKey="date",this.sortDesc=!0);const e=this.renderRoot.querySelector("wr-sorter");e&&(e.sortKey=this.sortKey,e.sortDesc=this.sortDesc)}if(e.has("sortedPages")&&this.isSidebar){const e=this.renderRoot.querySelector(".current");if(e){const t={behavior:"smooth",block:"nearest",inline:"nearest"};setTimeout(()=>e.scrollIntoView(t),100)}}}onChangeQuery(e){this.newQuery=e.currentTarget.value,this._ival&&window.clearTimeout(this._ival),this._ival=window.setTimeout(()=>this._timedUpdate(),250)}async filter(){if(this.loading)return;if(this.active||(this.changeNeeded=!0),this.loading=!0,this.flex&&this.query){const e=await this.flex.search(this.query,{limit:25});this.filteredPages=e}else this.filteredPages=[...this.collInfo.pages];0!==this.currList&&await this.filterCurated();for(const e of this.filteredPages){const{timestamp:t,date:i}=ze(e);e.timestamp=t,e.date=i}this.loading=!1,this.changeNeeded=!1;const e={query:this.query,currList:this.currList};this.sendChangeEvent(e)}async filterCurated(){const e=await fetch(`${this.collInfo.apiPrefix}/curated/${this.currList}`),t=(await e.json()).curated;this.filteredPages=t}sendChangeEvent(e){this.dispatchEvent(new CustomEvent("coll-tab-nav",{detail:{data:e}}))}async updateTextSearch(){if(this.updatingSearch)return;this.updatingSearch=!0;let e=0;try{const t=new Wt.a({doc:{id:"id",field:["url","title","text"]},async:!0});this.flex=t;const i=await caches.open("cache:"+this.collInfo.coll),a=this.collInfo.apiPrefix+"/textIndex";let r=await i.match(a);r&&Number(r.headers.get("Content-Length"))||(r=await fetch(this.collInfo.apiPrefix+"/textIndex"),200===r.status&&Number(r.headers.get("Content-Length"))&&i.put(a,r.clone()));let o=[];const n=async()=>{let e=o;o=[],await t.add(e)};for await(const t of Ft()(r.body.getReader()))t.text&&(t.id=++e,o.push(t),e%100==0&&await n());await n()}finally{0===e&&this.flex.add(this.collInfo.pages),this.updatingSearch=!1}await this.filter()}static get styles(){return be(ie`
|
||||
:host {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -760,10 +760,10 @@
|
||||
"@webassemblyjs/wast-parser" "1.9.0"
|
||||
"@xtuc/long" "4.2.2"
|
||||
|
||||
"@webrecorder/wabac@^2.7.0":
|
||||
version "2.7.0"
|
||||
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.7.0.tgz#d1f54d7faf99aa0333c2ad805b72602dc2b95df1"
|
||||
integrity sha512-AShk6WfVS3ZYvGfT1ernMAH2uHOemUs62NsiA/oVb6OGwUW0BCVCKkzomyQOLaYxcTqza5nWs73Z+8yVimYq6A==
|
||||
"@webrecorder/wabac@^2.7.1":
|
||||
version "2.7.1"
|
||||
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.7.1.tgz#129b57f7560647c7f1376ac1ff3435ed4b926d86"
|
||||
integrity sha512-2uv5s4nimdwlUxGVj/4Fh7Hq9Tsg4txX6H/BG0+4OVMIK6dXA6/Fq9qr+kIV9rbequ4CGvfuAczn8x9WetZM6A==
|
||||
dependencies:
|
||||
"@webrecorder/wombat" "^3.1.4"
|
||||
brotli "github:foliojs/brotli.js"
|
||||
|
||||
Reference in New Issue
Block a user