🐛 Fix board menu placement when suspected typebot banner is displayed
This commit is contained in:
@ -28,15 +28,15 @@ export const EditorPage = () => {
|
||||
)
|
||||
const bgColor = useColorModeValue('#f4f5f8', 'gray.850')
|
||||
|
||||
const isSuspicious = typebot?.riskLevel === 100 && !workspace?.isVerified
|
||||
|
||||
if (is404) return <TypebotNotFoundPage />
|
||||
return (
|
||||
<EditorProvider>
|
||||
<Seo title={typebot?.name ? `${typebot.name} | Editor` : 'Editor'} />
|
||||
<Flex overflow="clip" h="100vh" flexDir="column" id="editor-container">
|
||||
<GettingStartedModal />
|
||||
{typebot?.riskLevel === 100 && !workspace?.isVerified && (
|
||||
<SuspectedTypebotBanner typebotId={typebot.id} />
|
||||
)}
|
||||
{isSuspicious && <SuspectedTypebotBanner typebotId={typebot.id} />}
|
||||
<TypebotHeader />
|
||||
<Flex
|
||||
flex="1"
|
||||
@ -57,7 +57,11 @@ export const EditorPage = () => {
|
||||
>
|
||||
<EventsCoordinatesProvider events={typebot.events}>
|
||||
<Graph flex="1" typebot={typebot} key={typebot.id} />
|
||||
<BoardMenuButton pos="absolute" right="40px" top="20px" />
|
||||
<BoardMenuButton
|
||||
pos="absolute"
|
||||
right="40px"
|
||||
top={`calc(20px + ${isSuspicious ? '70px' : '0'})`}
|
||||
/>
|
||||
<RightPanel />
|
||||
</EventsCoordinatesProvider>
|
||||
</GraphProvider>
|
||||
|
@ -77,6 +77,11 @@ export const PublishButton = ({
|
||||
title: t('publish.error.label'),
|
||||
description: error.message,
|
||||
})
|
||||
if (error.data?.httpStatus === 403) {
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
}, 3000)
|
||||
}
|
||||
},
|
||||
onSuccess: () => {
|
||||
refetchPublishedTypebot({
|
||||
|
@ -98,7 +98,11 @@ export const publishTypebot = authenticatedProcedure
|
||||
'Radar detected a potential malicious typebot. This bot is being manually reviewed by Fraud Prevention team.',
|
||||
})
|
||||
|
||||
const riskLevel = typebotWasVerified ? 0 : computeRiskLevel(existingTypebot)
|
||||
const riskLevel = typebotWasVerified
|
||||
? 0
|
||||
: computeRiskLevel(existingTypebot, {
|
||||
debug: env.NODE_ENV === 'development',
|
||||
})
|
||||
|
||||
if (riskLevel > 0 && riskLevel !== existingTypebot.riskLevel) {
|
||||
if (env.MESSAGE_WEBHOOK_URL && riskLevel !== 100 && riskLevel > 60)
|
||||
|
Reference in New Issue
Block a user