fix dev EditInPlace
This commit is contained in:
@@ -65,7 +65,7 @@
|
|||||||
"always_show_iphone_earpiece": "Show iPhone earpiece option on all platforms",
|
"always_show_iphone_earpiece": "Show iPhone earpiece option on all platforms",
|
||||||
"crypto_version": "Crypto version: {{version}}",
|
"crypto_version": "Crypto version: {{version}}",
|
||||||
"custom_livekit_url": {
|
"custom_livekit_url": {
|
||||||
"current_url": "Overwrite: ",
|
"current_url": "Currently set to: ",
|
||||||
"from_config": "Currently, no overwrite is set. Url from well-known or config is used.",
|
"from_config": "Currently, no overwrite is set. Url from well-known or config is used.",
|
||||||
"label": "Custom Livekit-url",
|
"label": "Custom Livekit-url",
|
||||||
"reset": "Reset overwrite",
|
"reset": "Reset overwrite",
|
||||||
|
|||||||
@@ -96,7 +96,10 @@ export const DeveloperSettingsTab: FC<Props> = ({
|
|||||||
customLivekitUrlSetting,
|
customLivekitUrlSetting,
|
||||||
);
|
);
|
||||||
const [customLivekitUrlTextBuffer, setCustomLivekitUrlTextBuffer] =
|
const [customLivekitUrlTextBuffer, setCustomLivekitUrlTextBuffer] =
|
||||||
useState("");
|
useState(customLivekitUrl);
|
||||||
|
useEffect(() => {
|
||||||
|
setCustomLivekitUrlTextBuffer(customLivekitUrl);
|
||||||
|
}, [customLivekitUrl]);
|
||||||
|
|
||||||
const [muteAllAudio, setMuteAllAudio] = useSetting(muteAllAudioSetting);
|
const [muteAllAudio, setMuteAllAudio] = useSetting(muteAllAudioSetting);
|
||||||
|
|
||||||
@@ -114,7 +117,7 @@ export const DeveloperSettingsTab: FC<Props> = ({
|
|||||||
}, [livekitRooms]);
|
}, [livekitRooms]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form onSubmit={(e) => e.preventDefault()}>
|
<>
|
||||||
<p>
|
<p>
|
||||||
{t("developer_mode.hostname", {
|
{t("developer_mode.hostname", {
|
||||||
hostname: window.location.hostname || "unknown",
|
hostname: window.location.hostname || "unknown",
|
||||||
@@ -227,7 +230,6 @@ export const DeveloperSettingsTab: FC<Props> = ({
|
|||||||
cancelButtonLabel={t("developer_mode.custom_livekit_url.reset")}
|
cancelButtonLabel={t("developer_mode.custom_livekit_url.reset")}
|
||||||
onSave={useCallback(
|
onSave={useCallback(
|
||||||
(e: React.FormEvent<HTMLFormElement>) => {
|
(e: React.FormEvent<HTMLFormElement>) => {
|
||||||
// e.preventDefault();
|
|
||||||
setCustomLivekitUrl(
|
setCustomLivekitUrl(
|
||||||
customLivekitUrlTextBuffer === ""
|
customLivekitUrlTextBuffer === ""
|
||||||
? null
|
? null
|
||||||
@@ -236,6 +238,7 @@ export const DeveloperSettingsTab: FC<Props> = ({
|
|||||||
},
|
},
|
||||||
[setCustomLivekitUrl, customLivekitUrlTextBuffer],
|
[setCustomLivekitUrl, customLivekitUrlTextBuffer],
|
||||||
)}
|
)}
|
||||||
|
value={customLivekitUrlTextBuffer ?? ""}
|
||||||
onChange={useCallback(
|
onChange={useCallback(
|
||||||
(event: ChangeEvent<HTMLInputElement>): void => {
|
(event: ChangeEvent<HTMLInputElement>): void => {
|
||||||
setCustomLivekitUrlTextBuffer(event.target.value);
|
setCustomLivekitUrlTextBuffer(event.target.value);
|
||||||
@@ -244,7 +247,6 @@ export const DeveloperSettingsTab: FC<Props> = ({
|
|||||||
)}
|
)}
|
||||||
onCancel={useCallback(
|
onCancel={useCallback(
|
||||||
(e: React.FormEvent<HTMLFormElement>) => {
|
(e: React.FormEvent<HTMLFormElement>) => {
|
||||||
// e.preventDefault();
|
|
||||||
setCustomLivekitUrl(null);
|
setCustomLivekitUrl(null);
|
||||||
},
|
},
|
||||||
[setCustomLivekitUrl],
|
[setCustomLivekitUrl],
|
||||||
@@ -253,6 +255,7 @@ export const DeveloperSettingsTab: FC<Props> = ({
|
|||||||
<Heading as="h3" type="body" weight="semibold" size="lg">
|
<Heading as="h3" type="body" weight="semibold" size="lg">
|
||||||
{t("developer_mode.matrixRTCMode.title")}
|
{t("developer_mode.matrixRTCMode.title")}
|
||||||
</Heading>
|
</Heading>
|
||||||
|
<Form>
|
||||||
<InlineField
|
<InlineField
|
||||||
name={matrixRTCModeRadioGroup}
|
name={matrixRTCModeRadioGroup}
|
||||||
control={
|
control={
|
||||||
@@ -299,6 +302,7 @@ export const DeveloperSettingsTab: FC<Props> = ({
|
|||||||
{t("developer_mode.matrixRTCMode.Matrix_2_0.description")}
|
{t("developer_mode.matrixRTCMode.Matrix_2_0.description")}
|
||||||
</HelpMessage>
|
</HelpMessage>
|
||||||
</InlineField>
|
</InlineField>
|
||||||
|
</Form>
|
||||||
{livekitRooms?.map((livekitRoom) => (
|
{livekitRooms?.map((livekitRoom) => (
|
||||||
<>
|
<>
|
||||||
<h3>
|
<h3>
|
||||||
@@ -323,6 +327,6 @@ export const DeveloperSettingsTab: FC<Props> = ({
|
|||||||
<pre>{JSON.stringify(env, null, 2)}</pre>
|
<pre>{JSON.stringify(env, null, 2)}</pre>
|
||||||
<p>{t("developer_mode.url_params")}</p>
|
<p>{t("developer_mode.url_params")}</p>
|
||||||
<pre>{JSON.stringify(urlParams, null, 2)}</pre>
|
<pre>{JSON.stringify(urlParams, null, 2)}</pre>
|
||||||
</Form>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
exports[`DeveloperSettingsTab > renders and matches snapshot 1`] = `
|
exports[`DeveloperSettingsTab > renders and matches snapshot 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<form
|
|
||||||
class="_root_19upo_16"
|
|
||||||
>
|
|
||||||
<p>
|
<p>
|
||||||
Hostname: localhost
|
Hostname: localhost
|
||||||
</p>
|
</p>
|
||||||
@@ -211,6 +208,7 @@ exports[`DeveloperSettingsTab > renders and matches snapshot 1`] = `
|
|||||||
id="radix-«r6»"
|
id="radix-«r6»"
|
||||||
name="input"
|
name="input"
|
||||||
title=""
|
title=""
|
||||||
|
value=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
@@ -226,6 +224,9 @@ exports[`DeveloperSettingsTab > renders and matches snapshot 1`] = `
|
|||||||
>
|
>
|
||||||
MatrixRTC mode
|
MatrixRTC mode
|
||||||
</h3>
|
</h3>
|
||||||
|
<form
|
||||||
|
class="_root_19upo_16"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="_inline-field_19upo_32"
|
class="_inline-field_19upo_32"
|
||||||
>
|
>
|
||||||
@@ -347,6 +348,7 @@ exports[`DeveloperSettingsTab > renders and matches snapshot 1`] = `
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
<h3>
|
<h3>
|
||||||
LiveKit SFU: wss://local-sfu.example.org
|
LiveKit SFU: wss://local-sfu.example.org
|
||||||
</h3>
|
</h3>
|
||||||
@@ -405,6 +407,5 @@ exports[`DeveloperSettingsTab > renders and matches snapshot 1`] = `
|
|||||||
"answer": 42
|
"answer": 42
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user