Skip to content

Commit

Permalink
#93 Tighter spacing for conversation starters
Browse files Browse the repository at this point in the history
  • Loading branch information
santthosh committed Jun 26, 2024
1 parent 6a330e8 commit 5e491ee
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 21 deletions.
14 changes: 11 additions & 3 deletions src/app/assistants/[id]/chat/ChatPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ import ChatMessageStreaming from '@/app/assistants/[id]/chat/ChatMessageStreamin
import ChatTyping from '@/app/assistants/[id]/chat/ChatTyping';
import { HiOutlinePencilAlt } from 'react-icons/hi';

export default function ChatPage() {
export interface ChatPageProps {
short?: boolean;
}

export default function ChatPage(props: ChatPageProps) {
const { assistant } = useContext(AssistantContext);

const bottomRef = useRef(null);
Expand Down Expand Up @@ -44,10 +48,14 @@ export default function ChatPage() {
return (
<div
key='1'
className='flex h-[calc(100vh-5rem)] max-h-full max-w-full flex-col'
className={
props.short
? 'flex h-[800px] max-h-full max-w-full flex-col'
: 'flex h-[calc(100vh-5rem)] max-h-full max-w-full flex-col'
}
>
<ChatPageHeader />
<div className='flex-grow space-y-4 overflow-auto p-4 py-0 pt-0'>
<div className='flex-grow space-y-4 overflow-auto bg-white p-4 py-0 pt-0'>
<div className='mx-auto flex max-w-2xl flex-col rounded-b rounded-t-none'>
<div className={'max-w-2xl overflow-y-auto'}>
<div
Expand Down
2 changes: 1 addition & 1 deletion src/app/assistants/[id]/customize/AvatarCropUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const AvatarCropUpload = () => {
};

return (
<div className='space-y-6 p-6'>
<div className='flex'>
<div id='fileUpload' className='grid max-w-2xl grid-cols-3'>
<div className={'col-span-2'}>
<div className='mb-2 block'>
Expand Down
4 changes: 2 additions & 2 deletions src/app/assistants/[id]/customize/ColorPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ const ColorPicker = (props: ColorPickerProps) => {
};

return (
<div className='space-y-6 p-6'>
<div className='flex'>
<div id='fileUpload' className='grid max-w-2xl grid-cols-3'>
<div className={'col-span-2'}>
<div className='mb-2 block'>
<Label value={props.label} />
</div>
<div className='grid max-w-xs grid-cols-2'>
<div className='grid max-w-xs grid-cols-2 pb-6'>
<TextInput
type='text'
className='col-span-1'
Expand Down
2 changes: 1 addition & 1 deletion src/app/assistants/[id]/customize/EditInitialPrompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const EditInitialPrompt: React.FC = () => {
}

return (
<div className='space-y-6 p-6'>
<div className='space-y-6'>
<div id='fileUpload' className='grid max-w-4xl'>
<div>
<div className='mb-2 block'>
Expand Down
2 changes: 1 addition & 1 deletion src/app/assistants/[id]/customize/EditMessageLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const EditMessageLabel: React.FC = () => {
}

return (
<div className='space-y-6 p-6'>
<div className='space-y-6'>
<div id='fileUpload' className='grid max-w-4xl'>
<div>
<div className='mb-2 block'>
Expand Down
2 changes: 1 addition & 1 deletion src/app/assistants/[id]/customize/ProfileCropUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const ProfileCropUpload = () => {
};

return (
<div className='space-y-6 p-6'>
<div className='flex'>
<div id='fileUpload' className='grid max-w-2xl grid-cols-3'>
<div className={'col-span-2'}>
<div className='mb-2 block'>
Expand Down
2 changes: 1 addition & 1 deletion src/app/assistants/[id]/customize/ThemeSelections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ThemeSelections = () => {
const { assistant, setAssistant } = useContext(AssistantContext);

return (
<div className='p-6'>
<div className='p-1'>
<div id='colors' className='grid max-w-2xl grid-cols-2'>
<ColorPicker
label='Primary Color'
Expand Down
12 changes: 6 additions & 6 deletions src/app/assistants/[id]/customize/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import ResetToDefaultsAlert from '@/app/assistants/[id]/customize/ResetToDefault
import { EditInitialPrompt } from '@/app/assistants/[id]/customize/EditInitialPrompt';
import { EditMessageLabel } from '@/app/assistants/[id]/customize/EditMessageLabel';
import ChatPopupFrame from '@/app/assistants/[id]/chat/ChatPopupFrame';
import ChatPage from '@/app/assistants/[id]/chat/ChatPage';

export default function Customize() {
const { assistant, setAssistant } = useContext(AssistantContext);
Expand All @@ -23,7 +24,7 @@ export default function Customize() {
<p className={'pb-4 text-sm text-gray-400'}>
Adjust the look and feel of your assistant to match your preferences
</p>
<div className='grid md:grid-cols-2'>
<div className='grid gap-5 md:grid-cols-2'>
<div className='col-span-1 max-h-[100vh] overflow-y-auto'>
<Table className='max-w-3xl flex-auto'>
<Table.Body className='divide-y'>
Expand Down Expand Up @@ -54,11 +55,10 @@ export default function Customize() {
</Table.Row>
<Table.Row className='bg-white dark:border-gray-700 dark:bg-gray-800'>
<Table.Cell>
<div className='space-y-6 p-6'>
<div className='space-y-6'>
<Button
className='bg-gray-50'
outline
color={'red'}
gradientDuoTone='pinkToOrange'
onClick={() => {
setOpenModal(true);
}}
Expand All @@ -84,8 +84,8 @@ export default function Customize() {
});
}}
></ResetToDefaultsAlert>
<div className='group col-span-1 m-auto flex items-center justify-start'>
<ChatPopupFrame hide={false} setHide={() => {}} />
<div className='group col-span-1 flex max-h-[400vh] items-start justify-start'>
<ChatPage short={true} />
</div>
</div>
</div>
Expand Down
11 changes: 6 additions & 5 deletions src/app/assistants/[id]/integrate/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ChatAgentContextWrapper from '@/app/assistants/[id]/chat/ChatAgentContext
import { Button, Table } from 'flowbite-react';
import ChatWindowContextWrapper from '@/app/assistants/[id]/chat/ChatWindowContextWrapper';
import ChatPopupContextWrapper from '@/app/assistants/[id]/chat/ChatPopupContextWrapper';
import { HiLibrary, HiLink, HiPlus } from 'react-icons/hi';
import { HiChatAlt2, HiLibrary, HiLink, HiPlus } from 'react-icons/hi';
import Link from 'next/link';

export default function Customize() {
Expand Down Expand Up @@ -37,10 +37,11 @@ export default function Customize() {
<div className='bg-white'>
<Link href={`/link/${assistant.id}`} target='_blank'>
<Button
className='float-right'
gradientDuoTone='purpleToBlue'
gradientDuoTone='greenToBlue'
className={'float-right mr-2 w-[150px]'}
>
<HiLink className='mr-2 h-5 w-5' /> Go to Assistant
<HiChatAlt2 className={'h-5 w-5'} />
Try Assistant
</Button>
</Link>
</div>
Expand Down Expand Up @@ -109,7 +110,7 @@ export default function Customize() {
</div>
</Table.Cell>
<Table.Cell className='bg-white dark:border-gray-700 dark:bg-gray-800'>
<div className='bg-white'>
<div className='max-h-[900px] bg-white'>
<ChatPopupContextWrapper />
</div>
</Table.Cell>
Expand Down

0 comments on commit 5e491ee

Please sign in to comment.