ChatsPage: add settings cog
This commit is contained in:
parent
f8199ab701
commit
de78926142
|
@ -9,6 +9,7 @@ import { useChat } from 'soapbox/queries/chats';
|
||||||
import ChatPageMain from './components/chat-page-main';
|
import ChatPageMain from './components/chat-page-main';
|
||||||
import ChatPageNew from './components/chat-page-new';
|
import ChatPageNew from './components/chat-page-new';
|
||||||
import ChatPageSidebar from './components/chat-page-sidebar';
|
import ChatPageSidebar from './components/chat-page-sidebar';
|
||||||
|
import Welcome from './components/welcome';
|
||||||
|
|
||||||
interface IChatPage {
|
interface IChatPage {
|
||||||
chatId?: string,
|
chatId?: string,
|
||||||
|
@ -78,6 +79,9 @@ const ChatPage: React.FC<IChatPage> = ({ chatId }) => {
|
||||||
<Route path='/chats/new'>
|
<Route path='/chats/new'>
|
||||||
<ChatPageNew />
|
<ChatPageNew />
|
||||||
</Route>
|
</Route>
|
||||||
|
<Route path='/chats/settings'>
|
||||||
|
<Welcome />
|
||||||
|
</Route>
|
||||||
<Route>
|
<Route>
|
||||||
<ChatPageMain />
|
<ChatPageMain />
|
||||||
</Route>
|
</Route>
|
||||||
|
|
|
@ -33,18 +33,30 @@ const ChatPageSidebar = () => {
|
||||||
history.push('/chats/new');
|
history.push('/chats/new');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleSettingsClick = () => {
|
||||||
|
history.push('/chats/settings');
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack space={4} className='h-full'>
|
<Stack space={4} className='h-full'>
|
||||||
<Stack space={4} className='px-4 pt-4'>
|
<Stack space={4} className='px-4 pt-4'>
|
||||||
<HStack alignItems='center' justifyContent='between'>
|
<HStack alignItems='center' justifyContent='between'>
|
||||||
<CardTitle title={intl.formatMessage(messages.title)} />
|
<CardTitle title={intl.formatMessage(messages.title)} />
|
||||||
|
|
||||||
|
<HStack space={1}>
|
||||||
|
<IconButton
|
||||||
|
src={require('@tabler/icons/settings.svg')}
|
||||||
|
iconClassName='w-5 h-5 text-gray-600'
|
||||||
|
onClick={handleSettingsClick}
|
||||||
|
/>
|
||||||
|
|
||||||
<IconButton
|
<IconButton
|
||||||
src={require('@tabler/icons/edit.svg')}
|
src={require('@tabler/icons/edit.svg')}
|
||||||
iconClassName='w-5 h-5 text-gray-600'
|
iconClassName='w-5 h-5 text-gray-600'
|
||||||
onClick={handleChatCreate}
|
onClick={handleChatCreate}
|
||||||
/>
|
/>
|
||||||
</HStack>
|
</HStack>
|
||||||
|
</HStack>
|
||||||
|
|
||||||
{features.chatsSearch && (
|
{features.chatsSearch && (
|
||||||
<ChatSearchInput
|
<ChatSearchInput
|
||||||
|
|
|
@ -244,6 +244,7 @@ const SwitchingColumnsArea: React.FC = ({ children }) => {
|
||||||
|
|
||||||
{features.chats && <WrappedRoute path='/chats' exact page={ChatsPage} component={ChatIndex} content={children} />}
|
{features.chats && <WrappedRoute path='/chats' exact page={ChatsPage} component={ChatIndex} content={children} />}
|
||||||
{features.chats && <WrappedRoute path='/chats/new' page={ChatsPage} component={ChatIndex} content={children} />}
|
{features.chats && <WrappedRoute path='/chats/new' page={ChatsPage} component={ChatIndex} content={children} />}
|
||||||
|
{features.chats && <WrappedRoute path='/chats/settings' page={ChatsPage} component={ChatIndex} content={children} />}
|
||||||
{features.chats && <WrappedRoute path='/chats/:chatId' page={ChatsPage} component={ChatIndex} content={children} />}
|
{features.chats && <WrappedRoute path='/chats/:chatId' page={ChatsPage} component={ChatIndex} content={children} />}
|
||||||
|
|
||||||
<WrappedRoute path='/follow_requests' page={DefaultPage} component={FollowRequests} content={children} />
|
<WrappedRoute path='/follow_requests' page={DefaultPage} component={FollowRequests} content={children} />
|
||||||
|
|
Loading…
Reference in New Issue