Outgoing call: Show safety number dialog if change detected
This commit is contained in:
parent
45d829e439
commit
25dabd56fd
6 changed files with 61 additions and 12 deletions
|
@ -64,6 +64,21 @@ storiesOf('Components/SafetyNumberChangeDialog', module)
|
|||
/>
|
||||
);
|
||||
})
|
||||
.add('Different Confirmation Text', () => {
|
||||
return (
|
||||
<SafetyNumberChangeDialog
|
||||
confirmText="You are awesome"
|
||||
contacts={[contactWithAllData]}
|
||||
i18n={i18n}
|
||||
onCancel={action('cancel')}
|
||||
onConfirm={action('confirm')}
|
||||
renderSafetyNumber={() => {
|
||||
action('renderSafetyNumber');
|
||||
return <div>This is a mock Safety Number View</div>;
|
||||
}}
|
||||
/>
|
||||
);
|
||||
})
|
||||
.add('Multi Contact Dialog', () => {
|
||||
return (
|
||||
<SafetyNumberChangeDialog
|
||||
|
|
|
@ -13,6 +13,7 @@ type SafetyNumberProps = {
|
|||
};
|
||||
|
||||
export type Props = {
|
||||
readonly confirmText?: string;
|
||||
readonly contacts: Array<ConversationType>;
|
||||
readonly i18n: LocalizerType;
|
||||
readonly onCancel: () => void;
|
||||
|
@ -25,6 +26,7 @@ type SafetyDialogContentProps = Props & {
|
|||
};
|
||||
|
||||
const SafetyDialogContents = ({
|
||||
confirmText,
|
||||
contacts,
|
||||
i18n,
|
||||
onCancel,
|
||||
|
@ -107,7 +109,7 @@ const SafetyDialogContents = ({
|
|||
onClick={onConfirm}
|
||||
tabIndex={0}
|
||||
>
|
||||
{i18n('sendMessageToContact')}
|
||||
{confirmText || i18n('sendMessageToContact')}
|
||||
</button>
|
||||
</div>
|
||||
</>
|
||||
|
|
|
@ -825,7 +825,7 @@
|
|||
"rule": "jQuery-$(",
|
||||
"path": "js/views/safety_number_change_dialog_view.js",
|
||||
"line": " this.$('.safety-number-change-dialog-wrapper').append(dialog.el);",
|
||||
"lineNumber": 36,
|
||||
"lineNumber": 37,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-06-23T06:48:06.829Z"
|
||||
},
|
||||
|
@ -833,7 +833,7 @@
|
|||
"rule": "jQuery-append(",
|
||||
"path": "js/views/safety_number_change_dialog_view.js",
|
||||
"line": " this.$('.safety-number-change-dialog-wrapper').append(dialog.el);",
|
||||
"lineNumber": 36,
|
||||
"lineNumber": 37,
|
||||
"reasonCategory": "usageTrusted",
|
||||
"updated": "2020-06-23T06:48:06.829Z"
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue