+ html`
`;
@@ -535,39 +534,51 @@ export class CollectionsList extends WithSearchOrgContext(BtrixElement) {
}
const message = msg("Your org doesn’t have any collections yet.");
+ const guideButton = html`
{
+ this.dispatchEvent(
+ new CustomEvent(
+ "btrix-user-guide-show",
+ {
+ detail: { path: "collection" },
+ bubbles: true,
+ composed: true,
+ },
+ ),
+ );
+ }}
+ >
+
+ ${msg("Read Guide")}
+ `;
- return html`
- ${when(
- this.isCrawler,
- () =>
- emptyMessage({
- classNames: tw`border-y`,
- message,
- detail: msg(
- "Collections let you easily organize, replay, and share multiple crawls.",
- ),
- actions: html`
-
{
- this.dispatchEvent(
- new CustomEvent("select-new-dialog", {
- detail: "collection",
- }) as SelectNewDialogEvent,
- );
- }}
- >
-
- ${msg("Create Collection")}
-
- `,
- }),
- () =>
- emptyMessage({
- classNames: tw`border-y`,
- message,
- }),
- )}
- `;
+ if (this.isCrawler) {
+ return emptyMessage({
+ classNames: tw`border-y`,
+ message,
+ detail: msg(
+ "Collections let you easily organize, replay, and share multiple crawls.",
+ ),
+ actions: html`
+
{
+ this.openDialogName = "create";
+ }}
+ >
+
+ ${msg("Create New Collection")}
+
+ ${guideButton}
+ `,
+ });
+ }
+
+ return emptyMessage({
+ classNames: tw`border-y`,
+ message,
+ actions: guideButton,
+ });
};
private readonly renderItem = (col: Collection) => {
diff --git a/frontend/src/pages/org/crawling.ts b/frontend/src/pages/org/crawling.ts
index 824ec18b82..f41903d1bd 100644
--- a/frontend/src/pages/org/crawling.ts
+++ b/frontend/src/pages/org/crawling.ts
@@ -45,14 +45,18 @@ export class OrgCrawling extends BtrixElement {
variant="primary"
size="small"
?disabled=${this.org?.readOnly}
- @click=${() =>
- this.navigate.to(
- `${this.navigate.orgBasePath}/workflows/new`,
- {
- scopeType:
- this.appState.userPreferences?.newWorkflowScopeType,
- },
- )}
+ href=${`${this.navigate.orgBasePath}/workflows/new`}
+ @click=${(e: MouseEvent) => {
+ if (e.metaKey) {
+ return;
+ }
+ e.preventDefault();
+
+ this.navigate.to((e.target as HTMLAnchorElement).href, {
+ scopeType:
+ this.appState.userPreferences?.newWorkflowScopeType,
+ });
+ }}
>
${msg("New Workflow")}${this.collectionsView === CollectionGridView.Public
- ? msg("No public collections yet.")
- : msg("No collections yet.")}
${this.collections.value &&
this.collections.value.total > this.collections.value.items.length
diff --git a/frontend/src/pages/org/workflows-list.ts b/frontend/src/pages/org/workflows-list.ts
index 8eca9e854d..367c531a68 100644
--- a/frontend/src/pages/org/workflows-list.ts
+++ b/frontend/src/pages/org/workflows-list.ts
@@ -29,6 +29,7 @@ import activeCrawlsCountContext, {
} from "@/context/active-crawls-count";
import { makeUpdateActiveCrawlsCountEvent } from "@/context/active-crawls-count/events";
import { SearchParamsValue } from "@/controllers/searchParamsValue";
+import { type BtrixUserGuideShowEvent } from "@/events/btrix-user-guide-show";
import {
Action,
type BtrixSelectActionEvent,
@@ -40,6 +41,7 @@ import {
WorkflowSearch,
type SearchFields,
} from "@/features/crawl-workflows/workflow-search";
+import { emptyMessage } from "@/layouts/emptyMessage";
import { WorkflowTab } from "@/routes";
import { deleteConfirmation } from "@/strings/ui";
import type { APIPaginatedList, APIPaginationQuery } from "@/types/api";
@@ -754,7 +756,7 @@ export class WorkflowsList extends BtrixElement {
${msg("No matching Workflows found.")}${msg("No matching workflows found.")}
- `;
+ const message = msg("Your org doesn’t have any crawl workflows yet.");
+ const guideButton = html`
{
+ this.dispatchEvent(
+ new CustomEvent(
+ "btrix-user-guide-show",
+ {
+ detail: { path: "crawl-workflows" },
+ bubbles: true,
+ composed: true,
+ },
+ ),
+ );
+ }}
+ >
+
+ ${msg("Read Guide")}
+ `;
+
+ if (this.appState.isCrawler) {
+ return emptyMessage({
+ classNames: tw`border-y`,
+ message,
+ detail: msg("Schedule, run, and manage crawls with crawl workflows."),
+ actions: html`
+
{
+ if (e.metaKey) {
+ return;
+ }
+ e.preventDefault();
+
+ this.navigate.to((e.target as HTMLAnchorElement).href, {
+ scopeType: this.appState.userPreferences?.newWorkflowScopeType,
+ });
+ }}
+ >
+
+ ${msg("Create New Workflow")}
+
+ ${guideButton}
+ `,
+ });
+ }
+
+ return emptyMessage({
+ classNames: tw`border-y`,
+ message,
+ actions: guideButton,
+ });
}
private renderLoading() {
return html`
`;