mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Format file format from Windows/dos to Unix (#1949)
### What problem does this PR solve? Related source file is in Windows/DOS format, they are format to Unix format. ### Type of change - [x] Refactoring Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
清华大学,2,985,清华
|
清华大学,2,985,清华
|
||||||
清华大学,2,985,Tsinghua University
|
清华大学,2,985,Tsinghua University
|
||||||
清华大学,2,985,THU
|
清华大学,2,985,THU
|
||||||
北京大学,1,985,北大
|
北京大学,1,985,北大
|
||||||
|
|||||||
|
@ -1,27 +1,26 @@
|
|||||||
import React, { useReducer } from 'react'
|
import React, { useReducer } from 'react';
|
||||||
const CHANGE_LOCALE = 'CHANGE_LOCALE'
|
const CHANGE_LOCALE = 'CHANGE_LOCALE';
|
||||||
|
|
||||||
const mainContext = React.createContext()
|
const mainContext = React.createContext();
|
||||||
|
|
||||||
const reducer = (state, action) => {
|
const reducer = (state, action) => {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case CHANGE_LOCALE:
|
case CHANGE_LOCALE:
|
||||||
return { ...state, locale: action.locale || 'zh' }
|
return { ...state, locale: action.locale || 'zh' };
|
||||||
default:
|
default:
|
||||||
return state
|
return state;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const ContextProvider = (props) => {
|
const ContextProvider = (props) => {
|
||||||
const [state, dispatch] = useReducer(reducer, {
|
const [state, dispatch] = useReducer(reducer, {
|
||||||
locale: 'zh'
|
locale: 'zh',
|
||||||
})
|
});
|
||||||
return (
|
return (
|
||||||
<mainContext.Provider value={{ state, dispatch }}>
|
<mainContext.Provider value={{ state, dispatch }}>
|
||||||
{props.children}
|
{props.children}
|
||||||
</mainContext.Provider>
|
</mainContext.Provider>
|
||||||
)
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
export { reducer, mainContext, ContextProvider }
|
|
||||||
|
|
||||||
|
export { ContextProvider, mainContext, reducer };
|
||||||
|
|||||||
@ -2,15 +2,18 @@ import { Button, Result } from 'antd';
|
|||||||
import { history } from 'umi';
|
import { history } from 'umi';
|
||||||
|
|
||||||
const NoFoundPage = () => {
|
const NoFoundPage = () => {
|
||||||
return (<Result
|
return (
|
||||||
|
<Result
|
||||||
status="404"
|
status="404"
|
||||||
title="404"
|
title="404"
|
||||||
subTitle="页面未找到,请输入正确的地址。"
|
subTitle="页面未找到,请输入正确的地址。"
|
||||||
extra={< Button type="primary" onClick={() => history.push('/')}>
|
extra={
|
||||||
|
<Button type="primary" onClick={() => history.push('/')}>
|
||||||
返回主页
|
返回主页
|
||||||
</Button>}
|
</Button>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default NoFoundPage;
|
export default NoFoundPage;
|
||||||
|
|||||||
@ -4,7 +4,7 @@ module.exports = {
|
|||||||
// 'menu-dark-color': '',
|
// 'menu-dark-color': '',
|
||||||
// 'menu-dark-danger-color': '',
|
// 'menu-dark-danger-color': '',
|
||||||
'menu-dark-bg': '#092140',
|
'menu-dark-bg': '#092140',
|
||||||
'menu-dark-item-active-bg': '#092140'
|
'menu-dark-item-active-bg': '#092140',
|
||||||
|
|
||||||
// 'menu-dark-arrow-color': '',
|
// 'menu-dark-arrow-color': '',
|
||||||
// 'menu-dark-inline-submenu-bg': '',
|
// 'menu-dark-inline-submenu-bg': '',
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "./src/.umi/tsconfig.json",
|
"extends": "./src/.umi/tsconfig.json",
|
||||||
"@@/*": [
|
"@@/*": ["src/.umi/*"],
|
||||||
"src/.umi/*",
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user