feat(dashboard): 🚸 Add version number in settings modal
This commit is contained in:
@@ -12,7 +12,7 @@ import { useUser } from 'contexts/UserContext'
|
|||||||
import { GraphNavigation } from 'db'
|
import { GraphNavigation } from 'db'
|
||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
|
|
||||||
export const EditorSettings = () => {
|
export const EditorSettingsForm = () => {
|
||||||
const { user, saveUser } = useUser()
|
const { user, saveUser } = useUser()
|
||||||
const [value, setValue] = useState<string>(
|
const [value, setValue] = useState<string>(
|
||||||
user?.graphNavigation ?? GraphNavigation.TRACKPAD
|
user?.graphNavigation ?? GraphNavigation.TRACKPAD
|
||||||
@@ -21,7 +21,7 @@ import { useState } from 'react'
|
|||||||
import { BillingForm } from './BillingForm'
|
import { BillingForm } from './BillingForm'
|
||||||
import { MembersList } from './MembersList'
|
import { MembersList } from './MembersList'
|
||||||
import { MyAccountForm } from './MyAccountForm'
|
import { MyAccountForm } from './MyAccountForm'
|
||||||
import { EditorSettings } from './UserSettingsForm'
|
import { EditorSettingsForm } from './EditorSettingsForm'
|
||||||
import { WorkspaceSettingsForm } from './WorkspaceSettingsForm'
|
import { WorkspaceSettingsForm } from './WorkspaceSettingsForm'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -51,7 +51,15 @@ export const WorkspaceSettingsModal = ({
|
|||||||
<Modal isOpen={isOpen} onClose={onClose} size="4xl">
|
<Modal isOpen={isOpen} onClose={onClose} size="4xl">
|
||||||
<ModalOverlay />
|
<ModalOverlay />
|
||||||
<ModalContent h="600px" flexDir="row">
|
<ModalContent h="600px" flexDir="row">
|
||||||
<Stack spacing={8} w="250px" py="6" borderRightWidth={1} h="full">
|
<Stack
|
||||||
|
spacing={8}
|
||||||
|
w="250px"
|
||||||
|
py="6"
|
||||||
|
borderRightWidth={1}
|
||||||
|
h="full"
|
||||||
|
justifyContent="space-between"
|
||||||
|
>
|
||||||
|
<Stack spacing={8}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Text pl="4" color="gray.500">
|
<Text pl="4" color="gray.500">
|
||||||
{user.email}
|
{user.email}
|
||||||
@@ -131,6 +139,14 @@ export const WorkspaceSettingsModal = ({
|
|||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
|
<Flex justify="center" pt="10">
|
||||||
|
<Text color="gray.500" fontSize="xs">
|
||||||
|
Version: 2.5.0
|
||||||
|
</Text>
|
||||||
|
</Flex>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
{isOpen && (
|
{isOpen && (
|
||||||
<Flex flex="1" p="10">
|
<Flex flex="1" p="10">
|
||||||
<SettingsContent tab={selectedTab} onClose={onClose} />
|
<SettingsContent tab={selectedTab} onClose={onClose} />
|
||||||
@@ -152,7 +168,7 @@ const SettingsContent = ({
|
|||||||
case 'my-account':
|
case 'my-account':
|
||||||
return <MyAccountForm />
|
return <MyAccountForm />
|
||||||
case 'user-settings':
|
case 'user-settings':
|
||||||
return <EditorSettings />
|
return <EditorSettingsForm />
|
||||||
case 'workspace-settings':
|
case 'workspace-settings':
|
||||||
return <WorkspaceSettingsForm onClose={onClose} />
|
return <WorkspaceSettingsForm onClose={onClose} />
|
||||||
case 'members':
|
case 'members':
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
ModalContent,
|
ModalContent,
|
||||||
ModalOverlay,
|
ModalOverlay,
|
||||||
} from '@chakra-ui/react'
|
} from '@chakra-ui/react'
|
||||||
import { EditorSettings } from 'components/dashboard/WorkspaceSettingsModal/UserSettingsForm'
|
import { EditorSettingsForm } from 'components/dashboard/WorkspaceSettingsModal/EditorSettingsForm'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -20,7 +20,7 @@ export const EditorSettingsModal = ({ isOpen, onClose }: Props) => {
|
|||||||
<ModalContent>
|
<ModalContent>
|
||||||
<ModalCloseButton />
|
<ModalCloseButton />
|
||||||
<ModalBody pt="12" pb="8" px="8">
|
<ModalBody pt="12" pb="8" px="8">
|
||||||
<EditorSettings />
|
<EditorSettingsForm />
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "2.3.0",
|
"version": "2.5.0",
|
||||||
"name": "typebot-os",
|
"name": "typebot-os",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
|||||||
Reference in New Issue
Block a user