Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

add auth page

Abhinav720b1d77d14b
diff --git a/apps/photos/src/components/Authenicator/AuthFooter.tsx b/apps/auth/src/components/AuthFooter.tsx
similarity index 100%
rename from apps/photos/src/components/Authenicator/AuthFooter.tsx
rename to apps/auth/src/components/AuthFooter.tsx
diff --git a/apps/photos/src/components/pages/auth/Navbar.tsx b/apps/auth/src/components/Navbar.tsx
similarity index 84%
rename from apps/photos/src/components/pages/auth/Navbar.tsx
rename to apps/auth/src/components/Navbar.tsx
index fe8d83c223..59505efe0e 100644
--- a/apps/photos/src/components/pages/auth/Navbar.tsx
+++ b/apps/auth/src/components/Navbar.tsx
@@ -1,11 +1,11 @@
-import { HorizontalFlex } from 'components/Container';
+import { HorizontalFlex } from '@ente/shared/components/Container';
import NavbarBase from '@ente/shared/components/Navbar/base';
import React from 'react';
import { t } from 'i18next';
import { logoutUser } from '@ente/accounts/services/user';
import { EnteLogo } from '@ente/shared/components/EnteLogo';
-import OverflowMenu from 'components/OverflowMenu/menu';
-import { OverflowMenuOption } from 'components/OverflowMenu/option';
+import OverflowMenu from '@ente/shared/components/OverflowMenu/menu';
+import { OverflowMenuOption } from '@ente/shared/components/OverflowMenu/option';
import MoreHoriz from '@mui/icons-material/MoreHoriz';
import LogoutOutlined from '@mui/icons-material/LogoutOutlined';
import { AppContext } from 'pages/_app';
diff --git a/apps/photos/src/components/Authenicator/OTPDisplay.tsx b/apps/auth/src/components/OTPDisplay.tsx
similarity index 100%
rename from apps/photos/src/components/Authenicator/OTPDisplay.tsx
rename to apps/auth/src/components/OTPDisplay.tsx
diff --git a/apps/photos/src/components/Authenicator/TimerProgress.tsx b/apps/auth/src/components/TimerProgress.tsx
similarity index 100%
rename from apps/photos/src/components/Authenicator/TimerProgress.tsx
rename to apps/auth/src/components/TimerProgress.tsx
diff --git a/apps/photos/src/pages/auth/index.tsx b/apps/auth/src/pages/auth/index.tsx
similarity index 92%
rename from apps/photos/src/pages/auth/index.tsx
rename to apps/auth/src/pages/auth/index.tsx
index 0f49930288..ec9ba6be54 100644
--- a/apps/photos/src/pages/auth/index.tsx
+++ b/apps/auth/src/pages/auth/index.tsx
@@ -1,17 +1,17 @@
import React, { useContext, useEffect, useState } from 'react';
-import OTPDisplay from 'components/Authenicator/OTPDisplay';
+import OTPDisplay from 'components/OTPDisplay';
import { getAuthCodes } from 'services/authenticator/authenticatorService';
-import { CustomError } from 'utils/error';
+import { CustomError } from '@ente/shared/error';
import { PHOTOS_PAGES as PAGES } from '@ente/shared/constants/pages';
import { useRouter } from 'next/router';
-import { AuthFooter } from 'components/Authenicator/AuthFooter';
+import { AuthFooter } from 'components/AuthFooter';
import { AppContext } from 'pages/_app';
import { TextField } from '@mui/material';
-import AuthNavbar from 'components/pages/auth/Navbar';
+import AuthNavbar from 'components/Navbar';
import { t } from 'i18next';
import EnteSpinner from '@ente/shared/components/EnteSpinner';
-import { VerticallyCentered } from 'components/Container';
-import InMemoryStore, { MS_KEYS } from 'services/InMemoryStore';
+import { VerticallyCentered } from '@ente/shared/components/Container';
+import InMemoryStore, { MS_KEYS } from '@ente/shared/storage/InMemoryStore';
const AuthenticatorCodesPage = () => {
const appContext = useContext(AppContext);
diff --git a/apps/photos/src/services/authenticator/authenticatorService.ts b/apps/auth/src/services/authenticator/authenticatorService.ts
similarity index 100%
rename from apps/photos/src/services/authenticator/authenticatorService.ts
rename to apps/auth/src/services/authenticator/authenticatorService.ts
diff --git a/apps/photos/src/types/authenticator/api.ts b/apps/auth/src/types/authenticator/api.ts
similarity index 100%
rename from apps/photos/src/types/authenticator/api.ts
rename to apps/auth/src/types/authenticator/api.ts
diff --git a/apps/photos/src/types/authenticator/code.ts b/apps/auth/src/types/authenticator/code.ts
similarity index 100%
rename from apps/photos/src/types/authenticator/code.ts
rename to apps/auth/src/types/authenticator/code.ts
diff --git a/apps/photos/src/contexts/overflowMenu.tsx b/packages/shared/components/OverflowMenu/context.tsx
similarity index 100%
rename from apps/photos/src/contexts/overflowMenu.tsx
rename to packages/shared/components/OverflowMenu/context.tsx
diff --git a/apps/photos/src/components/OverflowMenu/menu.tsx b/packages/shared/components/OverflowMenu/menu.tsx
similarity index 97%
rename from apps/photos/src/components/OverflowMenu/menu.tsx
rename to packages/shared/components/OverflowMenu/menu.tsx
index d6d984d8ca..1e1c0e0c33 100644
--- a/apps/photos/src/components/OverflowMenu/menu.tsx
+++ b/packages/shared/components/OverflowMenu/menu.tsx
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import Menu from '@mui/material/Menu';
import { IconButton, PaperProps, styled } from '@mui/material';
-import { OverflowMenuContext } from 'contexts/overflowMenu';
+import { OverflowMenuContext } from './context';
export interface Iprops {
triggerButtonIcon: React.ReactNode;
diff --git a/apps/photos/src/components/OverflowMenu/option.tsx b/packages/shared/components/OverflowMenu/option.tsx
similarity index 100%
rename from apps/photos/src/components/OverflowMenu/option.tsx
rename to packages/shared/components/OverflowMenu/option.tsx