mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
Move smallwebrtc to constants
This commit is contained in:
parent
5ab93767dd
commit
b86a460062
3 changed files with 13 additions and 2 deletions
|
|
@ -16,6 +16,7 @@ import {
|
|||
} from '@/components/ui/dialog';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { WORKFLOW_RUN_MODES } from '@/constants/workflowRunModes';
|
||||
import { useAuth } from '@/lib/auth';
|
||||
import logger from '@/lib/logger';
|
||||
import { getRandomId } from '@/lib/utils';
|
||||
|
|
@ -86,7 +87,7 @@ export default function CreateWorkflowPage() {
|
|||
workflow_id: Number(workflowId),
|
||||
},
|
||||
body: {
|
||||
mode: 'smallwebrtc', // Same mode as "Web Call" button
|
||||
mode: WORKFLOW_RUN_MODES.SMALL_WEBRTC, // Same mode as "Web Call" button
|
||||
name: workflowRunName
|
||||
},
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import { OnboardingTooltip } from '@/components/onboarding/OnboardingTooltip';
|
|||
import { Button } from "@/components/ui/button";
|
||||
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog";
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
|
||||
import { WORKFLOW_RUN_MODES } from '@/constants/workflowRunModes';
|
||||
import { useOnboarding } from '@/context/OnboardingContext';
|
||||
import { useUserConfig } from "@/context/UserConfigContext";
|
||||
import { useAuth } from '@/lib/auth';
|
||||
|
|
@ -203,7 +204,7 @@ const WorkflowHeader = ({ isDirty, workflowName, rfInstance, onRun, workflowId,
|
|||
if (!hasSeenTooltip('web_call')) {
|
||||
markTooltipSeen('web_call');
|
||||
}
|
||||
onRun("smallwebrtc"); // Don't change the mode since its defined in the database enum
|
||||
onRun(WORKFLOW_RUN_MODES.SMALL_WEBRTC);
|
||||
}}
|
||||
disabled={hasValidationErrors}
|
||||
>
|
||||
|
|
|
|||
9
ui/src/constants/workflowRunModes.ts
Normal file
9
ui/src/constants/workflowRunModes.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Workflow run mode constants
|
||||
* These modes determine how a workflow run is executed
|
||||
*/
|
||||
export const WORKFLOW_RUN_MODES = {
|
||||
SMALL_WEBRTC: 'smallwebrtc',
|
||||
} as const;
|
||||
|
||||
export type WorkflowRunMode = typeof WORKFLOW_RUN_MODES[keyof typeof WORKFLOW_RUN_MODES];
|
||||
Loading…
Add table
Add a link
Reference in a new issue