From f46a0befdf014c7720bed48e6ced553cf3e75ac9 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 9 Jan 2025 19:06:19 +0530 Subject: [PATCH] T --- web/apps/auth/src/pages/share.tsx | 34 ++++++++++++++++--------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/web/apps/auth/src/pages/share.tsx b/web/apps/auth/src/pages/share.tsx index ce01bb0c9d..50d34e196c 100644 --- a/web/apps/auth/src/pages/share.tsx +++ b/web/apps/auth/src/pages/share.tsx @@ -1,5 +1,6 @@ import { EnteLogo } from "@/base/components/EnteLogo"; import { decryptMetadataJSON_New } from "@/base/crypto"; +import { Box, Stack, Typography } from "@mui/material"; import React, { useEffect, useMemo, useState } from "react"; interface SharedCode { @@ -95,34 +96,29 @@ const Page: React.FC = () => { [codeDisplay.progress], ); - const Message: React.FC<{ text: string }> = ({ text }) => ( -

{text}

- ); - return ( -
-
+ {error &&

{error}

} {timeStatus === -10 && !error && ( - + {"Decrypting..."} )} {timeStatus === -1 && ( - + + Your or the person who shared the code has out of sync + time. + )} - {timeStatus === 1 && } + {timeStatus === 1 && The code has expired.} {timeStatus === 0 && (
{
)} -
+ { Try Ente Auth - + ); }; @@ -240,3 +236,9 @@ const parseCodeDisplay = ( }; const formatCode = (code: string) => code.replace(/(.{3})/g, "$1 ").trim(); + +const Message: React.FC = ({ children }) => ( + + {children} + +);