feat: account linking and merge UI for cabinet

Add Connected Accounts page (link/unlink OAuth providers), Link OAuth
Callback handler, and Merge Accounts page with subscription comparison
and user choice. Includes API methods, TypeScript types, routes in
App.tsx, navigation from Profile, and i18n for all 4 locales (ru, en,
zh, fa). Merge page works without JWT auth (validated by merge token).
This commit is contained in:
Fringg
2026-03-04 07:25:45 +03:00
parent 8157ca5f02
commit 93f97d45be
12 changed files with 1253 additions and 2 deletions

View File

@@ -39,6 +39,9 @@ const Connection = lazy(() => import('./pages/Connection'));
const ConnectionQR = lazy(() => import('./pages/ConnectionQR'));
const TopUpMethodSelect = lazy(() => import('./pages/TopUpMethodSelect'));
const TopUpAmount = lazy(() => import('./pages/TopUpAmount'));
const ConnectedAccounts = lazy(() => import('./pages/ConnectedAccounts'));
const LinkOAuthCallback = lazy(() => import('./pages/LinkOAuthCallback'));
const MergeAccounts = lazy(() => import('./pages/MergeAccounts'));
// Admin pages - lazy load (only for admins)
const AdminPanel = lazy(() => import('./pages/AdminPanel'));
@@ -183,6 +186,14 @@ function App() {
<Route path="/auth/oauth/callback" element={<OAuthCallback />} />
<Route path="/verify-email" element={<VerifyEmail />} />
<Route path="/reset-password" element={<ResetPassword />} />
<Route
path="/merge/:mergeToken"
element={
<LazyPage>
<MergeAccounts />
</LazyPage>
}
/>
{/* Protected routes */}
<Route
@@ -295,6 +306,26 @@ function App() {
</ProtectedRoute>
}
/>
<Route
path="/profile/accounts"
element={
<ProtectedRoute>
<LazyPage>
<ConnectedAccounts />
</LazyPage>
</ProtectedRoute>
}
/>
<Route
path="/auth/link/callback"
element={
<ProtectedRoute>
<LazyPage>
<LinkOAuthCallback />
</LazyPage>
</ProtectedRoute>
}
/>
<Route
path="/contests"
element={