fix: group invitation timer alignment

updated data extraction notification design. Just waiting on icon from ios
pull/2971/head
William Grant 2 years ago
parent 5d94424e39
commit ca944298e0

@ -9,71 +9,3 @@
padding-inline-start: 10px; padding-inline-start: 10px;
padding-inline-end: 10px; padding-inline-end: 10px;
} }
.group-invitation-container {
display: flex;
flex-direction: column;
}
.group-invitation {
background-color: var(--message-bubbles-received-background-color);
&.invitation-outgoing {
background-color: var(--message-bubbles-sent-background-color);
align-self: flex-end;
.contents {
.session-icon-button {
background-color: var(--transparent-color);
}
}
}
display: inline-block;
margin: 4px 16px;
padding: 4px;
border-radius: var(--border-radius-message-box);
align-self: flex-start;
box-shadow: none;
.contents {
display: flex;
align-items: center;
margin: 6px;
.invite-group-avatar {
height: 48px;
width: 48px;
}
.group-details {
display: inline-flex;
flex-direction: column;
padding: 0px 12px;
.group-name {
font-weight: bold;
font-size: 18px;
}
}
.session-icon-button {
background-color: var(--primary-color);
}
}
}
.group-invitation {
.group-details {
color: var(--message-bubbles-received-text-color);
}
}
.group-invitation.invitation-outgoing {
.group-details {
color: var(--message-bubbles-sent-text-color);
}
}

@ -1,6 +1,5 @@
import React from 'react'; import React from 'react';
import styled from 'styled-components';
import { PropsForExpirationTimer } from '../../state/ducks/conversations'; import { PropsForExpirationTimer } from '../../state/ducks/conversations';
import { assertUnreachable } from '../../types/sqlSharedTypes'; import { assertUnreachable } from '../../types/sqlSharedTypes';
@ -10,10 +9,6 @@ import { SpacerSM, Text } from '../basic/Text';
import { Flex } from '../basic/Flex'; import { Flex } from '../basic/Flex';
import { isLegacyDisappearingModeEnabled } from '../../util/expiringMessages'; import { isLegacyDisappearingModeEnabled } from '../../util/expiringMessages';
const StyledTimerNotification = styled(Flex)`
text-align: center;
`;
export const TimerNotification = (props: PropsForExpirationTimer) => { export const TimerNotification = (props: PropsForExpirationTimer) => {
const { messageId, pubkey, profileName, expirationType, timespan, type, disabled } = props; const { messageId, pubkey, profileName, expirationType, timespan, type, disabled } = props;
@ -59,7 +54,7 @@ export const TimerNotification = (props: PropsForExpirationTimer) => {
key={`readable-message-${messageId}`} key={`readable-message-${messageId}`}
dataTestId={'disappear-control-message'} dataTestId={'disappear-control-message'}
> >
<StyledTimerNotification <Flex
container={true} container={true}
flexDirection="column" flexDirection="column"
alignItems="center" alignItems="center"
@ -68,11 +63,12 @@ export const TimerNotification = (props: PropsForExpirationTimer) => {
maxWidth="700px" maxWidth="700px"
margin="10px auto" margin="10px auto"
padding="5px 10px" padding="5px 10px"
style={{ textAlign: 'center' }}
> >
<SessionIcon iconType="stopwatch" iconColor="inherit" iconSize="medium" /> <SessionIcon iconType="stopwatch" iconColor="inherit" iconSize="medium" />
<SpacerSM /> <SpacerSM />
<Text text={textToRender} /> <Text text={textToRender} />
</StyledTimerNotification> </Flex>
</ExpirableReadableMessage> </ExpirableReadableMessage>
); );
}; };

