update to latest wabac.js -- fix reading small wacz files
embed fixes: fix 'replayonly' mode to hide locationbar embed loading screen: simplify, don't show cancel button, filename bump to electron 10.0.0 bump to beta.1
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "replaywebpage",
|
"name": "replaywebpage",
|
||||||
"productName": "ReplayWeb.page",
|
"productName": "ReplayWeb.page",
|
||||||
"version": "1.1.0-beta.0",
|
"version": "1.1.0-beta.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/",
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"css-loader": "^3.5.3",
|
"css-loader": "^3.5.3",
|
||||||
"electron": "9.1.2",
|
"electron": "^10.0.0",
|
||||||
"electron-builder": "^22.7.0",
|
"electron-builder": "^22.7.0",
|
||||||
"electron-notarize": "^1.0.0",
|
"electron-notarize": "^1.0.0",
|
||||||
"http-server": "^0.12.3",
|
"http-server": "^0.12.3",
|
||||||
|
|||||||
@@ -408,6 +408,10 @@ class Coll extends LitElement
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderLocationBar() {
|
renderLocationBar() {
|
||||||
|
if (this.embed === "replayonly") {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
const dateStr = tsToDate(this.ts).toLocaleString();
|
const dateStr = tsToDate(this.ts).toLocaleString();
|
||||||
|
|
||||||
const isReplay = this.tabData.view === "replay";
|
const isReplay = this.tabData.view === "replay";
|
||||||
|
|||||||
+5
-5
@@ -13,7 +13,7 @@ class Embed extends LitElement
|
|||||||
{
|
{
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.replayBase = window.location.origin + "/replay/";
|
this.replaybase = window.location.origin + "/replay/";
|
||||||
this.swName = __SW_NAME__;
|
this.swName = __SW_NAME__;
|
||||||
this.view = "replay";
|
this.view = "replay";
|
||||||
this.ts = "";
|
this.ts = "";
|
||||||
@@ -37,7 +37,7 @@ class Embed extends LitElement
|
|||||||
view: { type: String },
|
view: { type: String },
|
||||||
embed: { type: String },
|
embed: { type: String },
|
||||||
|
|
||||||
replayBase: { type: String },
|
replaybase: { type: String },
|
||||||
swName: { type: String },
|
swName: { type: String },
|
||||||
|
|
||||||
title: { type: String },
|
title: { type: String },
|
||||||
@@ -57,7 +57,7 @@ class Embed extends LitElement
|
|||||||
|
|
||||||
async doRegister() {
|
async doRegister() {
|
||||||
try {
|
try {
|
||||||
await registerSW(this.swName, this.replayBase);
|
await registerSW(this.swName, this.replaybase);
|
||||||
console.log("done");
|
console.log("done");
|
||||||
this.swInited = true;
|
this.swInited = true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -119,7 +119,7 @@ class Embed extends LitElement
|
|||||||
changedProperties.has("source")) {
|
changedProperties.has("source")) {
|
||||||
|
|
||||||
if (this.embed === null) {
|
if (this.embed === null) {
|
||||||
this.embed = this.url ? "replay" : "full";
|
this.embed = "full";
|
||||||
}
|
}
|
||||||
|
|
||||||
this.paramString = new URLSearchParams({
|
this.paramString = new URLSearchParams({
|
||||||
@@ -169,7 +169,7 @@ class Embed extends LitElement
|
|||||||
render() {
|
render() {
|
||||||
return html`
|
return html`
|
||||||
${this.paramString && this.hashString && this.swInited ? html`
|
${this.paramString && this.hashString && this.swInited ? html`
|
||||||
<iframe @load="${this.onLoad}" src="${this.replayBase}?${this.paramString}#${this.hashString}" allow="autoplay *; fullscreen"></iframe>
|
<iframe sandbox="allow-downloads allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-scripts allow-same-origin" @load="${this.onLoad}" src="${this.replaybase}?${this.paramString}#${this.hashString}" allow="autoplay *; fullscreen"></iframe>
|
||||||
` : html``}
|
` : html``}
|
||||||
|
|
||||||
${this.noSW ? html`
|
${this.noSW ? html`
|
||||||
|
|||||||
+13
-2
@@ -160,6 +160,11 @@ You can select a file to upload from the main page by clicking the \'Choose File
|
|||||||
|
|
||||||
static get styles() {
|
static get styles() {
|
||||||
return wrapCss(css`
|
return wrapCss(css`
|
||||||
|
:host {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
@@ -189,6 +194,10 @@ You can select a file to upload from the main page by clicking the \'Choose File
|
|||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
section.container {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,9 +207,10 @@ You can select a file to upload from the main page by clicking the \'Choose File
|
|||||||
<div class="has-text-centered is-flex">
|
<div class="has-text-centered is-flex">
|
||||||
<wr-anim-logo class="logo" size="96px"/>
|
<wr-anim-logo class="logo" size="96px"/>
|
||||||
</div>
|
</div>
|
||||||
|
${!this.embed ? html`
|
||||||
<div class="level">
|
<div class="level">
|
||||||
<p class="level-item">Loading <b>${this.sourceUrl}</b>...</p>
|
<p class="level-item">Loading <b>${this.sourceUrl}</b>...</p>
|
||||||
</div>
|
</div>` : ``}
|
||||||
<div class="level">
|
<div class="level">
|
||||||
<div class="level-item has-text-centered">
|
<div class="level-item has-text-centered">
|
||||||
${this.renderContent()}
|
${this.renderContent()}
|
||||||
@@ -224,7 +234,8 @@ You can select a file to upload from the main page by clicking the \'Choose File
|
|||||||
${this.currentSize && this.totalSize ? html`
|
${this.currentSize && this.totalSize ? html`
|
||||||
<p class="loaded-prog">Loaded <b>${prettyBytes(this.currentSize)}</b> of <b>${prettyBytes(this.totalSize)}</b></p>` : html``}
|
<p class="loaded-prog">Loaded <b>${prettyBytes(this.currentSize)}</b> of <b>${prettyBytes(this.totalSize)}</b></p>` : html``}
|
||||||
|
|
||||||
<button @click="${this.onCancel}" class="button is-danger">Cancel</button>
|
${!this.embed ? html`
|
||||||
|
<button @click="${this.onCancel}" class="button is-danger">Cancel</button>` : ``}
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
case "errored":
|
case "errored":
|
||||||
|
|||||||
+1
-5
@@ -103,13 +103,9 @@ const browserConfig = (env, argv) => {
|
|||||||
test: /\.svg$/,
|
test: /\.svg$/,
|
||||||
loader: 'svg-inline-loader'
|
loader: 'svg-inline-loader'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
test: /base.scss$/,
|
|
||||||
loaders: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader']
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
test: /main.scss$/,
|
test: /main.scss$/,
|
||||||
loaders: ['to-string-loader', 'css-loader', 'sass-loader']
|
loaders: ['css-loader', 'sass-loader']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /wombat.js|wombatWorkers.js|index.html$/i,
|
test: /wombat.js|wombatWorkers.js|index.html$/i,
|
||||||
|
|||||||
@@ -293,7 +293,7 @@
|
|||||||
|
|
||||||
"@webrecorder/wabac@github:webrecorder/wabac.js":
|
"@webrecorder/wabac@github:webrecorder/wabac.js":
|
||||||
version "2.0.4"
|
version "2.0.4"
|
||||||
resolved "https://codeload.github.com/webrecorder/wabac.js/tar.gz/8d6c556d7993fed466f2914d407687cc55ba7e11"
|
resolved "https://codeload.github.com/webrecorder/wabac.js/tar.gz/cf6728726398ee0bb9c8eda481d50de1b07ae566"
|
||||||
dependencies:
|
dependencies:
|
||||||
brotli "github:foliojs/brotli.js"
|
brotli "github:foliojs/brotli.js"
|
||||||
fast-xml-parser "^3.15.1"
|
fast-xml-parser "^3.15.1"
|
||||||
@@ -1791,10 +1791,10 @@ electron-publish@22.7.0:
|
|||||||
lazy-val "^1.0.4"
|
lazy-val "^1.0.4"
|
||||||
mime "^2.4.5"
|
mime "^2.4.5"
|
||||||
|
|
||||||
electron@9.1.2:
|
electron@^10.0.0:
|
||||||
version "9.1.2"
|
version "10.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/electron/-/electron-9.1.2.tgz#bfa26d6b192ea13abb6f1461371fd731a8358988"
|
resolved "https://registry.yarnpkg.com/electron/-/electron-10.0.0.tgz#4e777612ead76b39bc7241c7749bf6b0ece47889"
|
||||||
integrity sha512-xEYadr3XqIqJ4ktBPo0lhzPdovv4jLCpiUUGc2M1frUhFhwqXokwhPaTUcE+zfu5+uf/ONDnQApwjzznBsRrgQ==
|
integrity sha512-0XX/LqYAHHCSbfLjUk9VRDPOeYjDPEzA9i7F50AqpEpFIWR2bp++0S0beRANUpPdkvtBDp+0R6vHV3iXPvuKyA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@electron/get" "^1.0.1"
|
"@electron/get" "^1.0.1"
|
||||||
"@types/node" "^12.0.12"
|
"@types/node" "^12.0.12"
|
||||||
|
|||||||
Reference in New Issue
Block a user