mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-01 03:45:53 -05:00
Added a secure password generator to admin customer user manager and
user account manager as shown below:
## Extra Details:
- Added a reusable password field component with:
- 17-character random password generation
- Uppercase and lowercase letters
- Numbers
- Symbols
- Password visibility toggle button
- Clipboard copy button after the new password is generated
- Integrated the feature into:
- Admin customer user creation area
- Admin customer user editing area
- Customer User account settings
<img width="430" height="466"
alt="{2DD29137-22E3-4446-8DB5-4F37AD322DF2}"
src="https://github.com/user-attachments/assets/03ef614a-3f4e-4ba6-bdbc-1a99e07959c6"
/>
<img width="427" height="120"
alt="{A3073146-78CD-459C-A837-EBAB72E8ABA4}"
src="https://github.com/user-attachments/assets/5c9cf583-4941-4c0d-893a-fe85c4e46f3c"
/>
<img width="413" height="142"
alt="{2DB05B11-7781-403D-ABC1-CEF11D31E1E8}"
src="https://github.com/user-attachments/assets/0131b770-9120-4f14-8bbd-8dfc374e6263"
/>
<img width="457" height="249"
alt="{8AA4DACE-CBA4-41F1-A5FA-F1EEB3B72632}"
src="https://github.com/user-attachments/assets/2f3004fe-74b2-4060-82eb-ac3f12d5f00f"
/>
Admin SPA (/panel)
React admin area that reuses the shared Panel data and UI architecture. It is the
only admin destination exposed by the frontend navigation. The legacy Blade panel at
/admin remains available by direct URL while the backend cutover is completed.
How it's wired
- Base route:
/panel, defined inresources/scripts/router/routeTree.tsunder the authenticated route tree and rendered byAdminLayout. - Route loaders: preload page-critical data through TanStack Query
queryOptionsexported fromapi/**/queries.ts. - Data layer:
api/admin/*calls the dedicated Admin API (/api/admin/*) with the first-party session cookie. The public/api/applicationAPI is not used. - State: TanStack Query owns API data. Zustand/ServerContext are not used for admin API data.
- Errors: mutation and transient server errors use Sonner through domain query hooks
and
notifyHttpError; blocking screen errors renderServerError.
Adding a domain (follow users/)
api/admin/<domain>/get<Domain>.tscalls the Admin API, maps response data, and returns typed data.api/admin/<domain>/queries.tsexports sharedqueryOptions, query hooks, mutation hooks, cache updates, and Sonner error/success handling.components/admin/<domain>/<Domain>Container.tsxrendersAdminContentBlock,Pagination, rows, empty states, and blockingServerErrorretry UI.- Register routes and page-critical loaders in
router/routeTree.ts, using the same query options as the component hooks.