Skip to content

Commit

Permalink
merge:合并0.3.2到0.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
QwQ-wuwuwu committed Jul 3, 2024
2 parents 9e9f5cc + f05168c commit e214baa
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 8 deletions.
9 changes: 7 additions & 2 deletions src/frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,13 @@
}

@font-face {
font-family: text-security-disc;
src: url("assets/text-security-disc.woff") format("woff");
font-family: AlibabaPuHuiTi-3-55-Regular;
/* src: url("assets/text-security-disc.woff") format("woff"); */
src: url("assets/AlibabaPuHuiTi-3-55-Regular.otf") format("opentype");
}

:root {
--font-sans: 'AlibabaPuHuiTi-3-55-Regular'
}

/* pdf-text */
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function TaggingSheet({children}) {
{(provided) => (
<div ref={provided.innerRef} {...provided.draggableProps}
{...provided.dragHandleProps}>
{b.name}
{index + 1} + {b.name}
</div>
)}
</Draggable>
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/controllers/API/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const actions = [
{name:'删除应用',value:'delete_build'},{name:'新建知识库',value:'create_knowledge'},{name:'删除知识库',value:'delete_knowledge'},{name:'知识库上传文件',value:'upload_file'},
{name:'知识库删除文件',value:'delete_file'},{name:'用户编辑',value:'update_user'},{name:'停用用户',value:'forbid_user'},{name:'启用用户',value:'recover_user'},
{name:'新建用户组',value:'create_user_group'},{name:'删除用户组',value:'delete_user_group'},{name:'编辑用户组',value:'update_user_group'},{name:'新建角色',value:'create_role'},
{name:'删除角色',value:'delete_role'},{name:'编辑角色',value:'update_role'}
{name:'删除角色',value:'delete_role'},{name:'编辑角色',value:'update_role'},{name:'用户登录',value:'user_login'}
]

// 全部操作行为
Expand Down
15 changes: 12 additions & 3 deletions src/frontend/src/layout/MainLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { userContext } from "../contexts/userContext";
import { logoutApi } from "../controllers/API/user";
import { captureAndAlertRequestErrorHoc } from "../controllers/request";
import { User } from "../types/api/user";
import { bsConfirm } from "@/components/bs-ui/alertDialog/useConfirm";

export default function MainLayout() {
const { dark, setDark } = useContext(darkContext);
Expand All @@ -38,9 +39,17 @@ export default function MainLayout() {
const { language, options, changLanguage, t } = useLanguage(user)

const handleLogout = () => {
captureAndAlertRequestErrorHoc(logoutApi()).then(_ => {
setUser(null)
localStorage.removeItem('isLogin')
bsConfirm({
title: `${t('prompt')}!`,
desc: `${t('menu.logoutDescription')}?`,
okTxt: t('system.confirm'),
onOk(next) {
captureAndAlertRequestErrorHoc(logoutApi()).then(_ => {
setUser(null)
localStorage.removeItem('isLogin')
})
next()
}
})
}

Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/pages/LogPage/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ export function transformEvent(event: string): string {
case 'create_role': return '新建角色';
case 'delete_role': return '删除角色';
case 'update_role': return '编辑角色';
case 'user_login': return '用户登录';
default: return '转换失败'
}
}

export function transformObjectType(object: string): string {
switch(object) {
case 'none': return '无'
case 'flow': return '技能'
case 'assistant': return '助手'
case 'knowledge': return '知识库'
Expand Down
4 changes: 4 additions & 0 deletions src/frontend/src/style/applies.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
@apply border-border;
}

#root {
@apply font-sans;
}

body {
@apply bg-background text-foreground;
font-feature-settings: "rlig" 1, "calt" 1;
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { viteStaticCopy } from 'vite-plugin-static-copy';
import svgr from "vite-plugin-svgr";

// Use environment variable to determine the target.
const target = process.env.VITE_PROXY_TARGET || "http://192.168.106.120:3003";
const target = process.env.VITE_PROXY_TARGET || "http://192.168.106.120:3002";
const apiRoutes = ["^/api/", "/health"];

const proxyTargets = apiRoutes.reduce((proxyObj, route) => {
Expand Down

0 comments on commit e214baa

Please sign in to comment.