@ -17,18 +17,27 @@ export const DataExtractionNotification = (props: PropsForDataExtractionNotifica
} }
return ( return (
<ExpirableReadableMessage messageId={messageId} key={`readable-message-${messageId}`}> <ExpirableReadableMessage
messageId={messageId}
marginInlineStart={'calc(var(--margins-lg) + 6px)'}
marginInlineEnd={'calc(var(--margins-lg) + 6px)'}
key={`readable-message-${messageId}`}
>
<Flex <Flex
container={true} container={true}
flexDirection="row" flexDirection="column"
alignItems="center" alignItems="center"
justifyContent="center" justifyContent="center"
margin={'var(--margins-sm)'} width="90%"
maxWidth="700px"
margin="10px auto"
padding="5px 10px"
id={`msg-${messageId}`} id={`msg-${messageId}`}
style={{ textAlign: 'center' }}
> >
<SessionIcon iconType="upload" iconSize="small" iconRotation={180} /> <SessionIcon iconType="upload" iconColor="inherit" iconSize="medium" iconRotation={180} />
<SpacerSM /> <SpacerSM />
<Text text={contentText} subtle={true} ellipsisOverflow={true} /> <Text text={contentText} ellipsisOverflow={true} />
</Flex> </Flex>
</ExpirableReadableMessage> </ExpirableReadableMessage>
); );

@ -6,6 +6,62 @@ import { acceptOpenGroupInvitation } from '../../../../interactions/messageInter
import { PropsForGroupInvitation } from '../../../../state/ducks/conversations'; import { PropsForGroupInvitation } from '../../../../state/ducks/conversations';
import { SessionIconButton } from '../../../icon'; import { SessionIconButton } from '../../../icon';
import { ExpirableReadableMessage } from './ExpirableReadableMessage'; import { ExpirableReadableMessage } from './ExpirableReadableMessage';
import { Flex } from '../../../basic/Flex';
const StyledGroupInvitation = styled.div`
background-color: var(--message-bubbles-received-background-color);
&.invitation-outgoing {
background-color: var(--message-bubbles-sent-background-color);
align-self: flex-end;
.contents {
.group-details {
color: var(--message-bubbles-sent-text-color);
}
.session-icon-button {
background-color: var(--transparent-color);
}
}
}
display: inline-block;
margin: 4px 16px;
padding: 4px;
border-radius: var(--border-radius-message-box);
align-self: flex-start;
box-shadow: none;
.contents {
display: flex;
align-items: center;
margin: 6px;
.invite-group-avatar {
height: 48px;
width: 48px;
}
.group-details {
display: inline-flex;
flex-direction: column;
color: var(--message-bubbles-received-text-color);
padding: 0px 12px;
.group-name {
font-weight: bold;
font-size: 18px;
}
}
.session-icon-button {
background-color: var(--primary-color);
}
}
`;
const StyledIconContainer = styled.div` const StyledIconContainer = styled.div`
background-color: var(--message-link-preview-background-color); background-color: var(--message-link-preview-background-color);
@ -23,8 +79,8 @@ export const GroupInvitation = (props: PropsForGroupInvitation) => {
return ( return (
<ExpirableReadableMessage messageId={messageId} key={`readable-message-${messageId}`}> <ExpirableReadableMessage messageId={messageId} key={`readable-message-${messageId}`}>
<div className="group-invitation-container" id={`msg-${props.messageId}`}> <Flex container={true} flexDirection={'column'} flexGrow={1} id={`msg-${props.messageId}`}>
<div className={classNames(classes)}> <StyledGroupInvitation className={classNames(classes)}>
<div className="contents"> <div className="contents">
<StyledIconContainer> <StyledIconContainer>
<SessionIconButton <SessionIconButton
@ -46,8 +102,8 @@ export const GroupInvitation = (props: PropsForGroupInvitation) => {
<span className="group-address">{props.url}</span> <span className="group-address">{props.url}</span>
</span> </span>
</div> </div>
</div> </StyledGroupInvitation>
</div> </Flex>
</ExpirableReadableMessage> </ExpirableReadableMessage>
); );
}; };

Loading…
Cancel
Save