v4: users can't rename themselves, /settings lays out again, and its selectors fit a phone — PATCH /api/me refuses a username with a 400 and changes nothing else in that request; a name changes only through PATCH /api/users/:key/username, which needs user:manage, from /@name/manage. The old name still stays an alias for good. renameUser lost its 30-day limit and its exempt flag, and RENAME_LIMITS holds the slug limit alone. /settings shows the username as plain text, and the rename hint left the catalogs. The settings grid sized its control column to its widest content, the rename hint, which stretched every control under it; that column now takes the remaining width and each control keeps its own size. A segmented control wraps instead of overflowing; in a settings row on a phone it takes the full width, and one of more than 4 options (the styles) lays out in two even rows. .btn-border turned red on hover, so Settings, Manage, Retry and Back looked like Log out; it is now neutral (Smooth's accent is red too), and only Log out takes the new btn-border--danger, muted until hovered red. A <button> and a <Link> .btn-border are now the same height. API.md and the module docs say who renames; the backend tests rename through the moderator route and check a self-rename is refused, and the malformed-name check moved to the manage tab's test. 254 backend and 667 frontend tests pass, and tsc, deno check and doc:lint are clean; Smooth, Brutalist, GeoCities and Kanagawa were checked in screenshots at desktop and phone widths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -102,12 +102,11 @@ export interface RegisterUserRequest {
|
||||
|
||||
/**
|
||||
* Passed to `updateUser` by the users routes and the password reset, and sent
|
||||
* by a client to `PATCH /api/me`, which takes only `description`, `email` and
|
||||
* `username`; the role and the password change through their own endpoints,
|
||||
* and the username through `renameUser`.
|
||||
* by a client to `PATCH /api/me`, which takes only `description` and `email`;
|
||||
* the role and the password change through their own endpoints, and the
|
||||
* username through `renameUser`, by a moderator only.
|
||||
*/
|
||||
export interface UpdateUserRequest {
|
||||
username?: string;
|
||||
password?: string;
|
||||
role?: Role;
|
||||
/** An empty string clears it. Null, like undefined, keeps it. */
|
||||
|
||||
Reference in New Issue
Block a user