Put PTT behind 'feature flag'
AKA does the URL hash start with '#ptt' This will let us merge PTT back to the main branch
This commit is contained in:
parent
363f2340a0
commit
43d579744f
3 changed files with 8 additions and 6 deletions
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": false,
|
||||||
"editor.insertSpaces": true,
|
"editor.insertSpaces": true,
|
||||||
"editor.tabSize": 2
|
"editor.tabSize": 2
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ import { JoinExistingCallModal } from "./JoinExistingCallModal";
|
||||||
import { useHistory } from "react-router-dom";
|
import { useHistory } from "react-router-dom";
|
||||||
import { Headline, Title } from "../typography/Typography";
|
import { Headline, Title } from "../typography/Typography";
|
||||||
import { Form } from "../form/Form";
|
import { Form } from "../form/Form";
|
||||||
|
import { shouldShowPtt } from "../shouldShowPtt";
|
||||||
|
|
||||||
export function RegisteredView({ client }) {
|
export function RegisteredView({ client }) {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
@ -98,14 +99,14 @@ export function RegisteredView({ client }) {
|
||||||
{loading ? "Loading..." : "Go"}
|
{loading ? "Loading..." : "Go"}
|
||||||
</Button>
|
</Button>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
<FieldRow className={styles.fieldRow}>
|
{shouldShowPtt() && <FieldRow className={styles.fieldRow}>
|
||||||
<InputField
|
<InputField
|
||||||
id="ptt"
|
id="ptt"
|
||||||
name="ptt"
|
name="ptt"
|
||||||
label="Push to Talk"
|
label="Push to Talk"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
/>
|
/>
|
||||||
</FieldRow>
|
</FieldRow>}
|
||||||
{error && (
|
{error && (
|
||||||
<FieldRow className={styles.fieldRow}>
|
<FieldRow className={styles.fieldRow}>
|
||||||
<ErrorMessage>{error.message}</ErrorMessage>
|
<ErrorMessage>{error.message}</ErrorMessage>
|
||||||
|
|
|
@ -15,6 +15,7 @@ import { Form } from "../form/Form";
|
||||||
import styles from "./UnauthenticatedView.module.css";
|
import styles from "./UnauthenticatedView.module.css";
|
||||||
import commonStyles from "./common.module.css";
|
import commonStyles from "./common.module.css";
|
||||||
import { generateRandomName } from "../auth/generateRandomName";
|
import { generateRandomName } from "../auth/generateRandomName";
|
||||||
|
import { shouldShowPtt } from "../shouldShowPtt";
|
||||||
|
|
||||||
export function UnauthenticatedView() {
|
export function UnauthenticatedView() {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
@ -112,14 +113,14 @@ export function UnauthenticatedView() {
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
/>
|
/>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
<FieldRow>
|
{shouldShowPtt() && <FieldRow>
|
||||||
<InputField
|
<InputField
|
||||||
id="ptt"
|
id="ptt"
|
||||||
name="ptt"
|
name="ptt"
|
||||||
label="Push to Talk"
|
label="Push to Talk"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
/>
|
/>
|
||||||
</FieldRow>
|
</FieldRow>}
|
||||||
<Caption>
|
<Caption>
|
||||||
By clicking "Go", you agree to our{" "}
|
By clicking "Go", you agree to our{" "}
|
||||||
<Link href={privacyPolicyUrl}>Terms and conditions</Link>
|
<Link href={privacyPolicyUrl}>Terms and conditions</Link>
|
||||||
|
|
Loading…
Add table
Reference in a new issue