31 lines
3.9 KiB
Markdown
31 lines
3.9 KiB
Markdown
# Login
|
|
|
|
`/login` · `apps/wall-street-plaza/src/app/(auth)/login/page.tsx` · Type: login · Layout: [layout.md](layout.md) (the `(auth)` layout renders nothing)
|
|
|
|
| Field | Value |
|
|
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| Robots | `noindex` (root layout `metadata`, `src/configs/seo.ts`) |
|
|
| Status | `200` |
|
|
| loading.tsx | `(auth)/login/loading.tsx` |
|
|
| First flush | none |
|
|
| Canonical | none |
|
|
| H1 | in the browser only: `auth:login.title` on the number step, `auth:login.code-title` on the code step, in `LoginTemplate`; the brand line is a `<p>` |
|
|
| JSON-LD | none |
|
|
| Scripts | none |
|
|
|
|
## Sections
|
|
|
|
| Section | Data | HTML | JS | Index | Notes |
|
|
| ---------------------------- | ------ | ----------- | ------- | ----- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
| Brand line | config | first flush | none | no | «لومینا · پنل ادمین» as text, not a link |
|
|
| GuestGuard | viewer | skeleton | hydrate | no | the form skeleton in the card until the viewer is known; a signed-in admin goes to `returnTo` (same-site paths only) or `/health` |
|
|
| ↳ LoginTemplate: number step | — | skeleton | hydrate | no | the H1, the phone field (autofocus) and «ارسال کد»; a `<Suspense>` covers `useSearchParams` |
|
|
| ↳ Code step | — | none | hydrate | no | replaces the number step in memory; `OtpInput` without WebOTP; «ویرایش شماره» goes back |
|
|
| ↳ Resend countdown | clock | none | hydrate | no | `useSecondsLeft` in the template |
|
|
|
|
## Notes
|
|
|
|
- The form is the same for every visitor, but it renders only in the browser behind `GuestGuard`, as 0013 does for the public apps (proposed 0062). The skill's login map puts the H1 and the phone form in the first flush; this page keeps them a skeleton by that decision.
|
|
- Debt: `LoginTemplate.tsx:24-27` reads `Date.now()` in a state initializer and runs its own `setInterval` per component. Move the resend countdown to a shared clock hook; neither island nor garden-roof has one yet.
|
|
- Debt: `(auth)/login/loading.tsx:16` lacks the brand line that the page draws over the card, so the card moves down when the page arrives. Draw the brand line in the loading frame too.
|