balibabu
commited on
Commit
·
84f80c5
1
Parent(s):
08bab63
feat: add loading to ChatContainer and set font family to inter and add tooltip to Form.Item and download documents on the document list page (#136)
Browse files* feat: download documents on the document list page
* feat: add tooltip to Form.Item
* feat: set font family to inter
* feat: add loading to ChatContainer
This view is limited to 50 files because it contains too many changes.
See raw diff
- web/.umirc.ts +2 -0
- web/src/app.tsx +12 -2
- web/src/assets/inter/Inter-Black.woff2 +0 -0
- web/src/assets/inter/Inter-BlackItalic.woff2 +0 -0
- web/src/assets/inter/Inter-Bold.woff2 +0 -0
- web/src/assets/inter/Inter-BoldItalic.woff2 +0 -0
- web/src/assets/inter/Inter-ExtraBold.woff2 +0 -0
- web/src/assets/inter/Inter-ExtraBoldItalic.woff2 +0 -0
- web/src/assets/inter/Inter-ExtraLight.woff2 +0 -0
- web/src/assets/inter/Inter-ExtraLightItalic.woff2 +0 -0
- web/src/assets/inter/Inter-Italic.woff2 +0 -0
- web/src/assets/inter/Inter-Light.woff2 +0 -0
- web/src/assets/inter/Inter-LightItalic.woff2 +0 -0
- web/src/assets/inter/Inter-Medium.woff2 +0 -0
- web/src/assets/inter/Inter-MediumItalic.woff2 +0 -0
- web/src/assets/inter/Inter-Regular.woff2 +0 -0
- web/src/assets/inter/Inter-SemiBold.woff2 +0 -0
- web/src/assets/inter/Inter-SemiBoldItalic.woff2 +0 -0
- web/src/assets/inter/Inter-Thin.woff2 +0 -0
- web/src/assets/inter/Inter-ThinItalic.woff2 +0 -0
- web/src/assets/inter/InterDisplay-Black.woff2 +0 -0
- web/src/assets/inter/InterDisplay-BlackItalic.woff2 +0 -0
- web/src/assets/inter/InterDisplay-Bold.woff2 +0 -0
- web/src/assets/inter/InterDisplay-BoldItalic.woff2 +0 -0
- web/src/assets/inter/InterDisplay-ExtraBold.woff2 +0 -0
- web/src/assets/inter/InterDisplay-ExtraBoldItalic.woff2 +0 -0
- web/src/assets/inter/InterDisplay-ExtraLight.woff2 +0 -0
- web/src/assets/inter/InterDisplay-ExtraLightItalic.woff2 +0 -0
- web/src/assets/inter/InterDisplay-Italic.woff2 +0 -0
- web/src/assets/inter/InterDisplay-Light.woff2 +0 -0
- web/src/assets/inter/InterDisplay-LightItalic.woff2 +0 -0
- web/src/assets/inter/InterDisplay-Medium.woff2 +0 -0
- web/src/assets/inter/InterDisplay-MediumItalic.woff2 +0 -0
- web/src/assets/inter/InterDisplay-Regular.woff2 +0 -0
- web/src/assets/inter/InterDisplay-SemiBold.woff2 +0 -0
- web/src/assets/inter/InterDisplay-SemiBoldItalic.woff2 +0 -0
- web/src/assets/inter/InterDisplay-Thin.woff2 +0 -0
- web/src/assets/inter/InterDisplay-ThinItalic.woff2 +0 -0
- web/src/assets/inter/InterVariable-Italic.woff2 +0 -0
- web/src/assets/inter/InterVariable.woff2 +0 -0
- web/src/components/similarity-slider/index.tsx +2 -2
- web/src/global.less +5 -0
- web/src/hooks/authHook.ts +0 -1
- web/src/inter.less +273 -0
- web/src/layouts/components/header/index.less +0 -1
- web/src/less/variable.less +0 -2
- web/src/pages/add-knowledge/components/knowledge-file/model.ts +0 -1
- web/src/pages/add-knowledge/components/knowledge-file/parsing-action-cell/index.tsx +23 -1
- web/src/pages/add-knowledge/components/knowledge-setting/configuration.tsx +1 -0
- web/src/pages/add-knowledge/components/knowledge-sidebar/index.less +0 -3
web/.umirc.ts
CHANGED
|
@@ -12,11 +12,13 @@ export default defineConfig({
|
|
| 12 |
icons: {},
|
| 13 |
hash: true,
|
| 14 |
favicons: ['/logo.svg'],
|
|
|
|
| 15 |
history: {
|
| 16 |
type: 'browser',
|
| 17 |
},
|
| 18 |
plugins: ['@react-dev-inspector/umi4-plugin', '@umijs/plugins/dist/dva'],
|
| 19 |
dva: {},
|
|
|
|
| 20 |
lessLoader: {
|
| 21 |
modifyVars: {
|
| 22 |
hack: `true; @import "~@/less/index.less";`,
|
|
|
|
| 12 |
icons: {},
|
| 13 |
hash: true,
|
| 14 |
favicons: ['/logo.svg'],
|
| 15 |
+
clickToComponent: {},
|
| 16 |
history: {
|
| 17 |
type: 'browser',
|
| 18 |
},
|
| 19 |
plugins: ['@react-dev-inspector/umi4-plugin', '@umijs/plugins/dist/dva'],
|
| 20 |
dva: {},
|
| 21 |
+
|
| 22 |
lessLoader: {
|
| 23 |
modifyVars: {
|
| 24 |
hack: `true; @import "~@/less/index.less";`,
|
web/src/app.tsx
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
|
|
| 1 |
import React, { ReactNode } from 'react';
|
| 2 |
-
import { Inspector } from 'react-dev-inspector';
|
| 3 |
|
| 4 |
export function rootContainer(container: ReactNode) {
|
| 5 |
-
return React.createElement(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
}
|
|
|
|
| 1 |
+
import { ConfigProvider } from 'antd';
|
| 2 |
import React, { ReactNode } from 'react';
|
|
|
|
| 3 |
|
| 4 |
export function rootContainer(container: ReactNode) {
|
| 5 |
+
return React.createElement(
|
| 6 |
+
ConfigProvider,
|
| 7 |
+
{
|
| 8 |
+
theme: {
|
| 9 |
+
token: {
|
| 10 |
+
fontFamily: 'Inter',
|
| 11 |
+
},
|
| 12 |
+
},
|
| 13 |
+
},
|
| 14 |
+
container,
|
| 15 |
+
);
|
| 16 |
}
|
web/src/assets/inter/Inter-Black.woff2
ADDED
|
Binary file (109 kB). View file
|
|
|
web/src/assets/inter/Inter-BlackItalic.woff2
ADDED
|
Binary file (115 kB). View file
|
|
|
web/src/assets/inter/Inter-Bold.woff2
ADDED
|
Binary file (111 kB). View file
|
|
|
web/src/assets/inter/Inter-BoldItalic.woff2
ADDED
|
Binary file (118 kB). View file
|
|
|
web/src/assets/inter/Inter-ExtraBold.woff2
ADDED
|
Binary file (111 kB). View file
|
|
|
web/src/assets/inter/Inter-ExtraBoldItalic.woff2
ADDED
|
Binary file (119 kB). View file
|
|
|
web/src/assets/inter/Inter-ExtraLight.woff2
ADDED
|
Binary file (110 kB). View file
|
|
|
web/src/assets/inter/Inter-ExtraLightItalic.woff2
ADDED
|
Binary file (116 kB). View file
|
|
|
web/src/assets/inter/Inter-Italic.woff2
ADDED
|
Binary file (115 kB). View file
|
|
|
web/src/assets/inter/Inter-Light.woff2
ADDED
|
Binary file (110 kB). View file
|
|
|
web/src/assets/inter/Inter-LightItalic.woff2
ADDED
|
Binary file (117 kB). View file
|
|
|
web/src/assets/inter/Inter-Medium.woff2
ADDED
|
Binary file (111 kB). View file
|
|
|
web/src/assets/inter/Inter-MediumItalic.woff2
ADDED
|
Binary file (118 kB). View file
|
|
|
web/src/assets/inter/Inter-Regular.woff2
ADDED
|
Binary file (108 kB). View file
|
|
|
web/src/assets/inter/Inter-SemiBold.woff2
ADDED
|
Binary file (112 kB). View file
|
|
|
web/src/assets/inter/Inter-SemiBoldItalic.woff2
ADDED
|
Binary file (118 kB). View file
|
|
|
web/src/assets/inter/Inter-Thin.woff2
ADDED
|
Binary file (107 kB). View file
|
|
|
web/src/assets/inter/Inter-ThinItalic.woff2
ADDED
|
Binary file (113 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-Black.woff2
ADDED
|
Binary file (107 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-BlackItalic.woff2
ADDED
|
Binary file (114 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-Bold.woff2
ADDED
|
Binary file (110 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-BoldItalic.woff2
ADDED
|
Binary file (118 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-ExtraBold.woff2
ADDED
|
Binary file (110 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-ExtraBoldItalic.woff2
ADDED
|
Binary file (118 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-ExtraLight.woff2
ADDED
|
Binary file (110 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-ExtraLightItalic.woff2
ADDED
|
Binary file (117 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-Italic.woff2
ADDED
|
Binary file (113 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-Light.woff2
ADDED
|
Binary file (110 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-LightItalic.woff2
ADDED
|
Binary file (117 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-Medium.woff2
ADDED
|
Binary file (110 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-MediumItalic.woff2
ADDED
|
Binary file (118 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-Regular.woff2
ADDED
|
Binary file (106 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-SemiBold.woff2
ADDED
|
Binary file (110 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-SemiBoldItalic.woff2
ADDED
|
Binary file (118 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-Thin.woff2
ADDED
|
Binary file (106 kB). View file
|
|
|
web/src/assets/inter/InterDisplay-ThinItalic.woff2
ADDED
|
Binary file (113 kB). View file
|
|
|
web/src/assets/inter/InterVariable-Italic.woff2
ADDED
|
Binary file (381 kB). View file
|
|
|
web/src/assets/inter/InterVariable.woff2
ADDED
|
Binary file (346 kB). View file
|
|
|
web/src/components/similarity-slider/index.tsx
CHANGED
|
@@ -15,7 +15,7 @@ const SimilaritySlider = ({ isTooltipShown = false }: IProps) => {
|
|
| 15 |
<Form.Item<FieldType>
|
| 16 |
label="Similarity threshold"
|
| 17 |
name={'similarity_threshold'}
|
| 18 |
-
tooltip={isTooltipShown && '
|
| 19 |
initialValue={0.2}
|
| 20 |
>
|
| 21 |
<Slider max={1} step={0.01} />
|
|
@@ -24,7 +24,7 @@ const SimilaritySlider = ({ isTooltipShown = false }: IProps) => {
|
|
| 24 |
label="Vector similarity weight"
|
| 25 |
name={'vector_similarity_weight'}
|
| 26 |
initialValue={0.3}
|
| 27 |
-
tooltip={isTooltipShown && '
|
| 28 |
>
|
| 29 |
<Slider max={1} step={0.01} />
|
| 30 |
</Form.Item>
|
|
|
|
| 15 |
<Form.Item<FieldType>
|
| 16 |
label="Similarity threshold"
|
| 17 |
name={'similarity_threshold'}
|
| 18 |
+
tooltip={isTooltipShown && 'coming soon'}
|
| 19 |
initialValue={0.2}
|
| 20 |
>
|
| 21 |
<Slider max={1} step={0.01} />
|
|
|
|
| 24 |
label="Vector similarity weight"
|
| 25 |
name={'vector_similarity_weight'}
|
| 26 |
initialValue={0.3}
|
| 27 |
+
tooltip={isTooltipShown && 'coming soon'}
|
| 28 |
>
|
| 29 |
<Slider max={1} step={0.01} />
|
| 30 |
</Form.Item>
|
web/src/global.less
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@import url(./inter.less);
|
| 2 |
+
|
| 3 |
+
body {
|
| 4 |
+
font-family: Inter;
|
| 5 |
+
}
|
web/src/hooks/authHook.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import authorizationUtil from '@/utils/authorizationUtil';
|
| 2 |
import { message } from 'antd';
|
| 3 |
import { useEffect, useMemo, useState } from 'react';
|
| 4 |
-
import { Nullable } from 'typings';
|
| 5 |
import { useNavigate, useSearchParams } from 'umi';
|
| 6 |
|
| 7 |
export const useLoginWithGithub = () => {
|
|
|
|
| 1 |
import authorizationUtil from '@/utils/authorizationUtil';
|
| 2 |
import { message } from 'antd';
|
| 3 |
import { useEffect, useMemo, useState } from 'react';
|
|
|
|
| 4 |
import { useNavigate, useSearchParams } from 'umi';
|
| 5 |
|
| 6 |
export const useLoginWithGithub = () => {
|
web/src/inter.less
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Variable fonts usage:
|
| 2 |
+
:root { font-family: "Inter", sans-serif; }
|
| 3 |
+
@supports (font-variation-settings: normal) {
|
| 4 |
+
:root { font-family: "InterVariable", sans-serif; font-optical-sizing: auto; }
|
| 5 |
+
} */
|
| 6 |
+
@font-face {
|
| 7 |
+
font-family: InterVariable;
|
| 8 |
+
font-style: normal;
|
| 9 |
+
font-weight: 100 900;
|
| 10 |
+
font-display: swap;
|
| 11 |
+
src: url('@/assets/inter/InterVariable.woff2') format('woff2');
|
| 12 |
+
}
|
| 13 |
+
@font-face {
|
| 14 |
+
font-family: InterVariable;
|
| 15 |
+
font-style: italic;
|
| 16 |
+
font-weight: 100 900;
|
| 17 |
+
font-display: swap;
|
| 18 |
+
src: url('@/assets/inter/InterVariable-Italic.woff2') format('woff2');
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
/* static fonts */
|
| 22 |
+
@font-face {
|
| 23 |
+
font-family: 'Inter';
|
| 24 |
+
font-style: normal;
|
| 25 |
+
font-weight: 100;
|
| 26 |
+
font-display: swap;
|
| 27 |
+
src: url('@/assets/inter/Inter-Thin.woff2') format('woff2');
|
| 28 |
+
}
|
| 29 |
+
@font-face {
|
| 30 |
+
font-family: 'Inter';
|
| 31 |
+
font-style: italic;
|
| 32 |
+
font-weight: 100;
|
| 33 |
+
font-display: swap;
|
| 34 |
+
src: url('@/assets/inter/Inter-ThinItalic.woff2') format('woff2');
|
| 35 |
+
}
|
| 36 |
+
@font-face {
|
| 37 |
+
font-family: 'Inter';
|
| 38 |
+
font-style: normal;
|
| 39 |
+
font-weight: 200;
|
| 40 |
+
font-display: swap;
|
| 41 |
+
src: url('@/assets/inter/Inter-ExtraLight.woff2') format('woff2');
|
| 42 |
+
}
|
| 43 |
+
@font-face {
|
| 44 |
+
font-family: 'Inter';
|
| 45 |
+
font-style: italic;
|
| 46 |
+
font-weight: 200;
|
| 47 |
+
font-display: swap;
|
| 48 |
+
src: url('@/assets/inter/Inter-ExtraLightItalic.woff2') format('woff2');
|
| 49 |
+
}
|
| 50 |
+
@font-face {
|
| 51 |
+
font-family: 'Inter';
|
| 52 |
+
font-style: normal;
|
| 53 |
+
font-weight: 300;
|
| 54 |
+
font-display: swap;
|
| 55 |
+
src: url('@/assets/inter/Inter-Light.woff2') format('woff2');
|
| 56 |
+
}
|
| 57 |
+
@font-face {
|
| 58 |
+
font-family: 'Inter';
|
| 59 |
+
font-style: italic;
|
| 60 |
+
font-weight: 300;
|
| 61 |
+
font-display: swap;
|
| 62 |
+
src: url('@/assets/inter/Inter-LightItalic.woff2') format('woff2');
|
| 63 |
+
}
|
| 64 |
+
@font-face {
|
| 65 |
+
font-family: 'Inter';
|
| 66 |
+
font-style: normal;
|
| 67 |
+
font-weight: 400;
|
| 68 |
+
font-display: swap;
|
| 69 |
+
src: url('@/assets/inter/Inter-Regular.woff2') format('woff2');
|
| 70 |
+
}
|
| 71 |
+
@font-face {
|
| 72 |
+
font-family: 'Inter';
|
| 73 |
+
font-style: italic;
|
| 74 |
+
font-weight: 400;
|
| 75 |
+
font-display: swap;
|
| 76 |
+
src: url('@/assets/inter/Inter-Italic.woff2') format('woff2');
|
| 77 |
+
}
|
| 78 |
+
@font-face {
|
| 79 |
+
font-family: 'Inter';
|
| 80 |
+
font-style: normal;
|
| 81 |
+
font-weight: 500;
|
| 82 |
+
font-display: swap;
|
| 83 |
+
src: url('@/assets/inter/Inter-Medium.woff2') format('woff2');
|
| 84 |
+
}
|
| 85 |
+
@font-face {
|
| 86 |
+
font-family: 'Inter';
|
| 87 |
+
font-style: italic;
|
| 88 |
+
font-weight: 500;
|
| 89 |
+
font-display: swap;
|
| 90 |
+
src: url('@/assets/inter/Inter-MediumItalic.woff2') format('woff2');
|
| 91 |
+
}
|
| 92 |
+
@font-face {
|
| 93 |
+
font-family: 'Inter';
|
| 94 |
+
font-style: normal;
|
| 95 |
+
font-weight: 600;
|
| 96 |
+
font-display: swap;
|
| 97 |
+
src: url('@/assets/inter/Inter-SemiBold.woff2') format('woff2');
|
| 98 |
+
}
|
| 99 |
+
@font-face {
|
| 100 |
+
font-family: 'Inter';
|
| 101 |
+
font-style: italic;
|
| 102 |
+
font-weight: 600;
|
| 103 |
+
font-display: swap;
|
| 104 |
+
src: url('@/assets/inter/Inter-SemiBoldItalic.woff2') format('woff2');
|
| 105 |
+
}
|
| 106 |
+
@font-face {
|
| 107 |
+
font-family: 'Inter';
|
| 108 |
+
font-style: normal;
|
| 109 |
+
font-weight: 700;
|
| 110 |
+
font-display: swap;
|
| 111 |
+
src: url('@/assets/inter/Inter-Bold.woff2') format('woff2');
|
| 112 |
+
}
|
| 113 |
+
@font-face {
|
| 114 |
+
font-family: 'Inter';
|
| 115 |
+
font-style: italic;
|
| 116 |
+
font-weight: 700;
|
| 117 |
+
font-display: swap;
|
| 118 |
+
src: url('@/assets/inter/Inter-BoldItalic.woff2') format('woff2');
|
| 119 |
+
}
|
| 120 |
+
@font-face {
|
| 121 |
+
font-family: 'Inter';
|
| 122 |
+
font-style: normal;
|
| 123 |
+
font-weight: 800;
|
| 124 |
+
font-display: swap;
|
| 125 |
+
src: url('@/assets/inter/Inter-ExtraBold.woff2') format('woff2');
|
| 126 |
+
}
|
| 127 |
+
@font-face {
|
| 128 |
+
font-family: 'Inter';
|
| 129 |
+
font-style: italic;
|
| 130 |
+
font-weight: 800;
|
| 131 |
+
font-display: swap;
|
| 132 |
+
src: url('@/assets/inter/Inter-ExtraBoldItalic.woff2') format('woff2');
|
| 133 |
+
}
|
| 134 |
+
@font-face {
|
| 135 |
+
font-family: 'Inter';
|
| 136 |
+
font-style: normal;
|
| 137 |
+
font-weight: 900;
|
| 138 |
+
font-display: swap;
|
| 139 |
+
src: url('@/assets/inter/Inter-Black.woff2') format('woff2');
|
| 140 |
+
}
|
| 141 |
+
@font-face {
|
| 142 |
+
font-family: 'Inter';
|
| 143 |
+
font-style: italic;
|
| 144 |
+
font-weight: 900;
|
| 145 |
+
font-display: swap;
|
| 146 |
+
src: url('@/assets/inter/Inter-BlackItalic.woff2') format('woff2');
|
| 147 |
+
}
|
| 148 |
+
@font-face {
|
| 149 |
+
font-family: 'InterDisplay';
|
| 150 |
+
font-style: normal;
|
| 151 |
+
font-weight: 100;
|
| 152 |
+
font-display: swap;
|
| 153 |
+
src: url('@/assets/inter/InterDisplay-Thin.woff2') format('woff2');
|
| 154 |
+
}
|
| 155 |
+
@font-face {
|
| 156 |
+
font-family: 'InterDisplay';
|
| 157 |
+
font-style: italic;
|
| 158 |
+
font-weight: 100;
|
| 159 |
+
font-display: swap;
|
| 160 |
+
src: url('@/assets/inter/InterDisplay-ThinItalic.woff2') format('woff2');
|
| 161 |
+
}
|
| 162 |
+
@font-face {
|
| 163 |
+
font-family: 'InterDisplay';
|
| 164 |
+
font-style: normal;
|
| 165 |
+
font-weight: 200;
|
| 166 |
+
font-display: swap;
|
| 167 |
+
src: url('@/assets/inter/InterDisplay-ExtraLight.woff2') format('woff2');
|
| 168 |
+
}
|
| 169 |
+
@font-face {
|
| 170 |
+
font-family: 'InterDisplay';
|
| 171 |
+
font-style: italic;
|
| 172 |
+
font-weight: 200;
|
| 173 |
+
font-display: swap;
|
| 174 |
+
src: url('@/assets/inter/InterDisplay-ExtraLightItalic.woff2') format('woff2');
|
| 175 |
+
}
|
| 176 |
+
@font-face {
|
| 177 |
+
font-family: 'InterDisplay';
|
| 178 |
+
font-style: normal;
|
| 179 |
+
font-weight: 300;
|
| 180 |
+
font-display: swap;
|
| 181 |
+
src: url('@/assets/inter/InterDisplay-Light.woff2') format('woff2');
|
| 182 |
+
}
|
| 183 |
+
@font-face {
|
| 184 |
+
font-family: 'InterDisplay';
|
| 185 |
+
font-style: italic;
|
| 186 |
+
font-weight: 300;
|
| 187 |
+
font-display: swap;
|
| 188 |
+
src: url('@/assets/inter/InterDisplay-LightItalic.woff2') format('woff2');
|
| 189 |
+
}
|
| 190 |
+
@font-face {
|
| 191 |
+
font-family: 'InterDisplay';
|
| 192 |
+
font-style: normal;
|
| 193 |
+
font-weight: 400;
|
| 194 |
+
font-display: swap;
|
| 195 |
+
src: url('@/assets/inter/InterDisplay-Regular.woff2') format('woff2');
|
| 196 |
+
}
|
| 197 |
+
@font-face {
|
| 198 |
+
font-family: 'InterDisplay';
|
| 199 |
+
font-style: italic;
|
| 200 |
+
font-weight: 400;
|
| 201 |
+
font-display: swap;
|
| 202 |
+
src: url('@/assets/inter/InterDisplay-Italic.woff2') format('woff2');
|
| 203 |
+
}
|
| 204 |
+
@font-face {
|
| 205 |
+
font-family: 'InterDisplay';
|
| 206 |
+
font-style: normal;
|
| 207 |
+
font-weight: 500;
|
| 208 |
+
font-display: swap;
|
| 209 |
+
src: url('@/assets/inter/InterDisplay-Medium.woff2') format('woff2');
|
| 210 |
+
}
|
| 211 |
+
@font-face {
|
| 212 |
+
font-family: 'InterDisplay';
|
| 213 |
+
font-style: italic;
|
| 214 |
+
font-weight: 500;
|
| 215 |
+
font-display: swap;
|
| 216 |
+
src: url('@/assets/inter/InterDisplay-MediumItalic.woff2') format('woff2');
|
| 217 |
+
}
|
| 218 |
+
@font-face {
|
| 219 |
+
font-family: 'InterDisplay';
|
| 220 |
+
font-style: normal;
|
| 221 |
+
font-weight: 600;
|
| 222 |
+
font-display: swap;
|
| 223 |
+
src: url('@/assets/inter/InterDisplay-SemiBold.woff2') format('woff2');
|
| 224 |
+
}
|
| 225 |
+
@font-face {
|
| 226 |
+
font-family: 'InterDisplay';
|
| 227 |
+
font-style: italic;
|
| 228 |
+
font-weight: 600;
|
| 229 |
+
font-display: swap;
|
| 230 |
+
src: url('@/assets/inter/InterDisplay-SemiBoldItalic.woff2') format('woff2');
|
| 231 |
+
}
|
| 232 |
+
@font-face {
|
| 233 |
+
font-family: 'InterDisplay';
|
| 234 |
+
font-style: normal;
|
| 235 |
+
font-weight: 700;
|
| 236 |
+
font-display: swap;
|
| 237 |
+
src: url('@/assets/inter/InterDisplay-Bold.woff2') format('woff2');
|
| 238 |
+
}
|
| 239 |
+
@font-face {
|
| 240 |
+
font-family: 'InterDisplay';
|
| 241 |
+
font-style: italic;
|
| 242 |
+
font-weight: 700;
|
| 243 |
+
font-display: swap;
|
| 244 |
+
src: url('@/assets/inter/InterDisplay-BoldItalic.woff2') format('woff2');
|
| 245 |
+
}
|
| 246 |
+
@font-face {
|
| 247 |
+
font-family: 'InterDisplay';
|
| 248 |
+
font-style: normal;
|
| 249 |
+
font-weight: 800;
|
| 250 |
+
font-display: swap;
|
| 251 |
+
src: url('@/assets/inter/InterDisplay-ExtraBold.woff2') format('woff2');
|
| 252 |
+
}
|
| 253 |
+
@font-face {
|
| 254 |
+
font-family: 'InterDisplay';
|
| 255 |
+
font-style: italic;
|
| 256 |
+
font-weight: 800;
|
| 257 |
+
font-display: swap;
|
| 258 |
+
src: url('@/assets/inter/InterDisplay-ExtraBoldItalic.woff2') format('woff2');
|
| 259 |
+
}
|
| 260 |
+
@font-face {
|
| 261 |
+
font-family: 'InterDisplay';
|
| 262 |
+
font-style: normal;
|
| 263 |
+
font-weight: 900;
|
| 264 |
+
font-display: swap;
|
| 265 |
+
src: url('@/assets/inter/InterDisplay-Black.woff2') format('woff2');
|
| 266 |
+
}
|
| 267 |
+
@font-face {
|
| 268 |
+
font-family: 'InterDisplay';
|
| 269 |
+
font-style: italic;
|
| 270 |
+
font-weight: 900;
|
| 271 |
+
font-display: swap;
|
| 272 |
+
src: url('@/assets/inter/InterDisplay-BlackItalic.woff2') format('woff2');
|
| 273 |
+
}
|
web/src/layouts/components/header/index.less
CHANGED
|
@@ -36,7 +36,6 @@
|
|
| 36 |
border: 0 !important;
|
| 37 |
background-color: rgba(249, 249, 249, 1);
|
| 38 |
font-weight: @fontWeight700;
|
| 39 |
-
font-family: 'Nunito Sans';
|
| 40 |
color: rgba(29, 25, 41, 1);
|
| 41 |
&::before {
|
| 42 |
display: none !important;
|
|
|
|
| 36 |
border: 0 !important;
|
| 37 |
background-color: rgba(249, 249, 249, 1);
|
| 38 |
font-weight: @fontWeight700;
|
|
|
|
| 39 |
color: rgba(29, 25, 41, 1);
|
| 40 |
&::before {
|
| 41 |
display: none !important;
|
web/src/less/variable.less
CHANGED
|
@@ -15,5 +15,3 @@
|
|
| 15 |
@fontSize14: 14px;
|
| 16 |
@fontSize16: 16px;
|
| 17 |
@fontSize18: 18px;
|
| 18 |
-
|
| 19 |
-
@fontFamilyNunitoSans: 'Nunito Sans';
|
|
|
|
| 15 |
@fontSize14: 14px;
|
| 16 |
@fontSize16: 16px;
|
| 17 |
@fontSize18: 18px;
|
|
|
|
|
|
web/src/pages/add-knowledge/components/knowledge-file/model.ts
CHANGED
|
@@ -4,7 +4,6 @@ import kbService, { getDocumentFile } from '@/services/kbService';
|
|
| 4 |
import { message } from 'antd';
|
| 5 |
import omit from 'lodash/omit';
|
| 6 |
import pick from 'lodash/pick';
|
| 7 |
-
import { Nullable } from 'typings';
|
| 8 |
import { DvaModel } from 'umi';
|
| 9 |
|
| 10 |
export interface KFModelState extends BaseState {
|
|
|
|
| 4 |
import { message } from 'antd';
|
| 5 |
import omit from 'lodash/omit';
|
| 6 |
import pick from 'lodash/pick';
|
|
|
|
| 7 |
import { DvaModel } from 'umi';
|
| 8 |
|
| 9 |
export interface KFModelState extends BaseState {
|
web/src/pages/add-knowledge/components/knowledge-file/parsing-action-cell/index.tsx
CHANGED
|
@@ -1,10 +1,17 @@
|
|
| 1 |
import showDeleteConfirm from '@/components/deleting-confirm';
|
| 2 |
import { IKnowledgeFile } from '@/interfaces/database/knowledge';
|
| 3 |
-
import {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
import { Button, Dropdown, MenuProps, Space, Tooltip } from 'antd';
|
| 5 |
import { useDispatch } from 'umi';
|
| 6 |
import { isParserRunning } from '../utils';
|
| 7 |
|
|
|
|
|
|
|
| 8 |
import styles from './index.less';
|
| 9 |
|
| 10 |
interface IProps {
|
|
@@ -38,6 +45,13 @@ const ParsingActionCell = ({
|
|
| 38 |
}
|
| 39 |
};
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
const setCurrentRecord = () => {
|
| 42 |
dispatch({
|
| 43 |
type: 'kFModel/setCurrentRecord',
|
|
@@ -110,6 +124,14 @@ const ParsingActionCell = ({
|
|
| 110 |
>
|
| 111 |
<DeleteOutlined size={20} />
|
| 112 |
</Button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
</Space>
|
| 114 |
);
|
| 115 |
};
|
|
|
|
| 1 |
import showDeleteConfirm from '@/components/deleting-confirm';
|
| 2 |
import { IKnowledgeFile } from '@/interfaces/database/knowledge';
|
| 3 |
+
import {
|
| 4 |
+
DeleteOutlined,
|
| 5 |
+
DownloadOutlined,
|
| 6 |
+
EditOutlined,
|
| 7 |
+
ToolOutlined,
|
| 8 |
+
} from '@ant-design/icons';
|
| 9 |
import { Button, Dropdown, MenuProps, Space, Tooltip } from 'antd';
|
| 10 |
import { useDispatch } from 'umi';
|
| 11 |
import { isParserRunning } from '../utils';
|
| 12 |
|
| 13 |
+
import { api_host } from '@/utils/api';
|
| 14 |
+
import { downloadFile } from '@/utils/fileUtil';
|
| 15 |
import styles from './index.less';
|
| 16 |
|
| 17 |
interface IProps {
|
|
|
|
| 45 |
}
|
| 46 |
};
|
| 47 |
|
| 48 |
+
const onDownloadDocument = () => {
|
| 49 |
+
downloadFile({
|
| 50 |
+
url: `${api_host}/document/get/${documentId}`,
|
| 51 |
+
filename: record.name,
|
| 52 |
+
});
|
| 53 |
+
};
|
| 54 |
+
|
| 55 |
const setCurrentRecord = () => {
|
| 56 |
dispatch({
|
| 57 |
type: 'kFModel/setCurrentRecord',
|
|
|
|
| 124 |
>
|
| 125 |
<DeleteOutlined size={20} />
|
| 126 |
</Button>
|
| 127 |
+
<Button
|
| 128 |
+
type="text"
|
| 129 |
+
disabled={isRunning}
|
| 130 |
+
onClick={onDownloadDocument}
|
| 131 |
+
className={styles.iconButton}
|
| 132 |
+
>
|
| 133 |
+
<DownloadOutlined size={20} />
|
| 134 |
+
</Button>
|
| 135 |
</Space>
|
| 136 |
);
|
| 137 |
};
|
web/src/pages/add-knowledge/components/knowledge-setting/configuration.tsx
CHANGED
|
@@ -91,6 +91,7 @@ const Configuration = () => {
|
|
| 91 |
<Form.Item
|
| 92 |
name="permission"
|
| 93 |
label="Permissions"
|
|
|
|
| 94 |
rules={[{ required: true }]}
|
| 95 |
>
|
| 96 |
<Radio.Group>
|
|
|
|
| 91 |
<Form.Item
|
| 92 |
name="permission"
|
| 93 |
label="Permissions"
|
| 94 |
+
tooltip="coming soon"
|
| 95 |
rules={[{ required: true }]}
|
| 96 |
>
|
| 97 |
<Radio.Group>
|
web/src/pages/add-knowledge/components/knowledge-sidebar/index.less
CHANGED
|
@@ -8,7 +8,6 @@
|
|
| 8 |
.knowledgeLogo {
|
| 9 |
}
|
| 10 |
.knowledgeTitle {
|
| 11 |
-
font-family: 'Nunito Sans';
|
| 12 |
font-size: 16px;
|
| 13 |
line-height: 24px;
|
| 14 |
font-weight: @fontWeight700;
|
|
@@ -16,7 +15,6 @@
|
|
| 16 |
margin-bottom: 6px;
|
| 17 |
}
|
| 18 |
.knowledgeDescription {
|
| 19 |
-
font-family: 'Nunito Sans';
|
| 20 |
font-size: 12px;
|
| 21 |
font-weight: @fontWeight600;
|
| 22 |
color: @gray8;
|
|
@@ -55,7 +53,6 @@
|
|
| 55 |
|
| 56 |
.menuText {
|
| 57 |
color: @gray3;
|
| 58 |
-
font-family: @fontFamilyNunitoSans;
|
| 59 |
font-size: @fontSize14;
|
| 60 |
font-weight: @fontWeight700;
|
| 61 |
}
|
|
|
|
| 8 |
.knowledgeLogo {
|
| 9 |
}
|
| 10 |
.knowledgeTitle {
|
|
|
|
| 11 |
font-size: 16px;
|
| 12 |
line-height: 24px;
|
| 13 |
font-weight: @fontWeight700;
|
|
|
|
| 15 |
margin-bottom: 6px;
|
| 16 |
}
|
| 17 |
.knowledgeDescription {
|
|
|
|
| 18 |
font-size: 12px;
|
| 19 |
font-weight: @fontWeight600;
|
| 20 |
color: @gray8;
|
|
|
|
| 53 |
|
| 54 |
.menuText {
|
| 55 |
color: @gray3;
|
|
|
|
| 56 |
font-size: @fontSize14;
|
| 57 |
font-weight: @fontWeight700;
|
| 58 |
}
|