Properly style call buttons across app, when already in a call
This commit is contained in:
parent
3c25092f50
commit
c251867699
39 changed files with 610 additions and 189 deletions
|
@ -29,6 +29,7 @@ export default {
|
|||
} satisfies Meta<PropsType>;
|
||||
|
||||
const getCommonProps = (options: {
|
||||
activeConversationId?: string;
|
||||
mode: CallMode;
|
||||
type?: CallType;
|
||||
direction?: CallDirection;
|
||||
|
@ -81,7 +82,7 @@ const getCommonProps = (options: {
|
|||
status,
|
||||
},
|
||||
callCreator,
|
||||
activeConversationId: null,
|
||||
activeConversationId: options.activeConversationId ?? null,
|
||||
groupCallEnded,
|
||||
maxDevices,
|
||||
deviceCount,
|
||||
|
@ -118,6 +119,42 @@ export function AcceptedIncomingAudioCall(): JSX.Element {
|
|||
);
|
||||
}
|
||||
|
||||
export function AcceptedIncomingAudioCallWithActiveCall(): JSX.Element {
|
||||
return (
|
||||
<CallingNotification
|
||||
{...getCommonProps({
|
||||
mode: CallMode.Direct,
|
||||
type: CallType.Audio,
|
||||
direction: CallDirection.Incoming,
|
||||
status: DirectCallStatus.Accepted,
|
||||
groupCallEnded: null,
|
||||
deviceCount: 0,
|
||||
maxDevices: Infinity,
|
||||
activeConversationId: 'someOtherConversation',
|
||||
})}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export function AcceptedIncomingAudioCallInCurrentCall(): JSX.Element {
|
||||
const props = getCommonProps({
|
||||
mode: CallMode.Direct,
|
||||
type: CallType.Audio,
|
||||
direction: CallDirection.Incoming,
|
||||
status: DirectCallStatus.Accepted,
|
||||
groupCallEnded: null,
|
||||
deviceCount: 0,
|
||||
maxDevices: Infinity,
|
||||
});
|
||||
|
||||
return (
|
||||
<CallingNotification
|
||||
{...props}
|
||||
activeConversationId={props.conversationId}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export function AcceptedIncomingVideoCall(): JSX.Element {
|
||||
return (
|
||||
<CallingNotification
|
||||
|
@ -374,6 +411,42 @@ export function GroupCallActiveCallFull(): JSX.Element {
|
|||
);
|
||||
}
|
||||
|
||||
export function GroupCallActiveInAnotherCall(): JSX.Element {
|
||||
return (
|
||||
<CallingNotification
|
||||
{...getCommonProps({
|
||||
mode: CallMode.Group,
|
||||
type: CallType.Group,
|
||||
direction: CallDirection.Incoming,
|
||||
status: GroupCallStatus.GenericGroupCall,
|
||||
groupCallEnded: false,
|
||||
deviceCount: 8,
|
||||
maxDevices: 10,
|
||||
activeConversationId: 'someOtherId',
|
||||
})}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export function GroupCallActiveInCurrentCall(): JSX.Element {
|
||||
const props = getCommonProps({
|
||||
mode: CallMode.Group,
|
||||
type: CallType.Group,
|
||||
direction: CallDirection.Incoming,
|
||||
status: GroupCallStatus.GenericGroupCall,
|
||||
groupCallEnded: false,
|
||||
deviceCount: 8,
|
||||
maxDevices: 10,
|
||||
});
|
||||
|
||||
return (
|
||||
<CallingNotification
|
||||
{...props}
|
||||
activeConversationId={props.conversationId}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export function GroupCallEnded(): JSX.Element {
|
||||
return (
|
||||
<CallingNotification
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue