mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
perf: user default avatar (#2594)
* perf: user default avatar * refactor: 修改文件路径
This commit is contained in:
@@ -6,6 +6,19 @@ import { UserStatusEnum, userStatusMap } from '@fastgpt/global/support/user/cons
|
|||||||
|
|
||||||
export const userCollectionName = 'users';
|
export const userCollectionName = 'users';
|
||||||
|
|
||||||
|
const defaultAvatars = [
|
||||||
|
'/imgs/avatar/RoyalBlueAvatar.svg',
|
||||||
|
'/imgs/avatar/PurpleAvatar.svg',
|
||||||
|
'/imgs/avatar/AdoraAvatar.svg',
|
||||||
|
'/imgs/avatar/OrangeAvatar.svg',
|
||||||
|
'/imgs/avatar/RedAvatar.svg',
|
||||||
|
'/imgs/avatar/GrayModernAvatar.svg',
|
||||||
|
'/imgs/avatar/TealAvatar.svg',
|
||||||
|
'/imgs/avatar/GreenAvatar.svg',
|
||||||
|
'/imgs/avatar/BrightBlueAvatar.svg',
|
||||||
|
'/imgs/avatar/BlueAvatar.svg'
|
||||||
|
];
|
||||||
|
|
||||||
const UserSchema = new Schema({
|
const UserSchema = new Schema({
|
||||||
status: {
|
status: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -34,7 +47,7 @@ const UserSchema = new Schema({
|
|||||||
},
|
},
|
||||||
avatar: {
|
avatar: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '/icon/human.svg'
|
default: defaultAvatars[Math.floor(Math.random() * defaultAvatars.length)]
|
||||||
},
|
},
|
||||||
inviterId: {
|
inviterId: {
|
||||||
// 谁邀请注册的
|
// 谁邀请注册的
|
||||||
|
BIN
projects/app/public/imgs/avatar/AdoraAvatar.svg
Normal file
BIN
projects/app/public/imgs/avatar/AdoraAvatar.svg
Normal file
Binary file not shown.
BIN
projects/app/public/imgs/avatar/BlueAvatar.svg
Normal file
BIN
projects/app/public/imgs/avatar/BlueAvatar.svg
Normal file
Binary file not shown.
BIN
projects/app/public/imgs/avatar/BrightBlueAvatar.svg
Normal file
BIN
projects/app/public/imgs/avatar/BrightBlueAvatar.svg
Normal file
Binary file not shown.
BIN
projects/app/public/imgs/avatar/GrayModernAvatar.svg
Normal file
BIN
projects/app/public/imgs/avatar/GrayModernAvatar.svg
Normal file
Binary file not shown.
BIN
projects/app/public/imgs/avatar/GreenAvatar.svg
Normal file
BIN
projects/app/public/imgs/avatar/GreenAvatar.svg
Normal file
Binary file not shown.
BIN
projects/app/public/imgs/avatar/OrangeAvatar.svg
Normal file
BIN
projects/app/public/imgs/avatar/OrangeAvatar.svg
Normal file
Binary file not shown.
BIN
projects/app/public/imgs/avatar/PurpleAvatar.svg
Normal file
BIN
projects/app/public/imgs/avatar/PurpleAvatar.svg
Normal file
Binary file not shown.
BIN
projects/app/public/imgs/avatar/RedAvatar.svg
Normal file
BIN
projects/app/public/imgs/avatar/RedAvatar.svg
Normal file
Binary file not shown.
BIN
projects/app/public/imgs/avatar/RoyalBlueAvatar.svg
Normal file
BIN
projects/app/public/imgs/avatar/RoyalBlueAvatar.svg
Normal file
Binary file not shown.
BIN
projects/app/public/imgs/avatar/TealAvatar.svg
Normal file
BIN
projects/app/public/imgs/avatar/TealAvatar.svg
Normal file
Binary file not shown.
Reference in New Issue
Block a user