diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/assets/background.png | bin | 0 -> 319351 bytes | |||
-rw-r--r-- | api/assets/fosscord-login.css | 23 | ||||
-rw-r--r-- | api/assets/schemas.json | 3 | ||||
-rw-r--r-- | api/src/routes/users/@me/index.ts | 9 |
4 files changed, 30 insertions, 5 deletions
diff --git a/api/assets/background.png b/api/assets/background.png new file mode 100644 index 00000000..58369ab8 --- /dev/null +++ b/api/assets/background.png Binary files differdiff --git a/api/assets/fosscord-login.css b/api/assets/fosscord-login.css index d507c545..ca0af064 100644 --- a/api/assets/fosscord-login.css +++ b/api/assets/fosscord-login.css @@ -14,7 +14,7 @@ } h3.title-jXR8lp.marginBottom8-AtZOdT.base-1x0h_U.size24-RIRrxO::after { margin-top: -32px; - content: "Welcome to Fosscord!"; + content: "Welcome to Slowcord!"; visibility: visible; display: block; } @@ -62,7 +62,22 @@ h3.title-jXR8lp.marginBottom8-AtZOdT.base-1x0h_U.size24-RIRrxO::after { margin-top: -16px; } -/* shrink login box to same size as register */ -.authBoxExpanded-2jqaBe { - width: 480px !important; +/* funny styling */ +.wrapper-6URcxg { + justify-content: flex-start !important; + + background: url("/assets/background.png"); + background-size: 100% 100%; + background-repeat: no-repeat; +} + +.authBoxExpanded-2jqaBe, +.authBox-hW6HRx { + width: max(40vw, 500px) !important; + height: 100vh !important; + padding: 100px !important; + display: flex; + justify-content: center; + align-items: center; + border-radius: 0 !important; } diff --git a/api/assets/schemas.json b/api/assets/schemas.json index 441752ad..555129e3 100644 --- a/api/assets/schemas.json +++ b/api/assets/schemas.json @@ -7039,6 +7039,9 @@ }, "code": { "type": "string" + }, + "email": { + "type": "string" } }, "definitions": { diff --git a/api/src/routes/users/@me/index.ts b/api/src/routes/users/@me/index.ts index d32b44f9..a8465e3c 100644 --- a/api/src/routes/users/@me/index.ts +++ b/api/src/routes/users/@me/index.ts @@ -1,5 +1,5 @@ import { Router, Request, Response } from "express"; -import { User, PrivateUserProjection, emitEvent, UserUpdateEvent, handleFile, FieldErrors } from "@fosscord/util"; +import { User, PrivateUserProjection, emitEvent, UserUpdateEvent, handleFile, FieldErrors, adjustEmail } from "@fosscord/util"; import { route } from "@fosscord/api"; import bcrypt from "bcrypt"; @@ -21,6 +21,7 @@ export interface UserModifySchema { password?: string; new_password?: string; code?: string; + email?: string; } router.get("/", route({}), async (req: Request, res: Response) => { @@ -46,6 +47,12 @@ router.patch("/", route({ body: "UserModifySchema" }), async (req: Request, res: } } + if (body.email) { + body.email = adjustEmail(body.email); + if (!body.email) + throw FieldErrors({ email: { message: req.t("auth:register.EMAIL_INVALID"), code: "EMAIL_INVALID" } }); + } + user.assign(body); if (body.new_password) { |