@ -1,13 +1,13 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { HStack, Flex, Button, useDisclosure } from '@chakra-ui/react'
|
import { HStack, Flex, Button, useDisclosure } from '@chakra-ui/react'
|
||||||
import { SettingsIcon } from '@/components/icons'
|
import { HardDriveIcon, SettingsIcon } from '@/components/icons'
|
||||||
import { signOut } from 'next-auth/react'
|
import { signOut } from 'next-auth/react'
|
||||||
import { useUser } from '@/features/account'
|
import { useUser } from '@/features/account'
|
||||||
import { useWorkspace, WorkspaceDropdown } from '@/features/workspace'
|
import { useWorkspace, WorkspaceDropdown } from '@/features/workspace'
|
||||||
import { isNotDefined } from 'utils'
|
import { isNotDefined } from 'utils'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { TypebotLogo } from '@/components/TypebotLogo'
|
|
||||||
import { WorkspaceSettingsModal } from '@/features/workspace'
|
import { WorkspaceSettingsModal } from '@/features/workspace'
|
||||||
|
import { EmojiOrImageIcon } from '@/components/EmojiOrImageIcon'
|
||||||
|
|
||||||
export const DashboardHeader = () => {
|
export const DashboardHeader = () => {
|
||||||
const { user } = useUser()
|
const { user } = useUser()
|
||||||
@ -32,7 +32,11 @@ export const DashboardHeader = () => {
|
|||||||
flex="1"
|
flex="1"
|
||||||
>
|
>
|
||||||
<Link href="/typebots" data-testid="typebot-logo">
|
<Link href="/typebots" data-testid="typebot-logo">
|
||||||
<TypebotLogo w="30px" />
|
<EmojiOrImageIcon
|
||||||
|
boxSize="30px"
|
||||||
|
icon={workspace?.icon}
|
||||||
|
defaultIcon={HardDriveIcon}
|
||||||
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
<HStack>
|
<HStack>
|
||||||
{user && workspace && (
|
{user && workspace && (
|
||||||
|
@ -35,7 +35,7 @@ export const DashboardPage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack minH="100vh">
|
<Stack minH="100vh">
|
||||||
<Seo title="My typebots" />
|
<Seo title={workspace?.name ?? 'My typebots'} />
|
||||||
<DashboardHeader />
|
<DashboardHeader />
|
||||||
<TypebotDndProvider>
|
<TypebotDndProvider>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
|
@ -18,12 +18,12 @@ import { GettingStartedModal } from './GettingStartedModal'
|
|||||||
import { PreviewDrawer } from './PreviewDrawer'
|
import { PreviewDrawer } from './PreviewDrawer'
|
||||||
import { TypebotHeader } from './TypebotHeader'
|
import { TypebotHeader } from './TypebotHeader'
|
||||||
|
|
||||||
export const EditTypebotPage = () => {
|
export const EditorPage = () => {
|
||||||
const { typebot, isReadOnly } = useTypebot()
|
const { typebot, isReadOnly } = useTypebot()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EditorProvider>
|
<EditorProvider>
|
||||||
<Seo title="Editor" />
|
<Seo title={typebot?.name ? `${typebot.name} | Editor` : 'Editor'} />
|
||||||
<Flex overflow="clip" h="100vh" flexDir="column" id="editor-container">
|
<Flex overflow="clip" h="100vh" flexDir="column" id="editor-container">
|
||||||
<GettingStartedModal />
|
<GettingStartedModal />
|
||||||
<TypebotHeader />
|
<TypebotHeader />
|
@ -1,6 +1,6 @@
|
|||||||
export { TypebotProvider, useTypebot } from './providers/TypebotProvider'
|
export { TypebotProvider, useTypebot } from './providers/TypebotProvider'
|
||||||
export { TypebotHeader } from './components/TypebotHeader'
|
export { TypebotHeader } from './components/TypebotHeader'
|
||||||
export { EditTypebotPage } from './components/EditTypebotPage'
|
export { EditorPage } from './components/EditorPage'
|
||||||
export { headerHeight } from './constants'
|
export { headerHeight } from './constants'
|
||||||
export { BlockIcon } from './components/BlocksSideBar/BlockIcon'
|
export { BlockIcon } from './components/BlocksSideBar/BlockIcon'
|
||||||
export { RightPanel, useEditor } from './providers/EditorProvider'
|
export { RightPanel, useEditor } from './providers/EditorProvider'
|
||||||
|
@ -88,7 +88,7 @@ export const SharePage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex flexDir="column" pb="40">
|
<Flex flexDir="column" pb="40">
|
||||||
<Seo title="Share" />
|
<Seo title={typebot?.name ? `${typebot.name} | Share` : 'Share'} />
|
||||||
<TypebotHeader />
|
<TypebotHeader />
|
||||||
<Flex h="full" w="full" justifyContent="center" align="flex-start">
|
<Flex h="full" w="full" justifyContent="center" align="flex-start">
|
||||||
<Stack maxW="1000px" w="full" pt="10" spacing={10}>
|
<Stack maxW="1000px" w="full" pt="10" spacing={10}>
|
||||||
|
@ -89,7 +89,15 @@ export const ResultsPage = () => {
|
|||||||
return (
|
return (
|
||||||
<Flex overflow="hidden" h="100vh" flexDir="column">
|
<Flex overflow="hidden" h="100vh" flexDir="column">
|
||||||
<Seo
|
<Seo
|
||||||
title={router.pathname.endsWith('analytics') ? 'Analytics' : 'Results'}
|
title={
|
||||||
|
router.pathname.endsWith('analytics')
|
||||||
|
? typebot?.name
|
||||||
|
? `${typebot.name} | Analytics`
|
||||||
|
: 'Analytics'
|
||||||
|
: typebot?.name
|
||||||
|
? `${typebot.name} | Results`
|
||||||
|
: 'Results'
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<TypebotHeader />
|
<TypebotHeader />
|
||||||
{chatsLimitPercentage > ALERT_CHATS_PERCENT_THRESHOLD && (
|
{chatsLimitPercentage > ALERT_CHATS_PERCENT_THRESHOLD && (
|
||||||
|
@ -17,7 +17,7 @@ export const SettingsPage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex overflow="hidden" h="100vh" flexDir="column">
|
<Flex overflow="hidden" h="100vh" flexDir="column">
|
||||||
<Seo title="Settings" />
|
<Seo title={typebot?.name ? `${typebot.name} | Settings` : 'Settings'} />
|
||||||
<TypebotHeader />
|
<TypebotHeader />
|
||||||
<Flex h="full" w="full">
|
<Flex h="full" w="full">
|
||||||
<SettingsSideMenu />
|
<SettingsSideMenu />
|
||||||
|
@ -12,7 +12,7 @@ export const ThemePage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex overflow="hidden" h="100vh" flexDir="column">
|
<Flex overflow="hidden" h="100vh" flexDir="column">
|
||||||
<Seo title="Theme" />
|
<Seo title={typebot?.name ? `${typebot.name} | Theme` : 'Theme'} />
|
||||||
<TypebotHeader />
|
<TypebotHeader />
|
||||||
<Flex h="full" w="full">
|
<Flex h="full" w="full">
|
||||||
<ThemeSideMenu />
|
<ThemeSideMenu />
|
||||||
|
@ -12,7 +12,6 @@ import {
|
|||||||
MenuButton,
|
MenuButton,
|
||||||
Button,
|
Button,
|
||||||
HStack,
|
HStack,
|
||||||
SkeletonCircle,
|
|
||||||
MenuList,
|
MenuList,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
Text,
|
Text,
|
||||||
@ -40,18 +39,6 @@ export const WorkspaceDropdown = ({
|
|||||||
<Menu placement="bottom-end">
|
<Menu placement="bottom-end">
|
||||||
<MenuButton as={Button} variant="outline" px="2">
|
<MenuButton as={Button} variant="outline" px="2">
|
||||||
<HStack>
|
<HStack>
|
||||||
<SkeletonCircle
|
|
||||||
isLoaded={currentWorkspace !== undefined}
|
|
||||||
alignItems="center"
|
|
||||||
display="flex"
|
|
||||||
boxSize="20px"
|
|
||||||
>
|
|
||||||
<EmojiOrImageIcon
|
|
||||||
boxSize="20px"
|
|
||||||
icon={currentWorkspace?.icon}
|
|
||||||
defaultIcon={HardDriveIcon}
|
|
||||||
/>
|
|
||||||
</SkeletonCircle>
|
|
||||||
{currentWorkspace && (
|
{currentWorkspace && (
|
||||||
<>
|
<>
|
||||||
<Text noOfLines={1} maxW="200px">
|
<Text noOfLines={1} maxW="200px">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { EditTypebotPage } from '@/features/editor'
|
import { EditorPage } from '@/features/editor'
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return <EditTypebotPage />
|
return <EditorPage />
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user