Skip to content

Commit

Permalink
feat(web): add recommend template & change ui (#1323)
Browse files Browse the repository at this point in the history
* feat(web): add recommended template
---------

Co-authored-by: 0fatal <2816813070@qq.com>
  • Loading branch information
newfish-cmyk and 0fatal authored Jun 28, 2023
1 parent bbe16b8 commit 5bcc259
Show file tree
Hide file tree
Showing 29 changed files with 1,284 additions and 897 deletions.
12 changes: 8 additions & 4 deletions web/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"PromptDescription": "Use natural language to describe your needs, laf will help you generate code, for example: help me write a hello world, return {hello: 'laf AI'}",
"CreateWithAITip": "Create functions with AI assistance",
"CreateNow": "Create Now",
"CreateFromTemplate": "Templates",
"CreateFromTemplate": "More Templates",
"getCodeOnline": "Retrieve the latest released online code",
"versionHistory": "Version History",
"Restore": "Restore"
Expand Down Expand Up @@ -463,7 +463,7 @@
"Recent": "Recently Used",
"AddEnvironmentVariables": "Add environment variables",
"Create": "new build",
"CommunityTemplate": "Community Template",
"CommunityTemplate": "All Template",
"CreateTemplate": "New template",
"DeleteTemplate": "Delete template",
"CreatedAt": "Created at",
Expand Down Expand Up @@ -497,12 +497,16 @@
"UsedSuccessfully": "Use successfully",
"EmptyTemplate": "Template Empty",
"AddMore": "Add More",
"Save": "Save"
"Save": "Save",
"Recommended": "Recommended Template",
"confirm": "If there are missing dependencies, the application will be automatically restarted. Are you sure you want to use this template?"
},
"Create function template success": "Create function template successfully",
"Publish": "release",
"Update function template success": "Update function template succeeded",
"Today": "Today",
"Yesterday": "Yesterday",
"DaysAgo": " Days Ago"
"DaysAgo": " Days Ago",
"WeeksAgo": " Weeks Ago",
"MonthsAgo": " Months Ago"
}
14 changes: 9 additions & 5 deletions web/public/locales/zh-CN/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"PromptDescription": "使用自然语言描述你的需求, laf 会帮你生成代码, 例如: 写一个 hello world ,返回 {hello: 'laf AI'}",
"CreateWithAITip": "使用 AI 辅助创建函数",
"CreateNow": "立即创建",
"CreateFromTemplate": "通过模板创建",
"CreateFromTemplate": "更多模板",
"getCodeOnline": "获取线上最新发布的代码",
"versionHistory": "历史版本",
"Restore": "恢复"
Expand Down Expand Up @@ -463,20 +463,22 @@
"UsedSuccessfully": "使用成功",
"Select the application you want to use": "选择你要使用的应用",
"FunctionNameExist": "函数名已存在",
"CommunityTemplate": "社区模板",
"CommunityTemplate": "所有模板",
"StaredTemplate": "我收藏的",
"Recent": "最近使用",
"Earliest": "按时间最早",
"MostStars": "按收藏数最多",
"Latest": "按时间最新",
"Latest": "按更新时间最新",
"Please select template permission": "请选择模板权限",
"Please enter template name": "请输入模板名",
"EditTemplate": "编辑模板",
"DeleteTemplate": "删除模板",
"FunctionListEmpty": "请至少添加一个函数",
"EmptyTemplate": "暂无模板",
"AddMore": "继续添加",
"Save": "保存"
"Save": "保存",
"Recommended": "推荐模板",
"confirm": "如果存在依赖包未安装,将会自动重启应用,确定使用该模板吗?"
},
"Fee": "费用",
"PleaseCloseApplicationFirst": "请先关闭应用",
Expand Down Expand Up @@ -504,5 +506,7 @@
"State": "状态",
"Yesterday": "昨天",
"Today": "今天",
"DaysAgo": " 天前"
"DaysAgo": " 天前",
"MonthsAgo": " 月前",
"WeeksAgo": " 周前"
}
14 changes: 9 additions & 5 deletions web/public/locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"PromptDescription": "使用自然语言描述你的需求, laf 会帮你生成代码, 例如: 写一个 hello world ,返回 {hello: 'laf AI'}",
"CreateWithAITip": "使用 AI 辅助创建函数",
"CreateNow": "立即创建",
"CreateFromTemplate": "通过模板创建",
"CreateFromTemplate": "更多模板",
"getCodeOnline": "获取线上最新发布的代码",
"versionHistory": "历史版本",
"Restore": "恢复"
Expand Down Expand Up @@ -463,20 +463,22 @@
"UsedSuccessfully": "使用成功",
"Select the application you want to use": "选择你要使用的应用",
"FunctionNameExist": "函数名已存在",
"CommunityTemplate": "社区模板",
"CommunityTemplate": "所有模板",
"StaredTemplate": "我收藏的",
"Recent": "最近使用",
"Earliest": "按时间最早",
"MostStars": "按收藏数最多",
"Latest": "按时间最新",
"Latest": "按更新时间最新",
"Please select template permission": "请选择模板权限",
"Please enter template name": "请输入模板名",
"EditTemplate": "编辑模板",
"DeleteTemplate": "删除模板",
"FunctionListEmpty": "请至少添加一个函数",
"EmptyTemplate": "暂无模板",
"AddMore": "继续添加",
"Save": "保存"
"Save": "保存",
"Recommended": "推荐模板",
"confirm": "如果存在依赖包未安装,将会自动重启应用,确定使用该模板吗?"
},
"Fee": "费用",
"PleaseCloseApplicationFirst": "请先关闭应用",
Expand Down Expand Up @@ -504,5 +506,7 @@
"Storage Threshold": "内存阈值",
"Yesterday": "昨天",
"Today": "今天",
"DaysAgo": " 天前"
"DaysAgo": " 天前",
"MonthsAgo": " 月前",
"WeeksAgo": " 周前"
}
10 changes: 10 additions & 0 deletions web/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
height: 6px;
}

body::-webkit-scrollbar {
width: 0;
height: 0;
}

/* 滚动槽 */
::-webkit-scrollbar-track {
border-radius: 2px;
Expand Down Expand Up @@ -66,3 +71,8 @@ a {
background: black;
}
}

.chakra-portal {
position: relative;
z-index: 9999;
}
Loading

0 comments on commit 5bcc259

Please sign in to comment.