@@ -10,7 +10,6 @@
|
|||||||
"{{name}} is talking…": "{{name}} is talking…",
|
"{{name}} is talking…": "{{name}} is talking…",
|
||||||
"{{names}}, {{name}}": "{{names}}, {{name}}",
|
"{{names}}, {{name}}": "{{names}}, {{name}}",
|
||||||
"{{roomName}} - Walkie-talkie call": "{{roomName}} - Walkie-talkie call",
|
"{{roomName}} - Walkie-talkie call": "{{roomName}} - Walkie-talkie call",
|
||||||
"<0>{children}Connectivity to the server has been lost.</0>": "<0>{children}Connectivity to the server has been lost.</0>",
|
|
||||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.",
|
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.",
|
||||||
"<0>Already have an account?</0><1><0>Log in</0> Or <2>Access as a guest</2></1>": "<0>Already have an account?</0><1><0>Log in</0> Or <2>Access as a guest</2></1>",
|
"<0>Already have an account?</0><1><0>Log in</0> Or <2>Access as a guest</2></1>": "<0>Already have an account?</0><1><0>Log in</0> Or <2>Access as a guest</2></1>",
|
||||||
"<0>Create an account</0> Or <2>Access as a guest</2>": "<0>Create an account</0> Or <2>Access as a guest</2>",
|
"<0>Create an account</0> Or <2>Access as a guest</2>": "<0>Create an account</0> Or <2>Access as a guest</2>",
|
||||||
@@ -37,6 +36,7 @@
|
|||||||
"Close": "Close",
|
"Close": "Close",
|
||||||
"Confirm password": "Confirm password",
|
"Confirm password": "Confirm password",
|
||||||
"Connection lost": "Connection lost",
|
"Connection lost": "Connection lost",
|
||||||
|
"Connectivity to the server has been lost.": "Connectivity to the server has been lost.",
|
||||||
"Copied!": "Copied!",
|
"Copied!": "Copied!",
|
||||||
"Copy": "Copy",
|
"Copy": "Copy",
|
||||||
"Copy and share this call link": "Copy and share this call link",
|
"Copy and share this call link": "Copy and share this call link",
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ const saveSession = (session: Session) =>
|
|||||||
const clearSession = () => localStorage.removeItem("matrix-auth-store");
|
const clearSession = () => localStorage.removeItem("matrix-auth-store");
|
||||||
const isDisconnected = (syncState, syncData) =>
|
const isDisconnected = (syncState, syncData) =>
|
||||||
syncState === "ERROR" && syncData?.error?.name === "ConnectionError";
|
syncState === "ERROR" && syncData?.error?.name === "ConnectionError";
|
||||||
|
|
||||||
interface ClientState {
|
interface ClientState {
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
isAuthenticated: boolean;
|
isAuthenticated: boolean;
|
||||||
@@ -123,8 +124,6 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
|||||||
|
|
||||||
const onSync = (state: SyncState, _old: SyncState, data: ISyncStateData) => {
|
const onSync = (state: SyncState, _old: SyncState, data: ISyncStateData) => {
|
||||||
setState((currentState) => {
|
setState((currentState) => {
|
||||||
logger.log("syntData.name", data?.error?.name, "state:", state);
|
|
||||||
console.log("Current state:", currentState);
|
|
||||||
return {
|
return {
|
||||||
...currentState,
|
...currentState,
|
||||||
disconnected: isDisconnected(state, data),
|
disconnected: isDisconnected(state, data),
|
||||||
|
|||||||
@@ -16,8 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import React, { HTMLAttributes, ReactNode } from "react";
|
import React, { HTMLAttributes, ReactNode } from "react";
|
||||||
import { logger } from "@sentry/utils";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Trans } from "react-i18next";
|
|
||||||
|
|
||||||
import styles from "./DisconnectedBanner.module.css";
|
import styles from "./DisconnectedBanner.module.css";
|
||||||
import { useClient } from "./ClientContext";
|
import { useClient } from "./ClientContext";
|
||||||
@@ -32,18 +31,16 @@ export function DisconnectedBanner({
|
|||||||
className,
|
className,
|
||||||
...rest
|
...rest
|
||||||
}: DisconnectedBannerProps) {
|
}: DisconnectedBannerProps) {
|
||||||
const clientrp = useClient();
|
const { t } = useTranslation();
|
||||||
logger.log(clientrp);
|
const { disconnected } = useClient();
|
||||||
const disconnected = clientrp.disconnected;
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{disconnected && (
|
{disconnected && (
|
||||||
<Trans>
|
|
||||||
<div className={classNames(styles.banner, className)} {...rest}>
|
<div className={classNames(styles.banner, className)} {...rest}>
|
||||||
{children}
|
{children}
|
||||||
Connectivity to the server has been lost.
|
{t("Connectivity to the server has been lost.")}
|
||||||
</div>
|
</div>
|
||||||
</Trans>
|
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user