-
Notifications
You must be signed in to change notification settings - Fork 703
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dual output toggle to the source selector bar. (#5070)
* Add dual output toggle to the source selector bar. * Toggle off without open settings, fix selective recording dual output logic, fix toggle colors. * Replace toggle title. * Fix dual output toggle icon svg. * Fix toggle dual output from video settings. * Fixes for tests and code review notes. * Remove subscription for selective recording message.
- Loading branch information
1 parent
719d7ca
commit 5d658f6
Showing
18 changed files
with
316 additions
and
129 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.auth-modal-wrapper { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
z-index: 1003 !important; // show above resize bars | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 80%; | ||
width: 100%; | ||
} | ||
|
||
.auth-modal { | ||
h2 { | ||
align-self: flex-start; | ||
} | ||
|
||
.buttons { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: flex-end; | ||
margin-top: 15px; | ||
width: 100%; | ||
|
||
button:not(:last-child) { | ||
margin-right: 5px; | ||
} | ||
} | ||
} |
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,45 @@ | ||
import React, { CSSProperties } from 'react'; | ||
import { Button, Form, Modal } from 'antd'; | ||
import styles from './AuthModal.m.less'; | ||
import { $t } from 'services/i18n'; | ||
import { Services } from 'components-react/service-provider'; | ||
import cx from 'classnames'; | ||
|
||
interface AuthModalProps { | ||
showModal: boolean; | ||
prompt: string; | ||
handleAuth: () => void; | ||
handleShowModal: (status: boolean) => void; | ||
title?: string; | ||
cancel?: string; | ||
confirm?: string; | ||
className?: string; | ||
style?: CSSProperties; | ||
id?: string; | ||
} | ||
|
||
export function AuthModal(p: AuthModalProps) { | ||
const title = p?.title || Services.UserService.isLoggedIn ? $t('Log Out') : $t('Login'); | ||
const prompt = p?.prompt; | ||
const confirm = p?.confirm || $t('Yes'); | ||
const cancel = p?.cancel || $t('No'); | ||
|
||
return ( | ||
<Modal | ||
footer={null} | ||
visible={p.showModal} | ||
onCancel={() => p.handleShowModal(false)} | ||
getContainer={false} | ||
className={cx(styles.authModalWrapper, p?.className)} | ||
> | ||
<Form id={p?.id} className={styles.authModal}> | ||
<h2>{title}</h2> | ||
{prompt} | ||
<div className={styles.buttons}> | ||
<Button onClick={p.handleAuth}>{confirm}</Button> | ||
<Button onClick={() => p.handleShowModal(false)}>{cancel}</Button> | ||
</div> | ||
</Form> | ||
</Modal> | ||
); | ||
} |
Oops, something went wrong.