${regex}
`),
variant: "success",
icon: "check2-circle",
});
this.dispatchEvent(new CustomEvent("on-success"));
} else {
throw data;
}
} catch (e: any) {
this.notify({
message:
e.message === "crawl_running_cant_deactivate"
? msg("Cannot remove exclusion when crawl is no longer running.")
: msg("Sorry, couldn't remove exclusion at this time."),
variant: "danger",
icon: "exclamation-octagon",
});
}
}
private async fetchQueueMatches() {
if (!this.regex) {
this.matchedURLs = null;
return;
}
this.isLoading = true;
try {
const { matched } = await this.getQueueMatches();
this.matchedURLs = matched;
} catch (e) {
this.notify({
message: msg("Sorry, couldn't fetch pending exclusions at this time."),
variant: "danger",
icon: "exclamation-octagon",
});
}
this.isLoading = false;
}
private async getQueueMatches(): Promise