Move link notification to the conversation hero
This commit is contained in:
parent
5f3a62cbb6
commit
2f44e33c9c
26 changed files with 174 additions and 350 deletions
|
@ -204,6 +204,9 @@ export const ConversationHero = ({
|
|||
phoneNumber,
|
||||
sharedGroupNames,
|
||||
})}
|
||||
<div className="module-conversation-hero__linkNotification">
|
||||
{i18n('messageHistoryUnsynced')}
|
||||
</div>
|
||||
</div>
|
||||
{isShowingMessageRequestWarning && (
|
||||
<ConfirmationDialog
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
import { storiesOf } from '@storybook/react';
|
||||
import { setupI18n } from '../../util/setupI18n';
|
||||
import enMessages from '../../../_locales/en/messages.json';
|
||||
|
||||
import { LinkNotification } from './LinkNotification';
|
||||
|
||||
const story = storiesOf('Components/Conversation/LinkNotification', module);
|
||||
|
||||
const i18n = setupI18n('en', enMessages);
|
||||
|
||||
story.add('Default', () => <LinkNotification i18n={i18n} />);
|
|
@ -1,13 +0,0 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
import { SystemMessage } from './SystemMessage';
|
||||
import type { LocalizerType } from '../../types/Util';
|
||||
|
||||
export const LinkNotification = ({
|
||||
i18n,
|
||||
}: Readonly<{ i18n: LocalizerType }>): JSX.Element => (
|
||||
<SystemMessage icon="unsynced" contents={i18n('messageHistoryUnsynced')} />
|
||||
);
|
|
@ -337,11 +337,6 @@ const items: Record<string, TimelineItemType> = {
|
|||
},
|
||||
timestamp: Date.now(),
|
||||
},
|
||||
'id-15': {
|
||||
type: 'linkNotification',
|
||||
data: null,
|
||||
timestamp: Date.now(),
|
||||
},
|
||||
};
|
||||
|
||||
const actions = () => ({
|
||||
|
|
|
@ -417,10 +417,6 @@ storiesOf('Components/Conversation/TimelineItem', module)
|
|||
startedTime: Date.now(),
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'linkNotification',
|
||||
data: null,
|
||||
},
|
||||
{
|
||||
type: 'profileChange',
|
||||
data: {
|
||||
|
|
|
@ -23,7 +23,6 @@ import type {
|
|||
PropsDataType as DeliveryIssueProps,
|
||||
} from './DeliveryIssueNotification';
|
||||
import { DeliveryIssueNotification } from './DeliveryIssueNotification';
|
||||
import { LinkNotification } from './LinkNotification';
|
||||
import type { PropsData as ChangeNumberNotificationProps } from './ChangeNumberNotification';
|
||||
import { ChangeNumberNotification } from './ChangeNumberNotification';
|
||||
import type { CallingNotificationType } from '../../util/callingNotification';
|
||||
|
@ -69,10 +68,6 @@ type DeliveryIssueType = {
|
|||
type: 'deliveryIssue';
|
||||
data: DeliveryIssueProps;
|
||||
};
|
||||
type LinkNotificationType = {
|
||||
type: 'linkNotification';
|
||||
data: null;
|
||||
};
|
||||
type MessageType = {
|
||||
type: 'message';
|
||||
data: Omit<MessageProps, 'renderingContext'>;
|
||||
|
@ -129,7 +124,6 @@ export type TimelineItemType = (
|
|||
| GroupNotificationType
|
||||
| GroupV1MigrationType
|
||||
| GroupV2ChangeType
|
||||
| LinkNotificationType
|
||||
| MessageType
|
||||
| ProfileChangeNotificationType
|
||||
| ResetSessionNotificationType
|
||||
|
@ -261,8 +255,6 @@ export class TimelineItem extends React.PureComponent<PropsType> {
|
|||
i18n={i18n}
|
||||
/>
|
||||
);
|
||||
} else if (item.type === 'linkNotification') {
|
||||
notification = <LinkNotification i18n={i18n} />;
|
||||
} else if (item.type === 'timerNotification') {
|
||||
notification = (
|
||||
<TimerNotification {...this.props} {...item.data} i18n={i18n} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue