Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web): add function template #1264

Merged
merged 10 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(web): add server code
  • Loading branch information
newfish-cmyk committed Jun 13, 2023
commit 4f48b8b64e56c55506e12c527b4cff64174b4a45
17 changes: 15 additions & 2 deletions web/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,19 @@
"Description": "Enter function template description",
"updatedAt": "Updated At",
"UsedBy": "Used By",
"Draft": "Draft"
"Draft": "Draft",
"AddEnvironmentVariables": "Add Environment Variables",
"Total": "Total",
"UsedSuccessfully": "Used Successfully",
"Select the application you want to use": "Select the application you want to use",
"recentUsed": "Recent Used",
"myStar": "My Star",
"myTemplate": "My Template",
"recommend": "Recommend",
"MostRecent": "Most Recent",
"useTemplateSuccess": "Use Template Success",
"cancelStarSuccess": "Cancel Star Success",
"starSuccess": "Star Success"
},
"Fee": "Fee",
"PleaseCloseApplicationFirst": "Please close your application first.",
Expand All @@ -483,5 +495,6 @@
"Stop": "Stop",
"SendMessagePlaceHolder": "Send a message",
"Publish": "Publish",
"MyTemplate": "My Template"
"MyTemplate": "My Template",
"Create function template success": "Create function template success"
}
17 changes: 15 additions & 2 deletions web/public/locales/zh-CN/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,19 @@
"Description": "请输入函数模板介绍信息",
"updatedAt": "更新于",
"UsedBy": "应用者",
"Draft": "草稿"
"Draft": "草稿",
"AddEnvironmentVariables": "添加环境变量",
"Total": "总数",
"UsedSuccessfully": "应用成功",
"Select the application you want to use": "选择你要使用的应用",
"recentUsed": "最近使用",
"myStar": "我收藏的",
"myTemplate": "我创建的",
"recommend": "推荐模板",
"MostRecent": "按时间最新",
"useTemplateSuccess": "函数模板使用成功",
"cancelStarSuccess": "取消收藏成功",
"starSuccess": "收藏成功"
},
"Fee": "费用",
"PleaseCloseApplicationFirst": "请先关闭应用",
Expand All @@ -482,5 +494,6 @@
"Stop": "停止",
"SendMessagePlaceHolder": "提问",
"Publish": "发布",
"MyTemplate": "我的模板"
"MyTemplate": "我的模板",
"Create function template success": "创建函数模板成功"
}
17 changes: 15 additions & 2 deletions web/public/locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,19 @@
"Description": "请输入函数模板介绍信息",
"updatedAt": "更新于",
"UsedBy": "应用者",
"Draft": "草稿"
"Draft": "草稿",
"AddEnvironmentVariables": "添加环境变量",
"Total": "总数",
"UsedSuccessfully": "应用成功",
"Select the application you want to use": "选择你要使用的应用",
"recentUsed": "最近使用",
"myStar": "我收藏的",
"myTemplate": "我创建的",
"recommend": "推荐模板",
"MostRecent": "按时间最新",
"useTemplateSuccess": "函数模板使用成功",
"cancelStarSuccess": "取消收藏成功",
"starSuccess": "收藏成功"
},
"Fee": "费用",
"PleaseCloseApplicationFirst": "请先关闭应用",
Expand All @@ -483,5 +495,6 @@
"Stop": "停止",
"SendMessagePlaceHolder": "提问",
"Publish": "发布",
"MyTemplate": "我的模板"
"MyTemplate": "我的模板",
"Create function template success": "创建函数模板成功"
}
18 changes: 18 additions & 0 deletions web/src/apis/typing.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,24 @@ export type Source = {
lang: any;
};

export type TFunctionTemplate = {
_id: string;
name: string;
description: string;
private: boolean;
createdAt: string;
updatedAt: string;
star: number;
items: { name: string; source: { code: string } }[];
dependencies: string[];
environments: { name: string; value: string }[];
};

export type TemplateList = {
list: TFunctionTemplate[];
total: number;
};

export type TLogItem = {
_id: string;
request_id: string;
Expand Down
Loading