|
|
@ -1,5 +1,6 @@
|
|
|
|
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';
|
|
|
|
|
|
|
|
|
|
|
@ -9,6 +10,10 @@ 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 StyledTimerNotificationContainer = styled.div`
|
|
|
|
|
|
|
|
padding: 0 var(--margins-lg) 0;
|
|
|
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
|
|
export const TimerNotification = (props: PropsForExpirationTimer) => {
|
|
|
|
export const TimerNotification = (props: PropsForExpirationTimer) => {
|
|
|
|
const { messageId, pubkey, profileName, expirationMode, timespan, type, disabled } = props;
|
|
|
|
const { messageId, pubkey, profileName, expirationMode, timespan, type, disabled } = props;
|
|
|
|
|
|
|
|
|
|
|
@ -46,6 +51,7 @@ export const TimerNotification = (props: PropsForExpirationTimer) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
|
|
|
|
<StyledTimerNotificationContainer>
|
|
|
|
<ExpirableReadableMessage
|
|
|
|
<ExpirableReadableMessage
|
|
|
|
messageId={messageId}
|
|
|
|
messageId={messageId}
|
|
|
|
isCentered={true}
|
|
|
|
isCentered={true}
|
|
|
@ -68,5 +74,6 @@ export const TimerNotification = (props: PropsForExpirationTimer) => {
|
|
|
|
<Text text={textToRender} />
|
|
|
|
<Text text={textToRender} />
|
|
|
|
</Flex>
|
|
|
|
</Flex>
|
|
|
|
</ExpirableReadableMessage>
|
|
|
|
</ExpirableReadableMessage>
|
|
|
|
|
|
|
|
</StyledTimerNotificationContainer>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|