Introduce Service Id Types
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
414c0a58d3
commit
366b875fd2
269 changed files with 5832 additions and 5550 deletions
|
@ -5,13 +5,14 @@ import * as React from 'react';
|
|||
import { times } from 'lodash';
|
||||
import { boolean } from '@storybook/addon-knobs';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { v4 as generateUuid } from 'uuid';
|
||||
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import type { PropsType } from './CallingLobby';
|
||||
import { CallingLobby } from './CallingLobby';
|
||||
import { setupI18n } from '../util/setupI18n';
|
||||
import { UUID } from '../types/UUID';
|
||||
import { generateAci } from '../types/ServiceId';
|
||||
import enMessages from '../../_locales/en/messages.json';
|
||||
import {
|
||||
getDefaultConversation,
|
||||
|
@ -65,8 +66,8 @@ const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => {
|
|||
overrideProps.me ||
|
||||
getDefaultConversation({
|
||||
color: AvatarColors[0],
|
||||
id: UUID.generate().toString(),
|
||||
uuid: UUID.generate().toString(),
|
||||
id: generateUuid(),
|
||||
uuid: generateAci(),
|
||||
}),
|
||||
onCallCanceled: action('on-call-canceled'),
|
||||
onJoinCall: action('on-join-call'),
|
||||
|
@ -116,8 +117,8 @@ export function NoCameraLocalAvatar(): JSX.Element {
|
|||
me: getDefaultConversation({
|
||||
avatarPath: '/fixtures/kitten-4-112-112.jpg',
|
||||
color: AvatarColors[0],
|
||||
id: UUID.generate().toString(),
|
||||
uuid: UUID.generate().toString(),
|
||||
id: generateUuid(),
|
||||
uuid: generateAci(),
|
||||
}),
|
||||
});
|
||||
return <CallingLobby {...props} />;
|
||||
|
@ -167,11 +168,11 @@ GroupCall1PeekedParticipant.story = {
|
|||
};
|
||||
|
||||
export function GroupCall1PeekedParticipantSelf(): JSX.Element {
|
||||
const uuid = UUID.generate().toString();
|
||||
const uuid = generateAci();
|
||||
const props = createProps({
|
||||
isGroupCall: true,
|
||||
me: getDefaultConversation({
|
||||
id: UUID.generate().toString(),
|
||||
id: generateUuid(),
|
||||
uuid,
|
||||
}),
|
||||
peekedParticipants: [fakePeekedParticipant({ title: 'Ash', uuid })],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue