Skip to content

Commit

Permalink
feat 个人账号页面修改 (labring#22)
Browse files Browse the repository at this point in the history
* feat 添加标签部分

feat 信息团队标签配置

feat 新增团队同步管理

feat team分享页面

feat 完成team分享页面

feat 实现模糊搜索

style 格式化

fix 修复迷糊匹配

style 样式修改

fix 团队标签功能修复

* fix 修复鉴权功能

* merge 合并代码

* fix 修复引用错误

* fix 修复pr问题

* fix 修复ts格式问题

* feat 修改个人账号页

---------

Co-authored-by: liuxingwan <liuxingwan.lxw@alibaba-inc.com>
  • Loading branch information
yu-and-liu and liuxingwan committed Feb 23, 2024
1 parent be06882 commit 5c434cf
Show file tree
Hide file tree
Showing 18 changed files with 683 additions and 7 deletions.
28 changes: 28 additions & 0 deletions packages/global/support/user/constant.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { StandardSubLevelEnum } from "../wallet/sub/constants"
export enum UserStatusEnum {
active = 'active',
forbidden = 'forbidden'
Expand All @@ -20,3 +21,30 @@ export enum UserAuthTypeEnum {
register = 'register',
findPassword = 'findPassword'
}

export const standardInfoMap = {
[StandardSubLevelEnum.free]: {
maxTeamNum: '1',
maxAppNum: '1',
maxPreservation: 7,
other: ['10 万积分≈40 次对话 = 2 元']
},
[StandardSubLevelEnum.experience]: {
maxTeamNum: '5',
maxAppNum: '5',
maxPreservation: 30,
other: ['200 万积分 ≈ 800 次对话', '优先训练功能', '24 h/次 web 站点同步', '24 h/次 导出知识库 ', '重排优先级(选不同卡) ']
},
[StandardSubLevelEnum.team]: {
maxTeamNum: '10',
maxAppNum: '10',
maxPreservation: 90,
other: ['1500 万积分 ≈ 6000 次对话', '中级优先训练功能', '个人 key(不扣积分)', '自定义版权 logo,title,分享链接去水印 ', '12 h/次 web 站点同步 ', '12 h/次 导出知识库 ', '高级重排优先级(选不同卡) ']
},
[StandardSubLevelEnum.enterprise]: {
maxTeamNum: '50',
maxAppNum: '50',
maxPreservation: 360,
other: ['5000 万积分 ≈ 20000 次对话 ', '高级优先训练功能', '个人 key(不扣积分)', '自定义版权 logo,title,分享链接去水印 ', '6 h/次 web 站点同步', '6 h/次 导出知识库 ', '高级重排优先级(选不同卡) ']
},
}
26 changes: 26 additions & 0 deletions packages/global/support/user/type.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,31 @@ export type UserModelSchema = {
baseUrl: string;
};
};
export enum UserStandardEnum {
free = 'free',
trial = 'trial',
team = 'team',
enterprise = 'enterprise'
}

export type standardInfoType = {
datasetMaxSize: number,
expiredTime: string,
currentSubLevel: `${UserStandardEnum}`,
totalPoints: number,
currentMode: string,
pointPrice: number,
price: number,
status: string,
surplusPoints: number,
totalPoints: number,
type: string,
standardMaxDatasetSize: number,
standardMaxPoints: number,
totalPoints: number,
usedDatasetSize: number,
usedPoints: number,
}

export type UserType = {
_id: string;
Expand All @@ -29,4 +54,5 @@ export type UserType = {
promotionRate: UserModelSchema['promotionRate'];
openaiAccount: UserModelSchema['openaiAccount'];
team: TeamItemType;
standardInfo?: standardInfoType
};
3 changes: 2 additions & 1 deletion packages/global/support/wallet/sub/type.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ export type TeamSubSchema = {

export type FeTeamSubType = {
[SubTypeEnum.standard]?: TeamSubSchema;

totalPoints: number;
usedPoints: number;
standardMaxDatasetSize?: number,
standardMaxPoints?: number,

// standard + extra
datasetMaxSize: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/service/support/permission/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,4 @@ export const authFileToken = (token?: string) =>
fileId: decoded.fileId
});
});
});
});
7 changes: 7 additions & 0 deletions packages/web/components/common/Icon/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ export const iconPaths = {
closeSolid: () => import('./icons/closeSolid.svg'),
collectionLight: () => import('./icons/collectionLight.svg'),
collectionSolid: () => import('./icons/collectionSolid.svg'),
'acount/cube': () => import('./icons/acount/cube.svg'),
'acount/personalized': () => import('./icons/acount/personalized.svg'),
'acount/user': () => import('./icons/acount/user.svg'),
'acount/plans': () => import('./icons/acount/plans.svg'),
'acount/check': () => import('./icons/acount/check.svg'),
'acount/arrowRight': () => import('./icons/acount/arrowRight.svg'),
'acount/plansBlue': () => import('./icons/acount/plansBlue.svg'),
'common/addCircleLight': () => import('./icons/common/addCircleLight.svg'),
'common/backFill': () => import('./icons/common/backFill.svg'),
'common/backLight': () => import('./icons/common/backLight.svg'),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/web/components/common/Icon/icons/acount/check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/web/components/common/Icon/icons/acount/cube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions packages/web/components/common/Icon/icons/acount/plans.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/web/components/common/Icon/icons/acount/user.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions projects/app/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"Logs Title": "Title",
"Mark Count": "Mark Count",
"My Apps": "My Apps",
"Apps Share": "Apps Share",
"Output Field Settings": "Output Field Settings",
"Paste Config": "Paste Config",
"To Chat": "To Chat Page",
Expand Down Expand Up @@ -131,9 +132,11 @@
"Select One Folder": "Select a folder",
"Select template": "Select template",
"Set Avatar": "Set Avatar",
"Set Team Tags": "Set Team Tags",
"Set Name": "Make a nice name",
"Set Team Tags": "Set Team Tags",
"Setting": "Setting",
"Team Tags Set": "Team Tags",
"Status": "Status",
"Submit failed": "Submit failed",
"Submit success": "Update Success",
Expand Down Expand Up @@ -1378,6 +1381,10 @@
"Confirm Invite": "Confirm Invite",
"Create Team": "Create Team",
"Invite Member": "Invite",
"Team Tags Async": "Team Tags Async",
"Team Tags Async Success": "Team Tags Async Success",
"Team Tags Async Tip": "Fill in the tag sync connection to get the latest",
"Tags Async": "Tag synchronization",
"Invite Member Failed Tip": "Invite Member Failed",
"Invite Member Result Tip": "Invite Member Result",
"Invite Member Success Tip": "Invite member completed \n successful :{{success}} Person \n username invalid :{{inValid}}\n Already on team :{{inTeam}}",
Expand Down
Loading

0 comments on commit 5c434cf

Please sign in to comment.