-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🔥 [EXL-69] support group settings page (#324)
- Loading branch information
Showing
65 changed files
with
1,371 additions
and
500 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import React from 'react'; | ||
import { Route, Routes, Navigate } from 'react-router-dom'; | ||
|
||
import Account from '@/containers/AccountSettings/Account'; | ||
import SecretManagement from '@/containers/AccountSettings/SecretManagement'; | ||
import NewSecret from '@/containers/AccountSettings/NewSecret'; | ||
import NewGroup from '@/containers/GroupCenter/NewGroup'; | ||
import GroupDetails from '@/containers/GroupCenter/GroupDetails'; | ||
import Settings from '@/containers/GroupCenter/GroupDetails/Settings'; | ||
|
||
interface IProps { | ||
readonly isAuthenticated: boolean | null; | ||
} | ||
|
||
const Auth = React.lazy(() => import('./pages/Auth')); | ||
const ExternalAuthRedirect = React.lazy(() => import('./pages/ExternalAuthRedirect')); | ||
const AccountSettings = React.lazy(() => import('./pages/AccountSettings')); | ||
const CliAuth = React.lazy(() => import('./pages/CliAuth')); | ||
const CliAuthenticated = React.lazy(() => import('./pages/CliAuthenticated')); | ||
const NotFound = React.lazy(() => import('./pages/NotFound')); | ||
const GroupCenter = React.lazy(() => import('./pages/GroupCenter')); | ||
|
||
const AppRouter: React.FC<IProps> = (props: React.PropsWithChildren<IProps>) => ( | ||
<Routes> | ||
{props.isAuthenticated === false && ( | ||
<> | ||
<Route path="" element={<Auth />} /> | ||
<Route path="auth" element={<Auth />} /> | ||
<Route path="external-auth-redirect" element={<ExternalAuthRedirect />} /> | ||
</> | ||
)} | ||
{props.isAuthenticated && ( | ||
<> | ||
<Route path="" element={<GroupCenter />} /> | ||
<Route path="account-settings" element={<AccountSettings />}> | ||
<Route path="" element={<Navigate to="account" replace />} /> | ||
<Route path="account" element={<Account />} /> | ||
<Route path="secret-management" element={<SecretManagement />} /> | ||
<Route path="secret-management/new" element={<NewSecret />} /> | ||
<Route path="secret-management/*" element={<Navigate to="secret-management" replace />} /> | ||
<Route path="*" element={<Navigate to="account" replace />} /> | ||
</Route> | ||
<Route path="group-center" element={<GroupCenter />}> | ||
<Route path="new" element={<NewGroup />} /> | ||
<Route path=":groupId" element={<GroupDetails />}> | ||
<Route path="" element={<Navigate to="policies" replace />} /> | ||
<Route path="policies" element={<div> </div>} /> | ||
<Route path="history" element={<div> </div>} /> | ||
<Route path="settings" element={<Settings />} /> | ||
</Route> | ||
</Route> | ||
</> | ||
)} | ||
<Route path="cli-auth" element={<CliAuth />} /> | ||
<Route path="cli-authenticated" element={<CliAuthenticated />} /> | ||
<Route path="/not-found" element={<NotFound />} /> | ||
<Route path="*" element={props.isAuthenticated === null ? null : <NotFound />} /> | ||
</Routes> | ||
); | ||
|
||
AppRouter.displayName = 'AppRouter'; | ||
AppRouter.defaultProps = {}; | ||
|
||
export default React.memo(AppRouter); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
...c/components/containers/AccountSettings/Account/DeleteAccountModal/DeleteAccountModal.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.