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:
@@ -408,6 +408,10 @@ class Coll extends LitElement
|
||||
}
|
||||
|
||||
renderLocationBar() {
|
||||
if (this.embed === "replayonly") {
|
||||
return "";
|
||||
}
|
||||
|
||||
const dateStr = tsToDate(this.ts).toLocaleString();
|
||||
|
||||
const isReplay = this.tabData.view === "replay";
|
||||
|
||||
+5
-5
@@ -13,7 +13,7 @@ class Embed extends LitElement
|
||||
{
|
||||
constructor() {
|
||||
super();
|
||||
this.replayBase = window.location.origin + "/replay/";
|
||||
this.replaybase = window.location.origin + "/replay/";
|
||||
this.swName = __SW_NAME__;
|
||||
this.view = "replay";
|
||||
this.ts = "";
|
||||
@@ -37,7 +37,7 @@ class Embed extends LitElement
|
||||
view: { type: String },
|
||||
embed: { type: String },
|
||||
|
||||
replayBase: { type: String },
|
||||
replaybase: { type: String },
|
||||
swName: { type: String },
|
||||
|
||||
title: { type: String },
|
||||
@@ -57,7 +57,7 @@ class Embed extends LitElement
|
||||
|
||||
async doRegister() {
|
||||
try {
|
||||
await registerSW(this.swName, this.replayBase);
|
||||
await registerSW(this.swName, this.replaybase);
|
||||
console.log("done");
|
||||
this.swInited = true;
|
||||
} catch (e) {
|
||||
@@ -119,7 +119,7 @@ class Embed extends LitElement
|
||||
changedProperties.has("source")) {
|
||||
|
||||
if (this.embed === null) {
|
||||
this.embed = this.url ? "replay" : "full";
|
||||
this.embed = "full";
|
||||
}
|
||||
|
||||
this.paramString = new URLSearchParams({
|
||||
@@ -169,7 +169,7 @@ class Embed extends LitElement
|
||||
render() {
|
||||
return 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``}
|
||||
|
||||
${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() {
|
||||
return wrapCss(css`
|
||||
:host {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 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;
|
||||
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">
|
||||
<wr-anim-logo class="logo" size="96px"/>
|
||||
</div>
|
||||
${!this.embed ? html`
|
||||
<div class="level">
|
||||
<p class="level-item">Loading <b>${this.sourceUrl}</b>...</p>
|
||||
</div>
|
||||
</div>` : ``}
|
||||
<div class="level">
|
||||
<div class="level-item has-text-centered">
|
||||
${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`
|
||||
<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>`;
|
||||
|
||||
case "errored":
|
||||
|
||||
Reference in New Issue
Block a user