diff --git a/package.json b/package.json index 9f18c9d..788ff1a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "replaywebpage", "productName": "ReplayWeb.page", - "version": "1.1.0-beta.0", + "version": "1.1.0-beta.1", "description": "Serverless Web Archive Replay", "repository": "https://github.com/webrecorder/replayweb.page", "homepage": "https://replayweb.page/", @@ -22,7 +22,7 @@ }, "devDependencies": { "css-loader": "^3.5.3", - "electron": "9.1.2", + "electron": "^10.0.0", "electron-builder": "^22.7.0", "electron-notarize": "^1.0.0", "http-server": "^0.12.3", diff --git a/src/coll.js b/src/coll.js index f255e78..7234b2e 100644 --- a/src/coll.js +++ b/src/coll.js @@ -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"; diff --git a/src/embed.js b/src/embed.js index 63d2be7..57f64b4 100644 --- a/src/embed.js +++ b/src/embed.js @@ -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` - + ` : html``} ${this.noSW ? html` diff --git a/src/loader.js b/src/loader.js index 28cfcb5..0c2023d 100644 --- a/src/loader.js +++ b/src/loader.js @@ -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
Loading ${this.sourceUrl}...
-Loaded ${prettyBytes(this.currentSize)} of ${prettyBytes(this.totalSize)}
` : html``} - + ${!this.embed ? html` + ` : ``}>>2),c[l++]=255&(r<<6|i<<1|n>>>4),c[l++]=255&(n<<4|s>>>1),c[l++]=255&(s<<7|o<<2|a>>>3),c[l++]=255&(a<<5|u);var m=d-p;return 2===m?(e=h[t.charAt(f++)],r=h[t.charAt(f++)],c[l++]=255&(e<<3|r>>>2)):4===m?(e=h[t.charAt(f++)],r=h[t.charAt(f++)],i=h[t.charAt(f++)],n=h[t.charAt(f++)],c[l++]=255&(e<<3|r>>>2),c[l++]=255&(r<<6|i<<1|n>>>4)):5===m?(e=h[t.charAt(f++)],r=h[t.charAt(f++)],i=h[t.charAt(f++)],n=h[t.charAt(f++)],s=h[t.charAt(f++)],c[l++]=255&(e<<3|r>>>2),c[l++]=255&(r<<6|i<<1|n>>>4),c[l++]=255&(n<<4|s>>>1)):7===m&&(e=h[t.charAt(f++)],r=h[t.charAt(f++)],i=h[t.charAt(f++)],n=h[t.charAt(f++)],s=h[t.charAt(f++)],o=h[t.charAt(f++)],a=h[t.charAt(f++)],c[l++]=255&(e<<3|r>>>2),c[l++]=255&(r<<6|i<<1|n>>>4),c[l++]=255&(n<<4|s>>>1),c[l++]=255&(s<<7|o<<2|a>>>3)),c},f=function(t,e){if(!e)return function(t){for(var e,r,i="",n=t.length,s=0,o=0;s >6,c[a++]=128|63&o):o<55296||o>=57344?(c[a++]=224|o>>12,c[a++]=128|o>>6&63,c[a++]=128|63&o):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++d)),c[a++]=240|o>>18,c[a++]=128|o>>12&63,c[a++]=128|o>>6&63,c[a++]=128|63&o);a-f,f=a-5,d===p&&++d,d>p&&a<6&&(h=!0),e=c[0],a>4?(r=c[1],i=c[2],n=c[3],s=c[4],l+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|i>>>4)]+u[31&(i<<1|n>>>7)]+u[n>>>2&31]+u[31&(n<<3|s>>>5)]+u[31&s]):1===a?l+=u[e>>>3]+u[e<<2&31]+"======":2===a?(r=c[1],l+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[r<<4&31]+"===="):3===a?(r=c[1],i=c[2],l+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|i>>>4)]+u[i<<1&31]+"==="):(r=c[1],i=c[2],n=c[3],l+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|i>>>4)]+u[31&(i<<1|n>>>7)]+u[n>>>2&31]+u[n<<3&31]+"=")}while(!h);return l}(t)},decode:f};f.asBytes=d,o?t.exports=p:(s.base32=p,a&&(void 0===(n=function(){return p}.call(p,r,p,t))||(t.exports=n)))}()}).call(this,r(14),r(6))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(164);var i=/\\(u\{([0-9A-Fa-f]+)\}|u([0-9A-Fa-f]{4})|x([0-9A-Fa-f]{2})|([1-7][0-7]{0,2}|[0-7]{2,3})|(['"tbrnfv0\\]))|\\U([0-9A-Fa-f]{8})/g,n={0:"\0",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v","'":"'",'"':'"',"\\":"\\"},s=function(t){return String.fromCodePoint(parseInt(t,16))};e.default=function(t){return t.replace(i,(function(t,e,r,i,o,a,u,h){return void 0!==r?s(r):void 0!==i?s(i):void 0!==o?s(o):void 0!==a?(c=a,String.fromCodePoint(parseInt(c,8))):void 0!==h?s(h):n[u];var c}))},t.exports=e.default},function(t,e){var r={};r[e.ACCEPTED=202]="Accepted",r[e.BAD_GATEWAY=502]="Bad Gateway",r[e.BAD_REQUEST=400]="Bad Request",r[e.CONFLICT=409]="Conflict",r[e.CONTINUE=100]="Continue",r[e.CREATED=201]="Created",r[e.EXPECTATION_FAILED=417]="Expectation Failed",r[e.FAILED_DEPENDENCY=424]="Failed Dependency",r[e.FORBIDDEN=403]="Forbidden",r[e.GATEWAY_TIMEOUT=504]="Gateway Timeout",r[e.GONE=410]="Gone",r[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP Version Not Supported",r[e.IM_A_TEAPOT=418]="I'm a teapot",r[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="Insufficient Space on Resource",r[e.INSUFFICIENT_STORAGE=507]="Insufficient Storage",r[e.INTERNAL_SERVER_ERROR=500]="Server Error",r[e.LENGTH_REQUIRED=411]="Length Required",r[e.LOCKED=423]="Locked",r[e.METHOD_FAILURE=420]="Method Failure",r[e.METHOD_NOT_ALLOWED=405]="Method Not Allowed",r[e.MOVED_PERMANENTLY=301]="Moved Permanently",r[e.MOVED_TEMPORARILY=302]="Moved Temporarily",r[e.MULTI_STATUS=207]="Multi-Status",r[e.MULTIPLE_CHOICES=300]="Multiple Choices",r[e.NETWORK_AUTHENTICATION_REQUIRED=511]="Network Authentication Required",r[e.NO_CONTENT=204]="No Content",r[e.NON_AUTHORITATIVE_INFORMATION=203]="Non Authoritative Information",r[e.NOT_ACCEPTABLE=406]="Not Acceptable",r[e.NOT_FOUND=404]="Not Found",r[e.NOT_IMPLEMENTED=501]="Not Implemented",r[e.NOT_MODIFIED=304]="Not Modified",r[e.OK=200]="OK",r[e.PARTIAL_CONTENT=206]="Partial Content",r[e.PAYMENT_REQUIRED=402]="Payment Required",r[e.PERMANENT_REDIRECT=308]="Permanent Redirect",r[e.PRECONDITION_FAILED=412]="Precondition Failed",r[e.PRECONDITION_REQUIRED=428]="Precondition Required",r[e.PROCESSING=102]="Processing",r[e.PROXY_AUTHENTICATION_REQUIRED=407]="Proxy Authentication Required",r[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="Request Header Fields Too Large",r[e.REQUEST_TIMEOUT=408]="Request Timeout",r[e.REQUEST_TOO_LONG=413]="Request Entity Too Large",r[e.REQUEST_URI_TOO_LONG=414]="Request-URI Too Long",r[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="Requested Range Not Satisfiable",r[e.RESET_CONTENT=205]="Reset Content",r[e.SEE_OTHER=303]="See Other",r[e.SERVICE_UNAVAILABLE=503]="Service Unavailable",r[e.SWITCHING_PROTOCOLS=101]="Switching Protocols",r[e.TEMPORARY_REDIRECT=307]="Temporary Redirect",r[e.TOO_MANY_REQUESTS=429]="Too Many Requests",r[e.UNAUTHORIZED=401]="Unauthorized",r[e.UNPROCESSABLE_ENTITY=422]="Unprocessable Entity",r[e.UNSUPPORTED_MEDIA_TYPE=415]="Unsupported Media Type",r[e.USE_PROXY=305]="Use Proxy",e.getStatusText=function(t){if(r.hasOwnProperty(t))return r[t];throw new Error("Status code does not exist: "+t)},e.getStatusCode=function(t){for(key in r)if(r[key]===t)return parseInt(key,10);throw new Error("Reason phrase does not exist: "+t)}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return s}));var i=r(115),n=r(19);class s extends n.a{constructor(e){super(),this.bundle=new i.Bundle(t.from(e))}async load(t){this.db=t;const e=this.bundle.primaryURL,r=new Date,i=r.getTime(),n=e;this.addPage({url:e,date:r.toISOString(),title:n});for(const t of this.bundle.urls){const e=this.bundle.getResponse(t);this.addResource({url:t,ts:i,status:e.status,respHeaders:e.headers,payload:e.body})}return await this.finishIndexing(),{}}}}).call(this,r(3).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(190);e.Bundle=i.Bundle,e.Response=i.Response;var n=r(203);e.BundleBuilder=n.BundleBuilder},function(t,e,r){(function(e,r,i){t.exports=function t(e,r,i){function n(o,a){if(!r[o]){if(!e[o]){if(s)return s(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var h=r[o]={exports:{}};e[o][0].call(h.exports,(function(t){return n(e[o][1][t]||t)}),h,h.exports,t,e,r,i)}return r[o].exports}for(var s=!1,o=0;o