summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--README.md21
-rw-r--r--api/assets/background.pngbin0 -> 319351 bytes
-rw-r--r--api/assets/fosscord-login.css23
-rw-r--r--api/assets/schemas.json3
-rw-r--r--api/src/routes/users/@me/index.ts9
-rw-r--r--bundle/package-lock.json45
-rw-r--r--bundle/package.json2
7 files changed, 78 insertions, 25 deletions
diff --git a/README.md b/README.md

index 1bcea1e3..679f531d 100644 --- a/README.md +++ b/README.md
@@ -14,22 +14,5 @@ </a> </p> -## [About](https://fosscord.com) - -This repository contains: - -- [Fosscord HTTP API Server](/api) -- [WebSocket Gateway Server](/gateway) -- [HTTP CDN Server](/cdn) -- [Utility and Database Models](/util) -- [RTC Server](/rtc) -- [WebRTC Server](/webrtc) -- [Admin Dashboard](/dashboard) - -## [Resources](https://docs.fosscord.com/resources/) - -- [Contributing](https://docs.fosscord.com/contributing/server/) - -## [Setup](https://docs.fosscord.com/setup/server/) - -- [Download](https://github.com/fosscord/fosscord-server/releases) +Branch that [slowcord.maddy.k.vu](https://slowcord.maddy.k.vu) runs. +Generally up to date with master, also contains my fixes/etc that aren't yet merged. \ No newline at end of file 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 d531df21..1b905197 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) { diff --git a/bundle/package-lock.json b/bundle/package-lock.json
index f6e46bc1..9707c7bf 100644 --- a/bundle/package-lock.json +++ b/bundle/package-lock.json
@@ -18834,6 +18834,51 @@ } } }, + "typescript-cached-transpile": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typescript-cached-transpile/-/typescript-cached-transpile-0.0.6.tgz", + "integrity": "sha512-bfPc7YUW0PrVkQHU0xN0ANRuxdPgoYYXtZEW6PNkH5a97/AOM+kPPxSTMZbpWA3BG1do22JUkfC60KoCKJ9VZQ==", + "requires": { + "@types/node": "^12.12.7", + "fs-extra": "^8.1.0", + "tslib": "^1.10.0" + }, + "dependencies": { + "@types/node": { + "version": "12.20.41", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.41.tgz", + "integrity": "sha512-f6xOqucbDirG7LOzedpvzjP3UTmHttRou3Mosx3vL9wr9AIQGhcPgVnqa8ihpZYnxyM1rxeNCvTyukPKZtq10Q==" + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + } + } + }, "typescript-json-schema": { "version": "0.50.1", "integrity": "sha512-GCof/SDoiTDl0qzPonNEV4CHyCsZEIIf+mZtlrjoD8vURCcEzEfa2deRuxYid8Znp/e27eDR7Cjg8jgGrimBCA==", diff --git a/bundle/package.json b/bundle/package.json
index 3754a3bf..7d68427f 100644 --- a/bundle/package.json +++ b/bundle/package.json
@@ -111,4 +111,4 @@ "typescript-json-schema": "^0.50.1", "ws": "^7.4.2" } -} +} \ No newline at end of file