diff --git a/frontend/src/pages/org/workflow-detail.ts b/frontend/src/pages/org/workflow-detail.ts index 504fde3b..03da1bbb 100644 --- a/frontend/src/pages/org/workflow-detail.ts +++ b/frontend/src/pages/org/workflow-detail.ts @@ -1449,7 +1449,6 @@ export class WorkflowDetail extends LiteElement { message: msg("Starting crawl."), variant: "success", icon: "check2-circle", - duration: 8000, }); } catch (e: any) { let message = msg("Sorry, couldn't run crawl at this time."); diff --git a/frontend/src/pages/org/workflow-editor.ts b/frontend/src/pages/org/workflow-editor.ts index 0e171805..22ad0c26 100644 --- a/frontend/src/pages/org/workflow-editor.ts +++ b/frontend/src/pages/org/workflow-editor.ts @@ -1,11 +1,13 @@ import type { LitElement, TemplateResult } from "lit"; import { html as staticHtml, unsafeStatic } from "lit/static-html.js"; import type { + SlChangeEvent, SlCheckbox, SlInput, SlRadio, SlRadioGroup, SlSelect, + SlSwitch, SlTextarea, } from "@shoelace-style/shoelace"; import { state, property, query, queryAsync } from "lit/decorators.js"; @@ -90,7 +92,7 @@ type FormState = { scale: WorkflowParams["scale"]; blockAds: WorkflowParams["config"]["blockAds"]; lang: WorkflowParams["config"]["lang"]; - scheduleType: "now" | "date" | "cron" | "none"; + scheduleType: "date" | "cron" | "none"; scheduleFrequency: "daily" | "weekly" | "monthly" | ""; scheduleDayOfMonth?: number; scheduleDayOfWeek?: number; @@ -165,7 +167,7 @@ const getDefaultFormState = (): FormState => ({ scale: 1, blockAds: true, lang: undefined, - scheduleType: "now", + scheduleType: "none", scheduleFrequency: "weekly", scheduleDayOfMonth: new Date().getDate(), scheduleDayOfWeek: new Date().getDay(), @@ -174,7 +176,7 @@ const getDefaultFormState = (): FormState => ({ minute: 0, period: "AM", }, - runNow: false, + runNow: true, jobName: "", browserProfile: null, tags: [], @@ -183,9 +185,6 @@ const getDefaultFormState = (): FormState => ({ autoscrollBehavior: true, }); const defaultProgressState = getDefaultProgressState(); -const orderedTabNames = STEPS.filter( - (stepName) => defaultProgressState.tabs[stepName as StepName] -) as StepName[]; function getLocalizedWeekDays() { const now = new Date(); @@ -300,7 +299,6 @@ export class CrawlConfigEditor extends LiteElement { FormState["scheduleType"], string > = { - now: msg("Run Immediately on Save"), date: msg("Run on a Specific Date & Time"), cron: msg("Run on a Recurring Basis"), none: msg("No Schedule"), @@ -473,11 +471,7 @@ export class CrawlConfigEditor extends LiteElement { period: hours > 11 ? "PM" : "AM", }; } else { - if (this.configId) { - formState.scheduleType = "none"; - } else { - formState.scheduleType = "now"; - } + formState.scheduleType = "none"; } if (this.initialWorkflow.tags?.length) { @@ -554,6 +548,14 @@ export class CrawlConfigEditor extends LiteElement { crawlMetadata: msg("Metadata"), confirmSettings: msg("Review Settings"), }; + let orderedTabNames = STEPS.filter( + (stepName) => defaultProgressState.tabs[stepName as StepName] + ) as StepName[]; + + if (this.configId) { + // Remove review tab + orderedTabNames = orderedTabNames.slice(0, -1); + } return html`