mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
b8ef6c2cc6
Added friends section in search. This is because contacts is now used in signal for something else and we don't want to clash meanings. Styling fixes Add dropdown options into mainheader Updated styling Restore StartNewConversation to the old ui style of loki messenger. Fix friend search display. Fix header expand animation. Hooked up menu actions. Linting. More styling changes. Fix tests. Added back in the loki logo below the gutter. Fix toast positioning. Fix context menu showing incorrectly on virtual lists. Added tabs. Linting
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import React from 'react';
|
|
import classNames from 'classnames';
|
|
|
|
import { LocalizerType } from '../types/Util';
|
|
import { validateNumber } from '../types/PhoneNumber';
|
|
|
|
export interface Props {
|
|
phoneNumber: string;
|
|
i18n: LocalizerType;
|
|
onClick: () => void;
|
|
}
|
|
|
|
export class StartNewConversation extends React.PureComponent<Props> {
|
|
public render() {
|
|
const { phoneNumber, i18n, onClick } = this.props;
|
|
|
|
const error = validateNumber(phoneNumber, i18n);
|
|
const avatar = error ? '!' : '#';
|
|
const click = error ? undefined : onClick;
|
|
|
|
return (
|
|
<div
|
|
role="button"
|
|
className={classNames(
|
|
'module-start-new-conversation',
|
|
!error && 'valid'
|
|
)}
|
|
onClick={click}
|
|
>
|
|
<div className="module-start-new-conversation__avatar">{avatar}</div>
|
|
<div className="module-start-new-conversation__content">
|
|
<div className="module-start-new-conversation__number">
|
|
{phoneNumber}
|
|
</div>
|
|
<div className="module-start-new-conversation__text">
|
|
{error || i18n('startConversation')}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|