2018-07-09 14:29:13 -07:00
|
|
|
### Name variations, 1:1 conversation
|
|
|
|
|
2019-08-09 16:12:29 -07:00
|
|
|
Note the five items in menu, and the second-level menu with disappearing messages options. Disappearing message set to 'off'.
|
2018-07-09 14:29:13 -07:00
|
|
|
|
|
|
|
#### With name and profile, verified
|
|
|
|
|
|
|
|
```jsx
|
2019-01-30 17:45:58 -08:00
|
|
|
<util.ConversationContext theme={util.theme}>
|
|
|
|
<ConversationHeader
|
|
|
|
i18n={util.i18n}
|
|
|
|
color="red"
|
|
|
|
isVerified={true}
|
|
|
|
avatarPath={util.gifObjectUrl}
|
|
|
|
name="Someone 🔥 Somewhere"
|
|
|
|
phoneNumber="(202) 555-0001"
|
|
|
|
id="1"
|
|
|
|
profileName="🔥Flames🔥"
|
|
|
|
onSetDisappearingMessages={seconds =>
|
|
|
|
console.log('onSetDisappearingMessages', seconds)
|
|
|
|
}
|
|
|
|
onDeleteMessages={() => console.log('onDeleteMessages')}
|
|
|
|
onResetSession={() => console.log('onResetSession')}
|
|
|
|
onShowSafetyNumber={() => console.log('onShowSafetyNumber')}
|
|
|
|
onShowAllMedia={() => console.log('onShowAllMedia')}
|
|
|
|
onShowGroupMembers={() => console.log('onShowGroupMembers')}
|
|
|
|
onGoBack={() => console.log('onGoBack')}
|
2019-08-09 16:12:29 -07:00
|
|
|
onSearchInConversation={() => console.log('onSearchInConversation')}
|
2019-01-30 17:45:58 -08:00
|
|
|
/>
|
|
|
|
</util.ConversationContext>
|
2018-07-09 14:29:13 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
#### With name, not verified, no avatar
|
|
|
|
|
|
|
|
```jsx
|
2019-01-30 17:45:58 -08:00
|
|
|
<util.ConversationContext theme={util.theme}>
|
|
|
|
<ConversationHeader
|
|
|
|
i18n={util.i18n}
|
|
|
|
color="blue"
|
|
|
|
isVerified={false}
|
|
|
|
name="Someone 🔥 Somewhere"
|
|
|
|
phoneNumber="(202) 555-0002"
|
|
|
|
id="2"
|
|
|
|
/>
|
|
|
|
</util.ConversationContext>
|
2018-07-09 14:29:13 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
#### Profile, no name
|
|
|
|
|
|
|
|
```jsx
|
2019-01-30 17:45:58 -08:00
|
|
|
<util.ConversationContext theme={util.theme}>
|
|
|
|
<ConversationHeader
|
|
|
|
i18n={util.i18n}
|
|
|
|
color="teal"
|
|
|
|
isVerified={false}
|
|
|
|
phoneNumber="(202) 555-0003"
|
|
|
|
id="3"
|
|
|
|
profileName="🔥Flames🔥"
|
|
|
|
/>
|
|
|
|
</util.ConversationContext>
|
2018-07-09 14:29:13 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
#### No name, no profile, no color
|
|
|
|
|
|
|
|
```jsx
|
2019-01-30 17:45:58 -08:00
|
|
|
<util.ConversationContext theme={util.theme}>
|
|
|
|
<ConversationHeader i18n={util.i18n} phoneNumber="(202) 555-0011" id="11" />
|
|
|
|
</util.ConversationContext>
|
2018-07-09 14:29:13 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
### With back button
|
|
|
|
|
|
|
|
```jsx
|
2019-01-30 17:45:58 -08:00
|
|
|
<util.ConversationContext theme={util.theme}>
|
|
|
|
<ConversationHeader
|
|
|
|
showBackButton={true}
|
|
|
|
color="deep_orange"
|
|
|
|
i18n={util.i18n}
|
|
|
|
phoneNumber="(202) 555-0004"
|
|
|
|
id="4"
|
|
|
|
/>
|
|
|
|
</util.ConversationContext>
|
2018-07-09 14:29:13 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
### Disappearing messages set
|
|
|
|
|
|
|
|
```jsx
|
2019-01-30 17:45:58 -08:00
|
|
|
<util.ConversationContext theme={util.theme}>
|
|
|
|
<ConversationHeader
|
|
|
|
color="indigo"
|
|
|
|
i18n={util.i18n}
|
|
|
|
phoneNumber="(202) 555-0005"
|
|
|
|
id="5"
|
|
|
|
expirationSettingName="10 seconds"
|
|
|
|
timerOptions={[
|
|
|
|
{
|
|
|
|
name: 'off',
|
|
|
|
value: 0,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '10 seconds',
|
|
|
|
value: 10,
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
onSetDisappearingMessages={seconds =>
|
|
|
|
console.log('onSetDisappearingMessages', seconds)
|
|
|
|
}
|
|
|
|
onDeleteMessages={() => console.log('onDeleteMessages')}
|
|
|
|
onResetSession={() => console.log('onResetSession')}
|
|
|
|
onShowSafetyNumber={() => console.log('onShowSafetyNumber')}
|
|
|
|
onShowAllMedia={() => console.log('onShowAllMedia')}
|
|
|
|
onShowGroupMembers={() => console.log('onShowGroupMembers')}
|
|
|
|
onGoBack={() => console.log('onGoBack')}
|
|
|
|
/>
|
|
|
|
</util.ConversationContext>
|
2018-07-09 14:29:13 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
### In a group
|
|
|
|
|
|
|
|
Note that the menu should includes 'Show Members' instead of 'Show Safety Number'
|
|
|
|
|
|
|
|
```jsx
|
2019-01-30 17:45:58 -08:00
|
|
|
<util.ConversationContext theme={util.theme}>
|
|
|
|
<ConversationHeader
|
|
|
|
i18n={util.i18n}
|
|
|
|
color="green"
|
|
|
|
phoneNumber="(202) 555-0006"
|
|
|
|
id="6"
|
|
|
|
isGroup={true}
|
|
|
|
onSetDisappearingMessages={seconds =>
|
|
|
|
console.log('onSetDisappearingMessages', seconds)
|
|
|
|
}
|
|
|
|
onDeleteMessages={() => console.log('onDeleteMessages')}
|
|
|
|
onResetSession={() => console.log('onResetSession')}
|
|
|
|
onShowSafetyNumber={() => console.log('onShowSafetyNumber')}
|
|
|
|
onShowAllMedia={() => console.log('onShowAllMedia')}
|
|
|
|
onShowGroupMembers={() => console.log('onShowGroupMembers')}
|
|
|
|
onGoBack={() => console.log('onGoBack')}
|
|
|
|
/>
|
|
|
|
</util.ConversationContext>
|
2018-07-09 14:29:13 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
### In chat with yourself
|
|
|
|
|
2019-01-30 17:45:58 -08:00
|
|
|
This is the 'Note to self' conversation. Note that the menu should not have a 'Show Safety Number' entry.
|
2018-07-09 14:29:13 -07:00
|
|
|
|
|
|
|
```jsx
|
2019-01-30 17:45:58 -08:00
|
|
|
<util.ConversationContext theme={util.theme}>
|
|
|
|
<ConversationHeader
|
|
|
|
color="cyan"
|
|
|
|
i18n={util.i18n}
|
|
|
|
phoneNumber="(202) 555-0007"
|
|
|
|
id="7"
|
|
|
|
isMe={true}
|
|
|
|
/>
|
|
|
|
</util.ConversationContext>
|
2018-07-09 14:29:13 -07:00
|
|
|
```
|