Fix missing crawl config name (#683)

This commit is contained in:
sua yoo 2023-03-07 19:13:56 -08:00 committed by GitHub
parent ebce2ec384
commit d3bb524971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -188,7 +188,7 @@ export class CrawlTemplatesDetail extends LiteElement {
></sl-icon> ></sl-icon>
<span class="inline-block align-middle" <span class="inline-block align-middle"
>${configId >${configId
? msg(str`Back to ${this.crawlConfig?.name}`) ? msg(str`Back to ${this.renderName()}`)
: msg("Back to Crawl Configs")}</span : msg("Back to Crawl Configs")}</span
> >
</a> </a>
@ -200,11 +200,7 @@ export class CrawlTemplatesDetail extends LiteElement {
${this.renderHeader(this.crawlConfig!.id)} ${this.renderHeader(this.crawlConfig!.id)}
<header> <header>
<h2 class="text-xl leading-10"> <h2 class="text-xl leading-10">${this.renderName()}</h2>
${this.crawlConfig?.name
? html`<span>${this.crawlConfig.name}</span>`
: ""}
</h2>
</header> </header>
<btrix-crawl-config-editor <btrix-crawl-config-editor
@ -488,7 +484,7 @@ export class CrawlTemplatesDetail extends LiteElement {
if (!this.crawlConfig) return; if (!this.crawlConfig) return;
const crawlTemplate: InitialCrawlConfig = { const crawlTemplate: InitialCrawlConfig = {
name: msg(str`${this.crawlConfig.name} Copy`), name: msg(str`${this.renderName()} Copy`),
config: this.crawlConfig.config, config: this.crawlConfig.config,
profileid: this.crawlConfig.profileid || null, profileid: this.crawlConfig.profileid || null,
jobType: this.crawlConfig.jobType, jobType: this.crawlConfig.jobType,
@ -528,9 +524,7 @@ export class CrawlTemplatesDetail extends LiteElement {
}; };
this.notify({ this.notify({
message: msg( message: msg(html`Deactivated <strong>${this.renderName()}</strong>.`),
html`Deactivated <strong>${this.crawlConfig.name}</strong>.`
),
variant: "success", variant: "success",
icon: "check2-circle", icon: "check2-circle",
}); });
@ -561,8 +555,8 @@ export class CrawlTemplatesDetail extends LiteElement {
this.notify({ this.notify({
message: isDeactivating message: isDeactivating
? msg(html`Deactivated <strong>${this.crawlConfig.name}</strong>.`) ? msg(html`Deactivated <strong>${this.renderName()}</strong>.`)
: msg(html`Deleted <strong>${this.crawlConfig.name}</strong>.`), : msg(html`Deleted <strong>${this.renderName()}</strong>.`),
variant: "success", variant: "success",
icon: "check2-circle", icon: "check2-circle",
}); });