Skip to content

Commit

Permalink
fix issues from rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
emma-sg committed Nov 24, 2023
1 parent 39af2b2 commit 304c06e
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 249 deletions.
4 changes: 2 additions & 2 deletions src/appmain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { SWManager } from "./swmanager";
import "./item";
import "./item-index";
import "./chooser";
import { LoadInfo } from "./coll";
import { LoadInfo } from "./item";

// ===========================================================================
@customElement("replay-app-main")
Expand All @@ -43,7 +43,7 @@ export class ReplayWebApp extends LitElement {
collTitle: string | null = null;

@property({ type: Object })
loadInfo: LoadInfo = null;
loadInfo: LoadInfo | null = null;

@property({ type: String })
embed: string | null = null;
Expand Down
4 changes: 2 additions & 2 deletions src/embed-receipt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import { LitElement, html, css } from "lit";
import { tsToDate } from "./pageutils";
import prettyBytes from "pretty-bytes";
import { property } from "lit/decorators";
import type { Coll as CollType } from "./types";
import type { Item as ItemType } from "./types";
import { assertNonNullish } from "./utils/assertDefined";

// ===========================================================================
export class RWPEmbedReceipt extends LitElement {
@property({ type: Object }) collInfo: CollType | null = null;
@property({ type: Object }) collInfo: ItemType | null = null;
@property({ type: Object }) appLogo = null;
@property({ type: String }) ts: string | null = null;
@property({ type: String }) url: string | null = null;
Expand Down
39 changes: 20 additions & 19 deletions src/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,24 @@ import "./item-info";

const RWP_SCHEME = "search://";

export type LoadInfo =
| {
extraConfig?: {
baseUrlSourcePrefix?: unknown;
baseUrl?: unknown;
headers?: unknown;
};
customColl?: string | null;
noWebWorker?: boolean;
noCache?: boolean;
hideOffscreen?: boolean;
loadEager?: boolean;
sourceUrl?: string;
loadUrl?: string;
}
| Record<string, never>
| null;
export type LoadInfo = {
extraConfig?: {
baseUrlSourcePrefix?: unknown;
baseUrl?: unknown;
headers?: unknown;
recording?: unknown;
};
customColl?: string | null;
noWebWorker?: boolean;
noCache?: boolean;
hideOffscreen?: boolean;
loadEager?: boolean;
sourceUrl?: string;
loadUrl?: string;
swError?: string;
newFullImport?: unknown;
name?: string;
};

// ===========================================================================
class Item extends LitElement {
Expand All @@ -86,7 +87,7 @@ class Item extends LitElement {
sourceUrl: string | null = null;

@property({ type: Object, attribute: false })
loadInfo: LoadInfo = null;
loadInfo: LoadInfo | null = null;

@property({ type: Boolean })
showSidebar: boolean | null = null;
Expand Down Expand Up @@ -888,7 +889,7 @@ class Item extends LitElement {
return html` <wr-loader
.loadInfo="${this.loadInfo}"
embed="${this.embed || ""}"
swName="${this.swName}"
swName="${ifDefined(this.swName === null ? undefined : this.swName)}"
.coll="${this.item}"
sourceUrl="${this.sourceUrl || ""}"
@coll-loaded=${this.onItemLoaded}
Expand Down
Loading

0 comments on commit 304c06e

Please sign in to comment.