[web] Miscellaneous code improvements (#1336)
This commit is contained in:
commit
8764e5cf4d
108 changed files with 176 additions and 308 deletions
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Enthält schädliche Inhalte",
|
||||
"COPYRIGHT": "Verletzung des Urheberrechts von jemandem, den ich repräsentieren darf",
|
||||
"SHARED_USING": "Freigegeben über ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Passwort-Sperre deaktivieren",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contains malicious content",
|
||||
"COPYRIGHT": "Infringes on the copyright of someone I am authorized to represent",
|
||||
"SHARED_USING": "Shared using ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Use code <strong>{{referralCode}}</strong> to get 10 GB free",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Disable password lock",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contiene contenido malicioso",
|
||||
"COPYRIGHT": "Infracciones sobre los derechos de autor de alguien que estoy autorizado a representar",
|
||||
"SHARED_USING": "Compartido usando ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Usa el código <strong>{{referralCode}}</strong> para obtener 10 GB gratis",
|
||||
"LIVE": "VIVO",
|
||||
"DISABLE_PASSWORD": "Desactivar contraseña",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contient du contenu malveillant",
|
||||
"COPYRIGHT": "Enfreint les droits d'une personne que je réprésente",
|
||||
"SHARED_USING": "Partagé en utilisant ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Utilisez le code <strong>{{referralCode}}</strong> pour obtenir 10 Go gratuits",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Désactiver le verrouillage par mot de passe",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Bevat kwaadwillende inhoud",
|
||||
"COPYRIGHT": "Schending van het auteursrecht van iemand die ik mag vertegenwoordigen",
|
||||
"SHARED_USING": "Gedeeld via ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Gebruik code <strong>{{referralCode}}</strong> om 10 GB gratis te krijgen",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Schakel cijfercode vergrendeling uit",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contém conteúdo malicioso",
|
||||
"COPYRIGHT": "Viola os direitos autorais de alguém que estou autorizado a representar",
|
||||
"SHARED_USING": "Compartilhar usando ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Use o código <strong>{{referralCode}}</strong> para obter 10 GB de graça",
|
||||
"LIVE": "AO VIVO",
|
||||
"DISABLE_PASSWORD": "Desativar bloqueio por senha",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "哈哈哈急急急",
|
||||
"COPYRIGHT": "不不不急急急就是",
|
||||
"SHARED_USING": "分享方式 ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "使用代码 <strong>{{referralCode}}</strong> 获得 10 GB 免费空间",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "禁用密码锁",
|
||||
|
|
|
@ -30,7 +30,7 @@ interface AppContextProps {
|
|||
|
||||
export const AppContext = createContext<AppContextProps>({} as AppContextProps);
|
||||
|
||||
export default function App(props: AppProps) {
|
||||
export default function App({ Component, pageProps }: AppProps) {
|
||||
const [isI18nReady, setIsI18nReady] = useState<boolean>(false);
|
||||
|
||||
const [showNavbar, setShowNavBar] = useState(false);
|
||||
|
@ -50,8 +50,6 @@ export default function App(props: AppProps) {
|
|||
|
||||
const router = useRouter();
|
||||
|
||||
const { Component, pageProps } = props;
|
||||
|
||||
const [themeColor] = useLocalState(LS_KEYS.THEME, THEME_COLOR.DARK);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -13,7 +13,6 @@ import InfoIcon from "@mui/icons-material/Info";
|
|||
import { Box, Typography } from "@mui/material";
|
||||
import { t } from "i18next";
|
||||
import _sodium from "libsodium-wrappers";
|
||||
import Image from "next/image";
|
||||
import { useEffect, useState } from "react";
|
||||
import {
|
||||
BeginPasskeyAuthenticationResponse,
|
||||
|
@ -297,7 +296,7 @@ const PasskeysFlow = () => {
|
|||
{t("PASSKEY_FOLLOW_THE_STEPS_FROM_YOUR_BROWSER")}
|
||||
</Typography>
|
||||
<CenteredFlex marginTop="1rem">
|
||||
<Image
|
||||
<img
|
||||
alt="ente Logo Circular"
|
||||
height={150}
|
||||
width={150}
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Enthält schädliche Inhalte",
|
||||
"COPYRIGHT": "Verletzung des Urheberrechts von jemandem, den ich repräsentieren darf",
|
||||
"SHARED_USING": "Freigegeben über ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Passwort-Sperre deaktivieren",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contains malicious content",
|
||||
"COPYRIGHT": "Infringes on the copyright of someone I am authorized to represent",
|
||||
"SHARED_USING": "Shared using ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Use code <strong>{{referralCode}}</strong> to get 10 GB free",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Disable password lock",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contiene contenido malicioso",
|
||||
"COPYRIGHT": "Infracciones sobre los derechos de autor de alguien que estoy autorizado a representar",
|
||||
"SHARED_USING": "Compartido usando ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Usa el código <strong>{{referralCode}}</strong> para obtener 10 GB gratis",
|
||||
"LIVE": "VIVO",
|
||||
"DISABLE_PASSWORD": "Desactivar contraseña",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contient du contenu malveillant",
|
||||
"COPYRIGHT": "Enfreint les droits d'une personne que je réprésente",
|
||||
"SHARED_USING": "Partagé en utilisant ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Utilisez le code <strong>{{referralCode}}</strong> pour obtenir 10 Go gratuits",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Désactiver le verrouillage par mot de passe",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Bevat kwaadwillende inhoud",
|
||||
"COPYRIGHT": "Schending van het auteursrecht van iemand die ik mag vertegenwoordigen",
|
||||
"SHARED_USING": "Gedeeld via ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Gebruik code <strong>{{referralCode}}</strong> om 10 GB gratis te krijgen",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Schakel cijfercode vergrendeling uit",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contém conteúdo malicioso",
|
||||
"COPYRIGHT": "Viola os direitos autorais de alguém que estou autorizado a representar",
|
||||
"SHARED_USING": "Compartilhar usando ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Use o código <strong>{{referralCode}}</strong> para obter 10 GB de graça",
|
||||
"LIVE": "AO VIVO",
|
||||
"DISABLE_PASSWORD": "Desativar bloqueio por senha",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "哈哈哈急急急",
|
||||
"COPYRIGHT": "不不不急急急就是",
|
||||
"SHARED_USING": "分享方式 ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "使用代码 <strong>{{referralCode}}</strong> 获得 10 GB 免费空间",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "禁用密码锁",
|
||||
|
|
|
@ -47,8 +47,7 @@ type AppContextType = {
|
|||
|
||||
export const AppContext = createContext<AppContextType>(null);
|
||||
|
||||
export default function App(props: AppProps) {
|
||||
const { Component, pageProps } = props;
|
||||
export default function App({ Component, pageProps }: AppProps) {
|
||||
const router = useRouter();
|
||||
const [isI18nReady, setIsI18nReady] = useState<boolean>(false);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Enthält schädliche Inhalte",
|
||||
"COPYRIGHT": "Verletzung des Urheberrechts von jemandem, den ich repräsentieren darf",
|
||||
"SHARED_USING": "Freigegeben über ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Passwort-Sperre deaktivieren",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contains malicious content",
|
||||
"COPYRIGHT": "Infringes on the copyright of someone I am authorized to represent",
|
||||
"SHARED_USING": "Shared using ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Use code <strong>{{referralCode}}</strong> to get 10 GB free",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Disable password lock",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contiene contenido malicioso",
|
||||
"COPYRIGHT": "Infracciones sobre los derechos de autor de alguien que estoy autorizado a representar",
|
||||
"SHARED_USING": "Compartido usando ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Usa el código <strong>{{referralCode}}</strong> para obtener 10 GB gratis",
|
||||
"LIVE": "VIVO",
|
||||
"DISABLE_PASSWORD": "Desactivar contraseña",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contient du contenu malveillant",
|
||||
"COPYRIGHT": "Enfreint les droits d'une personne que je réprésente",
|
||||
"SHARED_USING": "Partagé en utilisant ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Utilisez le code <strong>{{referralCode}}</strong> pour obtenir 10 Go gratuits",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Désactiver le verrouillage par mot de passe",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Bevat kwaadwillende inhoud",
|
||||
"COPYRIGHT": "Schending van het auteursrecht van iemand die ik mag vertegenwoordigen",
|
||||
"SHARED_USING": "Gedeeld via ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Gebruik code <strong>{{referralCode}}</strong> om 10 GB gratis te krijgen",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Schakel cijfercode vergrendeling uit",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contém conteúdo malicioso",
|
||||
"COPYRIGHT": "Viola os direitos autorais de alguém que estou autorizado a representar",
|
||||
"SHARED_USING": "Compartilhar usando ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Use o código <strong>{{referralCode}}</strong> para obter 10 GB de graça",
|
||||
"LIVE": "AO VIVO",
|
||||
"DISABLE_PASSWORD": "Desativar bloqueio por senha",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "哈哈哈急急急",
|
||||
"COPYRIGHT": "不不不急急急就是",
|
||||
"SHARED_USING": "分享方式 ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "使用代码 <strong>{{referralCode}}</strong> 获得 10 GB 免费空间",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "禁用密码锁",
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import EnteSpinner from "@ente/shared/components/EnteSpinner";
|
||||
import { boxSealOpen, toB64 } from "@ente/shared/crypto/internal/libsodium";
|
||||
import { useCastReceiver } from "@ente/shared/hooks/useCastReceiver";
|
||||
import { addLogLine } from "@ente/shared/logging";
|
||||
import castGateway from "@ente/shared/network/cast";
|
||||
import LargeType from "components/LargeType";
|
||||
|
@ -8,6 +7,7 @@ import _sodium from "libsodium-wrappers";
|
|||
import { useRouter } from "next/router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { storeCastData } from "services/cast/castService";
|
||||
import { useCastReceiver } from "../utils/useCastReceiver";
|
||||
|
||||
// Function to generate cryptographically secure digits
|
||||
const generateSecureData = (length: number): Uint8Array => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { addLogLine } from "@ente/shared/logging";
|
||||
import { promiseWithTimeout } from "@ente/shared/promise";
|
||||
import { logError } from "@ente/shared/sentry";
|
||||
import { promiseWithTimeout } from "@ente/shared/utils";
|
||||
import QueueProcessor from "@ente/shared/utils/queueProcessor";
|
||||
import { generateTempName } from "@ente/shared/utils/temp";
|
||||
import { createFFmpeg, FFmpeg } from "ffmpeg-wasm";
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Enthält schädliche Inhalte",
|
||||
"COPYRIGHT": "Verletzung des Urheberrechts von jemandem, den ich repräsentieren darf",
|
||||
"SHARED_USING": "Freigegeben über ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Passwort-Sperre deaktivieren",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contains malicious content",
|
||||
"COPYRIGHT": "Infringes on the copyright of someone I am authorized to represent",
|
||||
"SHARED_USING": "Shared using ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Use code <strong>{{referralCode}}</strong> to get 10 GB free",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Disable password lock",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contiene contenido malicioso",
|
||||
"COPYRIGHT": "Infracciones sobre los derechos de autor de alguien que estoy autorizado a representar",
|
||||
"SHARED_USING": "Compartido usando ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Usa el código <strong>{{referralCode}}</strong> para obtener 10 GB gratis",
|
||||
"LIVE": "VIVO",
|
||||
"DISABLE_PASSWORD": "Desactivar contraseña",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contient du contenu malveillant",
|
||||
"COPYRIGHT": "Enfreint les droits d'une personne que je réprésente",
|
||||
"SHARED_USING": "Partagé en utilisant ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Utilisez le code <strong>{{referralCode}}</strong> pour obtenir 10 Go gratuits",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Désactiver le verrouillage par mot de passe",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Bevat kwaadwillende inhoud",
|
||||
"COPYRIGHT": "Schending van het auteursrecht van iemand die ik mag vertegenwoordigen",
|
||||
"SHARED_USING": "Gedeeld via ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Gebruik code <strong>{{referralCode}}</strong> om 10 GB gratis te krijgen",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "Schakel cijfercode vergrendeling uit",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Contém conteúdo malicioso",
|
||||
"COPYRIGHT": "Viola os direitos autorais de alguém que estou autorizado a representar",
|
||||
"SHARED_USING": "Compartilhar usando ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Use o código <strong>{{referralCode}}</strong> para obter 10 GB de graça",
|
||||
"LIVE": "AO VIVO",
|
||||
"DISABLE_PASSWORD": "Desativar bloqueio por senha",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "Содержит вредоносный контент",
|
||||
"COPYRIGHT": "Нарушает авторские права человека, которого я уполномочен представлять",
|
||||
"SHARED_USING": "Совместное использование ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "Используйте код <strong>{{referralCode}}</strong> чтобы получить 10 ГБ бесплатно",
|
||||
"LIVE": "Жить",
|
||||
"DISABLE_PASSWORD": "Отключить блокировку паролем",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "",
|
||||
"COPYRIGHT": "",
|
||||
"SHARED_USING": "",
|
||||
"ENTE_IO": "",
|
||||
"SHARING_REFERRAL_CODE": "",
|
||||
"LIVE": "",
|
||||
"DISABLE_PASSWORD": "",
|
||||
|
|
|
@ -406,7 +406,6 @@
|
|||
"MALICIOUS_CONTENT": "哈哈哈急急急",
|
||||
"COPYRIGHT": "不不不急急急就是",
|
||||
"SHARED_USING": "分享方式 ",
|
||||
"ENTE_IO": "ente.io",
|
||||
"SHARING_REFERRAL_CODE": "使用代码 <strong>{{referralCode}}</strong> 获得 10 GB 免费空间",
|
||||
"LIVE": "LIVE",
|
||||
"DISABLE_PASSWORD": "禁用密码锁",
|
||||
|
|
|
@ -6,7 +6,6 @@ import SingleInputForm, {
|
|||
SingleInputFormProps,
|
||||
} from "@ente/shared/components/SingleInputForm";
|
||||
import { boxSeal } from "@ente/shared/crypto/internal/libsodium";
|
||||
import { loadSender } from "@ente/shared/hooks/useCastSender";
|
||||
import { addLogLine } from "@ente/shared/logging";
|
||||
import castGateway from "@ente/shared/network/cast";
|
||||
import { logError } from "@ente/shared/sentry";
|
||||
|
@ -16,6 +15,7 @@ import { useEffect, useState } from "react";
|
|||
import { Trans } from "react-i18next";
|
||||
import { Collection } from "types/collection";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { loadSender } from "../../../utils/useCastSender";
|
||||
|
||||
interface Props {
|
||||
show: boolean;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { FlexWrapper } from "@ente/shared/components/Container";
|
||||
import { ENTE_WEBSITE_LINK } from "@ente/shared/constants/urls";
|
||||
import { formatDate, getDate, isSameDay } from "@ente/shared/time/format";
|
||||
import { convertBytesToHumanReadable } from "@ente/shared/utils/size";
|
||||
import { Box, Checkbox, Link, Typography, styled } from "@mui/material";
|
||||
|
@ -583,8 +582,8 @@ export function PhotoList({
|
|||
<Box width={"100%"}>
|
||||
<Typography variant="small" display={"block"}>
|
||||
{t("SHARED_USING")}{" "}
|
||||
<Link target="_blank" href={ENTE_WEBSITE_LINK}>
|
||||
{t("ENTE_IO")}
|
||||
<Link target="_blank" href={"https://ente.io"}>
|
||||
ente.io
|
||||
</Link>
|
||||
</Typography>
|
||||
{publicCollectionGalleryContext.referralCode ? (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { FluidContainer } from "@ente/shared/components/Container";
|
||||
import { EnteLinkLogo } from "@ente/shared/components/Navbar/EnteLinkLogo";
|
||||
import NavbarBase from "@ente/shared/components/Navbar/base";
|
||||
import AddPhotoAlternateOutlined from "@mui/icons-material/AddPhotoAlternateOutlined";
|
||||
import { Box } from "@mui/material";
|
||||
import UploadButton from "components/Upload/UploadButton";
|
||||
import { t } from "i18next";
|
||||
import { AppContext } from "pages/_app";
|
||||
|
@ -27,3 +27,36 @@ export default function SharedAlbumNavbar({ showUploadButton, openUploader }) {
|
|||
</NavbarBase>
|
||||
);
|
||||
}
|
||||
|
||||
const EnteLinkLogo: React.FC = () => {
|
||||
return (
|
||||
<a href="https://ente.io">
|
||||
<Box
|
||||
sx={(theme) => ({
|
||||
":hover": {
|
||||
cursor: "pointer",
|
||||
svg: {
|
||||
fill: theme.colors.text.faint,
|
||||
},
|
||||
},
|
||||
})}
|
||||
>
|
||||
<Ente />
|
||||
</Box>
|
||||
</a>
|
||||
);
|
||||
};
|
||||
|
||||
const Ente: React.FC = () => {
|
||||
return (
|
||||
<svg
|
||||
width="50"
|
||||
height="26"
|
||||
viewBox="0 0 43 13"
|
||||
fill="#fff"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path d="M6.102 12.144C4.998 12.144 4.026 11.928 3.186 11.496C2.358 11.064 1.716 10.476 1.26 9.732C0.804 8.976 0.576 8.118 0.576 7.158C0.576 6.186 0.798 5.328 1.242 4.584C1.698 3.828 2.316 3.24 3.096 2.82C3.876 2.388 4.758 2.172 5.742 2.172C6.69 2.172 7.542 2.376 8.298 2.784C9.066 3.18 9.672 3.756 10.116 4.512C10.56 5.256 10.782 6.15 10.782 7.194C10.782 7.302 10.776 7.428 10.764 7.572C10.752 7.704 10.74 7.83 10.728 7.95H2.862V6.312H9.252L8.172 6.798C8.172 6.294 8.07 5.856 7.866 5.484C7.662 5.112 7.38 4.824 7.02 4.62C6.66 4.404 6.24 4.296 5.76 4.296C5.28 4.296 4.854 4.404 4.482 4.62C4.122 4.824 3.84 5.118 3.636 5.502C3.432 5.874 3.33 6.318 3.33 6.834V7.266C3.33 7.794 3.444 8.262 3.672 8.67C3.912 9.066 4.242 9.372 4.662 9.588C5.094 9.792 5.598 9.894 6.174 9.894C6.69 9.894 7.14 9.816 7.524 9.66C7.92 9.504 8.28 9.27 8.604 8.958L10.098 10.578C9.654 11.082 9.096 11.472 8.424 11.748C7.752 12.012 6.978 12.144 6.102 12.144ZM18.5375 2.172C19.3055 2.172 19.9895 2.328 20.5895 2.64C21.2015 2.94 21.6815 3.408 22.0295 4.044C22.3775 4.668 22.5515 5.472 22.5515 6.456V12H19.7435V6.888C19.7435 6.108 19.5695 5.532 19.2215 5.16C18.8855 4.788 18.4055 4.602 17.7815 4.602C17.3375 4.602 16.9355 4.698 16.5755 4.89C16.2275 5.07 15.9515 5.352 15.7475 5.736C15.5555 6.12 15.4595 6.612 15.4595 7.212V12H12.6515V2.316H15.3335V4.998L14.8295 4.188C15.1775 3.54 15.6755 3.042 16.3235 2.694C16.9715 2.346 17.7095 2.172 18.5375 2.172ZM29.0568 12.144C27.9168 12.144 27.0288 11.856 26.3928 11.28C25.7568 10.692 25.4388 9.822 25.4388 8.67V0.174H28.2468V8.634C28.2468 9.042 28.3548 9.36 28.5708 9.588C28.7868 9.804 29.0808 9.912 29.4528 9.912C29.8968 9.912 30.2748 9.792 30.5868 9.552L31.3428 11.532C31.0548 11.736 30.7068 11.892 30.2988 12C29.9028 12.096 29.4888 12.144 29.0568 12.144ZM23.9448 4.692V2.532H30.6588V4.692H23.9448ZM37.4262 12.144C36.3222 12.144 35.3502 11.928 34.5102 11.496C33.6822 11.064 33.0402 10.476 32.5842 9.732C32.1282 8.976 31.9002 8.118 31.9002 7.158C31.9002 6.186 32.1222 5.328 32.5662 4.584C33.0222 3.828 33.6402 3.24 34.4202 2.82C35.2002 2.388 36.0822 2.172 37.0662 2.172C38.0142 2.172 38.8662 2.376 39.6222 2.784C40.3902 3.18 40.9962 3.756 41.4402 4.512C41.8842 5.256 42.1062 6.15 42.1062 7.194C42.1062 7.302 42.1002 7.428 42.0882 7.572C42.0762 7.704 42.0642 7.83 42.0522 7.95H34.1862V6.312H40.5762L39.4962 6.798C39.4962 6.294 39.3942 5.856 39.1902 5.484C38.9862 5.112 38.7042 4.824 38.3442 4.62C37.9842 4.404 37.5642 4.296 37.0842 4.296C36.6042 4.296 36.1782 4.404 35.8062 4.62C35.4462 4.824 35.1642 5.118 34.9602 5.502C34.7562 5.874 34.6542 6.318 34.6542 6.834V7.266C34.6542 7.794 34.7682 8.262 34.9962 8.67C35.2362 9.066 35.5662 9.372 35.9862 9.588C36.4182 9.792 36.9222 9.894 37.4982 9.894C38.0142 9.894 38.4642 9.816 38.8482 9.66C39.2442 9.504 39.6042 9.27 39.9282 8.958L41.4222 10.578C40.9782 11.082 40.4202 11.472 39.7482 11.748C39.0762 12.012 38.3022 12.144 37.4262 12.144Z" />
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -111,8 +111,7 @@ type AppContextType = {
|
|||
|
||||
export const AppContext = createContext<AppContextType>(null);
|
||||
|
||||
export default function App(props: AppProps) {
|
||||
const { Component, pageProps } = props;
|
||||
export default function App({ Component, pageProps }: AppProps) {
|
||||
const router = useRouter();
|
||||
const [isI18nReady, setIsI18nReady] = useState<boolean>(false);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
|
|
@ -92,13 +92,13 @@ import {
|
|||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { CenteredFlex } from "@ente/shared/components/Container";
|
||||
import ElectronAPIs from "@ente/shared/electron";
|
||||
import useEffectSingleThreaded from "@ente/shared/hooks/useEffectSingleThreaded";
|
||||
import useFileInput from "@ente/shared/hooks/useFileInput";
|
||||
import useMemoSingleThreaded from "@ente/shared/hooks/useMemoSingleThreaded";
|
||||
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
|
||||
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
|
||||
import { getToken } from "@ente/shared/storage/localStorage/helpers";
|
||||
import { User } from "@ente/shared/user/types";
|
||||
import { isPromise } from "@ente/shared/utils";
|
||||
import AuthenticateUserModal from "components/AuthenticateUserModal";
|
||||
import Collections from "components/Collections";
|
||||
import ExportModal from "components/ExportModal";
|
||||
|
@ -1221,3 +1221,34 @@ export default function Gallery() {
|
|||
</GalleryContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
// useEffectSingleThreaded is a useEffect that will only run one at a time, and will
|
||||
// caches the latest deps of requests that come in while it is running, and will
|
||||
// run that after the current run is complete.
|
||||
function useEffectSingleThreaded(
|
||||
fn: (deps) => void | Promise<void>,
|
||||
deps: any[],
|
||||
): void {
|
||||
const updateInProgress = useRef(false);
|
||||
const nextRequestDepsRef = useRef<any[]>(null);
|
||||
useEffect(() => {
|
||||
const main = async (deps) => {
|
||||
if (updateInProgress.current) {
|
||||
nextRequestDepsRef.current = deps;
|
||||
return;
|
||||
}
|
||||
updateInProgress.current = true;
|
||||
const result = fn(deps);
|
||||
if (isPromise(result)) {
|
||||
await result;
|
||||
}
|
||||
updateInProgress.current = false;
|
||||
if (nextRequestDepsRef.current) {
|
||||
const deps = nextRequestDepsRef.current;
|
||||
nextRequestDepsRef.current = null;
|
||||
setTimeout(() => main(deps), 0);
|
||||
}
|
||||
};
|
||||
main(deps);
|
||||
}, deps);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { CustomError } from "@ente/shared/error";
|
||||
import HTTPService from "@ente/shared/network/HTTPService";
|
||||
import { getFileURL, getThumbnailURL } from "@ente/shared/network/api";
|
||||
import { retryAsyncFunction } from "@ente/shared/promise";
|
||||
import { retryAsyncFunction } from "@ente/shared/utils";
|
||||
import { DownloadClient } from "services/download";
|
||||
import { EnteFile } from "types/file";
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
getPublicCollectionFileURL,
|
||||
getPublicCollectionThumbnailURL,
|
||||
} from "@ente/shared/network/api";
|
||||
import { retryAsyncFunction } from "@ente/shared/promise";
|
||||
import { retryAsyncFunction } from "@ente/shared/utils";
|
||||
import { DownloadClient } from "services/download";
|
||||
import { EnteFile } from "types/file";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { logError } from "@ente/shared/sentry";
|
||||
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
|
||||
import { sleep } from "@ente/shared/utils";
|
||||
import { EnteFile } from "types/file";
|
||||
import { sleep } from "utils/common";
|
||||
import {
|
||||
convertCollectionIDExportNameObjectToMap,
|
||||
convertFileIDExportNameObjectToMap,
|
||||
|
|
|
@ -2,6 +2,7 @@ import { addLocalLog, addLogLine } from "@ente/shared/logging";
|
|||
import { logError } from "@ente/shared/sentry";
|
||||
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
|
||||
import { User } from "@ente/shared/user/types";
|
||||
import { sleep } from "@ente/shared/utils";
|
||||
import { FILE_TYPE } from "constants/file";
|
||||
import { getLocalCollections } from "services/collectionService";
|
||||
import downloadManager from "services/download";
|
||||
|
@ -19,7 +20,6 @@ import {
|
|||
} from "types/export";
|
||||
import { EnteFile } from "types/file";
|
||||
import { getNonEmptyPersonalCollections } from "utils/collection";
|
||||
import { sleep } from "utils/common";
|
||||
import {
|
||||
getCollectionExportPath,
|
||||
getCollectionIDFromFileUID,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { CustomError } from "@ente/shared/error";
|
||||
import { addLogLine } from "@ente/shared/logging";
|
||||
import { retryAsyncFunction } from "@ente/shared/promise";
|
||||
import { logError } from "@ente/shared/sentry";
|
||||
import { retryAsyncFunction } from "@ente/shared/utils";
|
||||
import QueueProcessor from "@ente/shared/utils/queueProcessor";
|
||||
import { convertBytesToHumanReadable } from "@ente/shared/utils/size";
|
||||
import { ComlinkWorker } from "@ente/shared/worker/comlinkWorker";
|
||||
|
|
|
@ -152,7 +152,7 @@ export async function generateImageThumbnailUsingCanvas(
|
|||
}
|
||||
};
|
||||
timeout = setTimeout(
|
||||
() => reject(Error(CustomError.WAIT_TIME_EXCEEDED)),
|
||||
() => reject(new Error("Operation timed out")),
|
||||
WAIT_TIME_THUMBNAIL_GENERATION,
|
||||
);
|
||||
});
|
||||
|
@ -238,7 +238,7 @@ export async function generateVideoThumbnailUsingCanvas(
|
|||
}
|
||||
});
|
||||
timeout = setTimeout(
|
||||
() => reject(Error(CustomError.WAIT_TIME_EXCEEDED)),
|
||||
() => reject(new Error("Operation timed out")),
|
||||
WAIT_TIME_THUMBNAIL_GENERATION,
|
||||
);
|
||||
});
|
||||
|
|
|
@ -2,6 +2,7 @@ import { DedicatedCryptoWorker } from "@ente/shared/crypto/internal/crypto.worke
|
|||
import { CustomError, handleUploadError } from "@ente/shared/error";
|
||||
import { addLocalLog, addLogLine } from "@ente/shared/logging";
|
||||
import { logError } from "@ente/shared/sentry";
|
||||
import { sleep } from "@ente/shared/utils";
|
||||
import { convertBytesToHumanReadable } from "@ente/shared/utils/size";
|
||||
import { Remote } from "comlink";
|
||||
import { MAX_FILE_SIZE_SUPPORTED, UPLOAD_RESULT } from "constants/upload";
|
||||
|
@ -15,7 +16,6 @@ import {
|
|||
Logger,
|
||||
UploadFile,
|
||||
} from "types/upload";
|
||||
import { sleep } from "utils/common";
|
||||
import { findMatchingExistingFiles } from "utils/upload";
|
||||
import UIService from "./uiService";
|
||||
import uploadCancelService from "./uploadCancelService";
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { addLogLine } from "@ente/shared/logging";
|
||||
import { logError } from "@ente/shared/sentry";
|
||||
import { promiseWithTimeout } from "@ente/shared/utils";
|
||||
import QueueProcessor from "@ente/shared/utils/queueProcessor";
|
||||
import { generateTempName } from "@ente/shared/utils/temp";
|
||||
import { createFFmpeg, FFmpeg } from "ffmpeg-wasm";
|
||||
import { getUint8ArrayView } from "services/readerService";
|
||||
import { promiseWithTimeout } from "utils/common";
|
||||
|
||||
const INPUT_PATH_PLACEHOLDER = "INPUT";
|
||||
const FFMPEG_PLACEHOLDER = "FFMPEG";
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { APP_DOWNLOAD_URL } from "@ente/shared/constants/urls";
|
||||
import { CustomError } from "@ente/shared/error";
|
||||
import { isPromise } from "@ente/shared/utils";
|
||||
import isElectron from "is-electron";
|
||||
|
||||
export function checkConnectivity() {
|
||||
|
@ -49,12 +50,6 @@ export function webglSupported() {
|
|||
}
|
||||
}
|
||||
|
||||
export async function sleep(time: number) {
|
||||
await new Promise((resolve) => {
|
||||
setTimeout(() => resolve(null), time);
|
||||
});
|
||||
}
|
||||
|
||||
export function downloadApp() {
|
||||
openLink(APP_DOWNLOAD_URL, true);
|
||||
}
|
||||
|
@ -71,27 +66,6 @@ export function initiateEmail(email: string) {
|
|||
a.rel = "noreferrer noopener";
|
||||
a.click();
|
||||
}
|
||||
export const promiseWithTimeout = async <T>(
|
||||
request: Promise<T>,
|
||||
timeout: number,
|
||||
): Promise<T> => {
|
||||
const timeoutRef = { current: null };
|
||||
const rejectOnTimeout = new Promise<null>((_, reject) => {
|
||||
timeoutRef.current = setTimeout(
|
||||
() => reject(Error(CustomError.WAIT_TIME_EXCEEDED)),
|
||||
timeout,
|
||||
);
|
||||
});
|
||||
const requestWithTimeOutCancellation = async () => {
|
||||
const resp = await request;
|
||||
clearTimeout(timeoutRef.current);
|
||||
return resp;
|
||||
};
|
||||
return await Promise.race([
|
||||
requestWithTimeOutCancellation(),
|
||||
rejectOnTimeout,
|
||||
]);
|
||||
};
|
||||
|
||||
export const preloadImage = (imgBasePath: string) => {
|
||||
const srcSet = [];
|
||||
|
@ -120,14 +94,6 @@ export async function waitAndRun(
|
|||
await task();
|
||||
}
|
||||
|
||||
function isPromise(p: any) {
|
||||
if (typeof p === "object" && typeof p.then === "function") {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
export function isClipboardItemPresent() {
|
||||
return typeof ClipboardItem !== "undefined";
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
import { CustomError } from "@ente/shared/error";
|
||||
|
||||
export const promiseWithTimeout = async (
|
||||
request: Promise<any>,
|
||||
timeout: number,
|
||||
) => {
|
||||
const timeoutRef = { current: null };
|
||||
const rejectOnTimeout = new Promise((_, reject) => {
|
||||
timeoutRef.current = setTimeout(
|
||||
() => reject(Error(CustomError.WAIT_TIME_EXCEEDED)),
|
||||
timeout,
|
||||
);
|
||||
});
|
||||
return await Promise.race([
|
||||
(async () => {
|
||||
const resp = await request;
|
||||
clearTimeout(timeoutRef.current);
|
||||
return resp;
|
||||
})(),
|
||||
rejectOnTimeout,
|
||||
]);
|
||||
};
|
|
@ -52,7 +52,6 @@ import {
|
|||
import { FileTypeInfo } from "types/upload";
|
||||
|
||||
import { default as ElectronAPIs } from "@ente/shared/electron";
|
||||
import { downloadUsingAnchor } from "@ente/shared/utils";
|
||||
import { t } from "i18next";
|
||||
import imageProcessor from "services/imageProcessor";
|
||||
import { getFileExportPath, getUniqueFileExportName } from "utils/export";
|
||||
|
@ -866,7 +865,7 @@ export const copyFileToClipboard = async (fileUrl: string) => {
|
|||
clearTimeout(timeout);
|
||||
}
|
||||
timeout = setTimeout(
|
||||
() => reject(Error(CustomError.WAIT_TIME_EXCEEDED)),
|
||||
() => reject(new Error("Operation timed out")),
|
||||
WAIT_TIME_IMAGE_CONVERSION,
|
||||
);
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { sleep } from "utils/common";
|
||||
import { sleep } from "@ente/shared/utils";
|
||||
|
||||
const retrySleepTimeInMilliSeconds = [2000, 5000, 10000];
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import { sleep } from "@ente/shared/utils";
|
|||
import { Alert, Box, TextField } from "@mui/material";
|
||||
import { Formik, FormikHelpers } from "formik";
|
||||
import { t } from "i18next";
|
||||
import { useRouter } from "next/router";
|
||||
import { useRef, useState } from "react";
|
||||
import { Trans } from "react-i18next";
|
||||
import * as Yup from "yup";
|
||||
|
@ -19,7 +20,7 @@ interface formValues {
|
|||
ott?: string;
|
||||
}
|
||||
|
||||
function ChangeEmailForm({ appName, router }: PageProps) {
|
||||
function ChangeEmailForm({ appName }: PageProps) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [ottInputVisible, setShowOttInputVisibility] = useState(false);
|
||||
const ottInputRef = useRef(null);
|
||||
|
@ -27,6 +28,8 @@ function ChangeEmailForm({ appName, router }: PageProps) {
|
|||
const [showMessage, setShowMessage] = useState(false);
|
||||
const [success, setSuccess] = useState(false);
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const requestOTT = async (
|
||||
{ email }: formValues,
|
||||
{ setFieldError }: FormikHelpers<formValues>,
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
import { VerticallyCentered } from "@ente/shared/components/Container";
|
||||
import { t } from "i18next";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import ChangeEmailForm from "@ente/accounts/components/ChangeEmail";
|
||||
import { PAGES } from "@ente/accounts/constants/pages";
|
||||
import { PageProps } from "@ente/shared/apps/types";
|
||||
import { VerticallyCentered } from "@ente/shared/components/Container";
|
||||
import FormPaper from "@ente/shared/components/Form/FormPaper";
|
||||
import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title";
|
||||
import { getData, LS_KEYS } from "@ente/shared/storage/localStorage";
|
||||
import { t } from "i18next";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect } from "react";
|
||||
|
||||
function ChangeEmailPage({ appName, appContext }: PageProps) {
|
||||
const router = useRouter();
|
||||
|
||||
function ChangeEmailPage({ router, appName, appContext }: PageProps) {
|
||||
useEffect(() => {
|
||||
const user = getData(LS_KEYS.USER);
|
||||
if (!user?.token) {
|
||||
|
|
|
@ -35,11 +35,14 @@ import FormPaperTitle from "@ente/shared/components/Form/FormPaper/Title";
|
|||
import LinkButton from "@ente/shared/components/LinkButton";
|
||||
import ComlinkCryptoWorker from "@ente/shared/crypto";
|
||||
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
export default function ChangePassword({ appName, router }: PageProps) {
|
||||
export default function ChangePassword({ appName }: PageProps) {
|
||||
const [token, setToken] = useState<string>();
|
||||
const [user, setUser] = useState<User>();
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
const user = getData(LS_KEYS.USER);
|
||||
setUser(user);
|
||||
|
|
|
@ -24,6 +24,8 @@ import { PAGES } from "../constants/pages";
|
|||
import { generateSRPSetupAttributes } from "../services/srp";
|
||||
import { logoutUser } from "../services/user";
|
||||
|
||||
import { APP_HOMES } from "@ente/shared/apps/constants";
|
||||
import { PageProps } from "@ente/shared/apps/types";
|
||||
import { VerticallyCentered } from "@ente/shared/components/Container";
|
||||
import EnteSpinner from "@ente/shared/components/EnteSpinner";
|
||||
import FormPaper from "@ente/shared/components/Form/FormPaper";
|
||||
|
@ -33,7 +35,14 @@ import LinkButton from "@ente/shared/components/LinkButton";
|
|||
import VerifyMasterPasswordForm, {
|
||||
VerifyMasterPasswordFormProps,
|
||||
} from "@ente/shared/components/VerifyMasterPasswordForm";
|
||||
import ComlinkCryptoWorker from "@ente/shared/crypto";
|
||||
import { B64EncryptionResult } from "@ente/shared/crypto/types";
|
||||
import ElectronAPIs from "@ente/shared/electron";
|
||||
import { CustomError } from "@ente/shared/error";
|
||||
import { addLocalLog } from "@ente/shared/logging";
|
||||
import { getAccountsURL } from "@ente/shared/network/api";
|
||||
import { logError } from "@ente/shared/sentry";
|
||||
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
|
||||
import {
|
||||
getToken,
|
||||
isFirstLogin,
|
||||
|
@ -41,29 +50,17 @@ import {
|
|||
} from "@ente/shared/storage/localStorage/helpers";
|
||||
import { KeyAttributes, User } from "@ente/shared/user/types";
|
||||
import isElectron from "is-electron";
|
||||
import { useRouter } from "next/router";
|
||||
import { getSRPAttributes } from "../api/srp";
|
||||
import { configureSRP, loginViaSRP } from "../services/srp";
|
||||
import { SRPAttributes } from "../types/srp";
|
||||
// import { APPS, getAppName } from '@ente/shared/apps';
|
||||
import { APP_HOMES } from "@ente/shared/apps/constants";
|
||||
import { PageProps } from "@ente/shared/apps/types";
|
||||
import ComlinkCryptoWorker from "@ente/shared/crypto";
|
||||
import { B64EncryptionResult } from "@ente/shared/crypto/types";
|
||||
import ElectronAPIs from "@ente/shared/electron";
|
||||
import { CustomError } from "@ente/shared/error";
|
||||
import { addLocalLog } from "@ente/shared/logging";
|
||||
import { logError } from "@ente/shared/sentry";
|
||||
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
|
||||
|
||||
export default function Credentials({
|
||||
appContext,
|
||||
router,
|
||||
appName,
|
||||
}: PageProps) {
|
||||
export default function Credentials({ appContext, appName }: PageProps) {
|
||||
const [srpAttributes, setSrpAttributes] = useState<SRPAttributes>();
|
||||
const [keyAttributes, setKeyAttributes] = useState<KeyAttributes>();
|
||||
const [user, setUser] = useState<User>();
|
||||
|
||||
const router = useRouter();
|
||||
useEffect(() => {
|
||||
const main = async () => {
|
||||
const user: User = getData(LS_KEYS.USER);
|
||||
|
|
|
@ -29,12 +29,16 @@ import {
|
|||
setJustSignedUp,
|
||||
} from "@ente/shared/storage/localStorage/helpers";
|
||||
import { KeyAttributes, User } from "@ente/shared/user/types";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
export default function Generate({ router, appContext, appName }: PageProps) {
|
||||
export default function Generate({ appContext, appName }: PageProps) {
|
||||
const [token, setToken] = useState<string>();
|
||||
const [user, setUser] = useState<User>();
|
||||
const [recoverModalView, setRecoveryModalView] = useState(false);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
const main = async () => {
|
||||
const key: string = getKey(SESSION_KEYS.ENCRYPTION_KEY);
|
||||
|
|
|
@ -3,13 +3,16 @@ import { VerticallyCentered } from "@ente/shared/components/Container";
|
|||
import EnteSpinner from "@ente/shared/components/EnteSpinner";
|
||||
import FormPaper from "@ente/shared/components/Form/FormPaper";
|
||||
import { LS_KEYS, getData } from "@ente/shared/storage/localStorage";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect, useState } from "react";
|
||||
import Login from "../components/Login";
|
||||
import { PAGES } from "../constants/pages";
|
||||
|
||||
export default function LoginPage({ appContext, router, appName }: PageProps) {
|
||||
export default function LoginPage({ appContext, appName }: PageProps) {
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
const user = getData(LS_KEYS.USER);
|
||||
if (user?.email) {
|
||||
|
|
|
@ -23,13 +23,17 @@ import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
|
|||
import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage";
|
||||
import { SESSION_KEYS, getKey } from "@ente/shared/storage/sessionStorage";
|
||||
import { KeyAttributes, User } from "@ente/shared/user/types";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
const bip39 = require("bip39");
|
||||
// mobile client library only supports english.
|
||||
bip39.setDefaultWordlist("english");
|
||||
|
||||
export default function Recover({ appContext, router, appName }: PageProps) {
|
||||
export default function Recover({ appContext, appName }: PageProps) {
|
||||
const [keyAttributes, setKeyAttributes] = useState<KeyAttributes>();
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
const user: User = getData(LS_KEYS.USER);
|
||||
const keyAttributes: KeyAttributes = getData(LS_KEYS.KEY_ATTRIBUTES);
|
||||
|
|
|
@ -5,11 +5,14 @@ import { PageProps } from "@ente/shared/apps/types";
|
|||
import { VerticallyCentered } from "@ente/shared/components/Container";
|
||||
import EnteSpinner from "@ente/shared/components/EnteSpinner";
|
||||
import FormPaper from "@ente/shared/components/Form/FormPaper";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export default function SignUpPage({ router, appContext, appName }: PageProps) {
|
||||
export default function SignUpPage({ appContext, appName }: PageProps) {
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
const user = getData(LS_KEYS.USER);
|
||||
if (user?.email) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue