mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-20 06:58:16 +03:00
Merge pull request #4357 from urbit/mp/chat/share
chat: add stubbed share banner
This commit is contained in:
commit
d7e34451ac
@ -9,6 +9,7 @@ import { useFileDrag } from '~/logic/lib/useDrag';
|
||||
import ChatWindow from './components/ChatWindow';
|
||||
import ChatInput from './components/ChatInput';
|
||||
import GlobalApi from '~/logic/api/global';
|
||||
import { ShareProfile } from '~/views/apps/chat/components/ShareProfile';
|
||||
import SubmitDragger from '~/views/components/SubmitDragger';
|
||||
import { useLocalStorageState } from '~/logic/lib/useLocalStorageState';
|
||||
import { Loading } from '~/views/components/Loading';
|
||||
@ -85,6 +86,7 @@ export function ChatResource(props: ChatResourceProps) {
|
||||
|
||||
return (
|
||||
<Col {...bind} height="100%" overflow="hidden" position="relative">
|
||||
<ShareProfile our={ourContact} />
|
||||
{dragging && <SubmitDragger />}
|
||||
<ChatWindow
|
||||
mailboxSize={5}
|
||||
|
30
pkg/interface/src/views/apps/chat/components/ShareProfile.js
Normal file
30
pkg/interface/src/views/apps/chat/components/ShareProfile.js
Normal file
@ -0,0 +1,30 @@
|
||||
import React from 'react';
|
||||
import { Box, Row, Text, BaseImage } from '@tlon/indigo-react';
|
||||
import { uxToHex } from '~/logic/lib/util';
|
||||
import { Sigil } from '~/logic/lib/sigil';
|
||||
|
||||
export const ShareProfile = (props) => {
|
||||
const image = (props?.our?.avatar)
|
||||
? <BaseImage src={props.our.avatar} width='24px' height='24px' borderRadius={2} style={{ objectFit: 'cover' }} />
|
||||
: <Row p={1} alignItems="center" borderRadius={2} backgroundColor={`#${uxToHex(props?.our?.color)}` || "#000000"}>
|
||||
<Sigil ship={window.ship} size={16} icon color={`#${uxToHex(props?.our?.color)}` || "#000000"} />
|
||||
</Row>;
|
||||
|
||||
return (
|
||||
<Row
|
||||
height="48px"
|
||||
alignItems="center"
|
||||
justifyContent="space-between"
|
||||
borderBottom={1}
|
||||
borderColor="washedGray"
|
||||
>
|
||||
<Row pl={3} alignItems="center">
|
||||
{image}
|
||||
<Text verticalAlign="middle" pl={2}>Share private profile?</Text>
|
||||
</Row>
|
||||
<Box pr={2}>
|
||||
<Text color="blue" bold cursor="pointer">Share</Text>
|
||||
</Box>
|
||||
</Row>
|
||||
);
|
||||
};
|
Loading…
Reference in New Issue
Block a user