⚡ (wordpress) Add the lib_version attribute to wp admin panel
Closes
This commit is contained in:
@@ -8,12 +8,17 @@ import {
|
||||
Link,
|
||||
Stack,
|
||||
Text,
|
||||
Code,
|
||||
} from '@chakra-ui/react'
|
||||
import { BubbleProps } from '@typebot.io/nextjs'
|
||||
import { useState } from 'react'
|
||||
import { BubbleSettings } from '../../../settings/BubbleSettings/BubbleSettings'
|
||||
import { parseApiHostValue, parseInitBubbleCode } from '../../../snippetParsers'
|
||||
import { parseDefaultBubbleTheme } from '../../Javascript/instructions/JavascriptBubbleInstructions'
|
||||
import packageJson from '../../../../../../../../../../packages/embeds/js/package.json'
|
||||
import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
|
||||
|
||||
const typebotCloudLibraryVersion = '0.2'
|
||||
|
||||
type Props = {
|
||||
publicId: string
|
||||
@@ -52,6 +57,14 @@ export const WordpressBubbleInstructions = ({ publicId }: Props) => {
|
||||
<ExternalLinkIcon mx="2px" />
|
||||
</Link>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
Set <Code>Library version</Code> to{' '}
|
||||
<Code>
|
||||
{isCloudProdInstance()
|
||||
? typebotCloudLibraryVersion
|
||||
: packageJson.version}
|
||||
</Code>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<Stack spacing={4}>
|
||||
<BubbleSettings
|
||||
|
||||
@@ -7,11 +7,16 @@ import {
|
||||
Link,
|
||||
Stack,
|
||||
Text,
|
||||
Code,
|
||||
} from '@chakra-ui/react'
|
||||
import { useState } from 'react'
|
||||
import { PopupSettings } from '../../../settings/PopupSettings'
|
||||
import { parseInitPopupCode } from '../../../snippetParsers/popup'
|
||||
import { parseApiHostValue } from '../../../snippetParsers'
|
||||
import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
|
||||
import packageJson from '../../../../../../../../../../packages/embeds/js/package.json'
|
||||
|
||||
const typebotCloudLibraryVersion = '0.2'
|
||||
|
||||
type Props = {
|
||||
publicId: string
|
||||
@@ -42,6 +47,14 @@ export const WordpressPopupInstructions = ({
|
||||
<ExternalLinkIcon mx="2px" />
|
||||
</Link>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
Set <Code>Library version</Code> to{' '}
|
||||
<Code>
|
||||
{isCloudProdInstance()
|
||||
? typebotCloudLibraryVersion
|
||||
: packageJson.version}
|
||||
</Code>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<Stack spacing={4}>
|
||||
<PopupSettings
|
||||
|
||||
Reference in New Issue
Block a user