-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add livekit call invite notication card and actions
- Loading branch information
1 parent
8906b93
commit 505c6c3
Showing
13 changed files
with
146 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...msgbyte.livekit/web/plugins/com.msgbyte.livekit/src/components/InviteCallNotification.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import { Translate } from '../translate'; | ||
import { IconBtn, UserNamePure } from '@capital/component'; | ||
|
||
const Root = styled.div` | ||
.actions { | ||
display: flex; | ||
gap: 8px; | ||
justify-content: flex-end; | ||
margin-top: 20px; | ||
} | ||
`; | ||
|
||
interface InviteCallNotificationProps { | ||
senderUserId: string; | ||
roomName: string; | ||
onJoin?: () => void; | ||
} | ||
const InviteCallNotification: React.FC<InviteCallNotificationProps> = | ||
React.memo((props) => { | ||
return ( | ||
<Root> | ||
<audio src="/audio/telephone.mp3" loop={true} autoPlay={true} /> | ||
<div> | ||
<b> | ||
<UserNamePure userId={props.senderUserId} /> | ||
</b>{' '} | ||
{Translate.inviteJoinCall} | ||
</div> | ||
<div className="actions"> | ||
<IconBtn icon="mdi:phone-in-talk" onClick={props.onJoin} /> | ||
</div> | ||
</Root> | ||
); | ||
}); | ||
InviteCallNotification.displayName = 'InviteCallNotification'; | ||
|
||
export default InviteCallNotification; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters