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 ChatPageNew from './components/chat-page-new';
|
||||
import ChatPageSidebar from './components/chat-page-sidebar';
|
||||
import Welcome from './components/welcome';
|
||||
|
||||
interface IChatPage {
|
||||
chatId?: string,
|
||||
|
@ -78,6 +79,9 @@ const ChatPage: React.FC<IChatPage> = ({ chatId }) => {
|
|||
<Route path='/chats/new'>
|
||||
<ChatPageNew />
|
||||
</Route>
|
||||
<Route path='/chats/settings'>
|
||||
<Welcome />
|
||||
</Route>
|
||||
<Route>
|
||||
<ChatPageMain />
|
||||
</Route>
|
||||
|
|
|
@ -33,17 +33,29 @@ const ChatPageSidebar = () => {
|
|||
history.push('/chats/new');
|
||||
};
|
||||
|
||||
const handleSettingsClick = () => {
|
||||
history.push('/chats/settings');
|
||||
};
|
||||
|
||||
return (
|
||||
<Stack space={4} className='h-full'>
|
||||
<Stack space={4} className='px-4 pt-4'>
|
||||
<HStack alignItems='center' justifyContent='between'>
|
||||
<CardTitle title={intl.formatMessage(messages.title)} />
|
||||
|
||||
<IconButton
|
||||
src={require('@tabler/icons/edit.svg')}
|
||||
iconClassName='w-5 h-5 text-gray-600'
|
||||
onClick={handleChatCreate}
|
||||
/>
|
||||
<HStack space={1}>
|
||||
<IconButton
|
||||
src={require('@tabler/icons/settings.svg')}
|
||||
iconClassName='w-5 h-5 text-gray-600'
|
||||
onClick={handleSettingsClick}
|
||||
/>
|
||||
|
||||
<IconButton
|
||||
src={require('@tabler/icons/edit.svg')}
|
||||
iconClassName='w-5 h-5 text-gray-600'
|
||||
onClick={handleChatCreate}
|
||||
/>
|
||||
</HStack>
|
||||
</HStack>
|
||||
|
||||
{features.chatsSearch && (
|
||||
|
|
|
@ -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/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} />}
|
||||
|
||||
<WrappedRoute path='/follow_requests' page={DefaultPage} component={FollowRequests} content={children} />
|
||||
|
|
Loading…
Reference in New Issue