Remove E2EE setting
Since e2ee is enabled by default now
This commit is contained in:
@@ -33,7 +33,6 @@ import {
|
||||
useOptInAnalytics,
|
||||
useDeveloperSettingsTab,
|
||||
useShowConnectionStats,
|
||||
useEnableE2EE,
|
||||
isFirefox,
|
||||
} from "./useSetting";
|
||||
import { FieldRow, InputField } from "../input/Input";
|
||||
@@ -64,7 +63,6 @@ export const SettingsModal: FC<Props> = (props) => {
|
||||
useDeveloperSettingsTab();
|
||||
const [showConnectionStats, setShowConnectionStats] =
|
||||
useShowConnectionStats();
|
||||
const [enableE2EE, setEnableE2EE] = useEnableE2EE();
|
||||
|
||||
// Generate a `SelectInput` with a list of devices for a given device kind.
|
||||
const generateDeviceSelection = (
|
||||
@@ -243,23 +241,6 @@ export const SettingsModal: FC<Props> = (props) => {
|
||||
}
|
||||
/>
|
||||
</FieldRow>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
id="enableE2EE"
|
||||
name="end-to-end-encryption"
|
||||
label={t("Enable end-to-end encryption (password protected calls)")}
|
||||
description={
|
||||
!setEnableE2EE &&
|
||||
t("End-to-end encryption isn't supported on your browser.")
|
||||
}
|
||||
disabled={!setEnableE2EE}
|
||||
type="checkbox"
|
||||
checked={enableE2EE ?? undefined}
|
||||
onChange={(e: ChangeEvent<HTMLInputElement>): void =>
|
||||
setEnableE2EE?.(e.target.checked)
|
||||
}
|
||||
/>
|
||||
</FieldRow>
|
||||
</TabItem>
|
||||
);
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import { useCallback, useMemo } from "react";
|
||||
import { isE2EESupported } from "livekit-client";
|
||||
|
||||
import { PosthogAnalytics } from "../analytics/PosthogAnalytics";
|
||||
import {
|
||||
@@ -91,16 +90,6 @@ export const useOptInAnalytics = (): DisableableSetting<boolean | null> => {
|
||||
return [false, null];
|
||||
};
|
||||
|
||||
export const useEnableE2EE = (): DisableableSetting<boolean | null> => {
|
||||
const settingVal = useSetting<boolean | null>(
|
||||
"enable-end-to-end-encryption",
|
||||
true,
|
||||
);
|
||||
if (isE2EESupported()) return settingVal;
|
||||
|
||||
return [false, null];
|
||||
};
|
||||
|
||||
export const useDeveloperSettingsTab = (): Setting<boolean> =>
|
||||
useSetting("developer-settings-tab", false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user