- ${msg("Status")}
-
${this.crawl
? html`
●
${this.crawl.state.replace(/_/g, " ")}
`
: html``}
- ${msg("Pages Crawled")}
-
${this.crawl?.stats
? html`
${this.numberFormatter.format(+this.crawl.stats.done)}
/
${this.numberFormatter.format(+this.crawl.stats.found)}
`
: this.crawl
? html` ${msg("Unknown")} `
: html``}
- ${msg("Run Duration")}
-
${this.crawl
? html`
${this.crawl.finished
? html`${RelativeDuration.humanize(
new Date(`${this.crawl.finished}Z`).valueOf() -
new Date(`${this.crawl.started}Z`).valueOf()
)}`
: html`
`}
`
: html``}
- ${msg("Crawl Scale")}
-
${this.crawl
? html`${this.crawl.scale}`
: html``}
`;
}
private renderWatch() {
if (!this.authState || !this.crawl) return "";
const isStarting = this.crawl.state === "starting";
const isRunning = this.crawl.state === "running";
const authToken = this.authState.headers.Authorization.split(" ")[1];
return html`
${this.isActive
? msg("No files yet.")
: msg("No files to replay.")}
`
}
`;
}
private renderOverview() {
return html`
${this.isActive
? msg("No files yet.")
: msg("No files to download.")}
`}
`;
}
private renderLogs() {
return html`TODO`;
}
private renderEditScale() {
if (!this.crawl) return;
const scaleOptions = [
{
value: 1,
label: msg("Standard"),
},
{
value: 2,
label: msg("Big (2x)"),
},
{
value: 3,
label: msg("Bigger (3x)"),
},
];
return html`