feat(client): magic link sign-in

Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
2025-12-25 01:38:43 +08:00
committed by Asai Neko
parent e4e15b2f6e
commit 606c74c587
12 changed files with 167 additions and 631 deletions

View File

@@ -9,10 +9,16 @@
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
import { Route as rootRouteImport } from './routes/__root'
import { Route as MagicLinkSentRouteImport } from './routes/magicLinkSent'
import { Route as LoginRouteImport } from './routes/login'
import { Route as SidebarLayoutRouteImport } from './routes/_sidebarLayout'
import { Route as SidebarLayoutIndexRouteImport } from './routes/_sidebarLayout/index'
const MagicLinkSentRoute = MagicLinkSentRouteImport.update({
id: '/magicLinkSent',
path: '/magicLinkSent',
getParentRoute: () => rootRouteImport,
} as any)
const LoginRoute = LoginRouteImport.update({
id: '/login',
path: '/login',
@@ -30,33 +36,49 @@ const SidebarLayoutIndexRoute = SidebarLayoutIndexRouteImport.update({
export interface FileRoutesByFullPath {
'/login': typeof LoginRoute
'/magicLinkSent': typeof MagicLinkSentRoute
'/': typeof SidebarLayoutIndexRoute
}
export interface FileRoutesByTo {
'/login': typeof LoginRoute
'/magicLinkSent': typeof MagicLinkSentRoute
'/': typeof SidebarLayoutIndexRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
'/_sidebarLayout': typeof SidebarLayoutRouteWithChildren
'/login': typeof LoginRoute
'/magicLinkSent': typeof MagicLinkSentRoute
'/_sidebarLayout/': typeof SidebarLayoutIndexRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths: '/login' | '/'
fullPaths: '/login' | '/magicLinkSent' | '/'
fileRoutesByTo: FileRoutesByTo
to: '/login' | '/'
id: '__root__' | '/_sidebarLayout' | '/login' | '/_sidebarLayout/'
to: '/login' | '/magicLinkSent' | '/'
id:
| '__root__'
| '/_sidebarLayout'
| '/login'
| '/magicLinkSent'
| '/_sidebarLayout/'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
SidebarLayoutRoute: typeof SidebarLayoutRouteWithChildren
LoginRoute: typeof LoginRoute
MagicLinkSentRoute: typeof MagicLinkSentRoute
}
declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/magicLinkSent': {
id: '/magicLinkSent'
path: '/magicLinkSent'
fullPath: '/magicLinkSent'
preLoaderRoute: typeof MagicLinkSentRouteImport
parentRoute: typeof rootRouteImport
}
'/login': {
id: '/login'
path: '/login'
@@ -96,6 +118,7 @@ const SidebarLayoutRouteWithChildren = SidebarLayoutRoute._addFileChildren(
const rootRouteChildren: RootRouteChildren = {
SidebarLayoutRoute: SidebarLayoutRouteWithChildren,
LoginRoute: LoginRoute,
MagicLinkSentRoute: MagicLinkSentRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)