🐛 (script) Execute client side actions before first bubbles
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import { FormLabel, Stack, Text } from '@chakra-ui/react'
|
||||
import { CodeEditor } from '@/components/CodeEditor'
|
||||
import React from 'react'
|
||||
import { SwitchWithLabel } from '@/components/SwitchWithLabel'
|
||||
import { Input } from '@/components/inputs'
|
||||
import { ScriptOptions } from 'models'
|
||||
|
||||
@ -15,9 +14,6 @@ export const ScriptSettings = ({ options, onOptionsChange }: Props) => {
|
||||
onOptionsChange({ ...options, name })
|
||||
const handleCodeChange = (content: string) =>
|
||||
onOptionsChange({ ...options, content })
|
||||
const handleShouldExecuteInParentContextChange = (
|
||||
shouldExecuteInParentContext: boolean
|
||||
) => onOptionsChange({ ...options, shouldExecuteInParentContext })
|
||||
|
||||
return (
|
||||
<Stack spacing={4}>
|
||||
@ -32,12 +28,6 @@ export const ScriptSettings = ({ options, onOptionsChange }: Props) => {
|
||||
withVariableButton={false}
|
||||
/>
|
||||
</Stack>
|
||||
<SwitchWithLabel
|
||||
label="Execute in parent window"
|
||||
moreInfoContent="Execute the code in the parent window context (when the bot is embedded). If it isn't detected, the code will be executed in the current window context."
|
||||
initialValue={options.shouldExecuteInParentContext ?? false}
|
||||
onCheckChange={handleShouldExecuteInParentContextChange}
|
||||
/>
|
||||
<Stack>
|
||||
<Text>Code:</Text>
|
||||
<CodeEditor
|
||||
|
Reference in New Issue
Block a user