diff --git a/ui/src/components/app-icon/icons/document.ts b/ui/src/components/app-icon/icons/document.ts index faf47e913..8d3cc40b9 100644 --- a/ui/src/components/app-icon/icons/document.ts +++ b/ui/src/components/app-icon/icons/document.ts @@ -20,6 +20,7 @@ export default { ]) }, }, + 'app-document-active': { iconReader: () => { return h('i', [ @@ -52,4 +53,88 @@ export default { ]) }, }, + 'app-close': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 16 16', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg', + }, + [ + h('path', { + d: 'M7.96141 6.98572L12.4398 2.50738C12.5699 2.3772 12.781 2.3772 12.9112 2.50738L13.3826 2.97878C13.5127 3.10895 13.5127 3.32001 13.3826 3.45018L8.90422 7.92853L13.3826 12.4069C13.5127 12.537 13.5127 12.7481 13.3826 12.8783L12.9112 13.3497C12.781 13.4799 12.5699 13.4799 12.4398 13.3497L7.96141 8.87134L3.48307 13.3497C3.35289 13.4799 3.14184 13.4799 3.01166 13.3497L2.54026 12.8783C2.41008 12.7481 2.41008 12.537 2.54026 12.4069L7.0186 7.92853L2.54026 3.45018C2.41008 3.32001 2.41008 3.10895 2.54026 2.97878L3.01166 2.50738C3.14184 2.3772 3.35289 2.3772 3.48307 2.50738L7.96141 6.98572Z', + fill: 'currentColor', + }), + ], + ), + ]) + }, + }, + 'app-document-refresh': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 1024 1024', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg', + }, + [ + h('path', { + d: 'M512 170.666667a85.333333 85.333333 0 0 1 85.333333-85.333334h256a85.333333 85.333333 0 0 1 85.333334 85.333334v256a85.333333 85.333333 0 0 1-85.333334 85.333333h-256a85.333333 85.333333 0 0 1-85.333333-85.333333V170.666667z m85.333333 0v256h256V170.666667h-256zM85.333333 597.333333a85.333333 85.333333 0 0 1 85.333334-85.333333h256a85.333333 85.333333 0 0 1 85.333333 85.333333v256a85.333333 85.333333 0 0 1-85.333333 85.333334H170.666667a85.333333 85.333333 0 0 1-85.333334-85.333334v-256z m85.333334 0v256h256v-256H170.666667zM128 298.666667a213.333333 213.333333 0 0 1 213.333333-213.333334h85.333334v85.333334H341.333333a128 128 0 0 0-128 128h57.514667a12.8 12.8 0 0 1 9.728 21.12l-100.181333 116.906666a12.8 12.8 0 0 1-19.456 0l-100.181334-116.906666A12.8 12.8 0 0 1 70.485333 298.666667H128zM896 725.333333a213.333333 213.333333 0 0 1-213.333333 213.333334h-85.333334v-85.333334h85.333334a128 128 0 0 0 128-128v-21.333333h-57.514667a12.8 12.8 0 0 1-9.728-21.12l100.181333-116.906667a12.8 12.8 0 0 1 19.456 0l100.181334 116.906667a12.8 12.8 0 0 1-9.728 21.12H896v21.333333z', + fill: 'currentColor', + }), + ], + ), + ]) + }, + }, + 'app-migrate': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 1024 1024', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg' + }, + [ + h('path', { + d: 'M896.128 113.792a42.666667 42.666667 0 0 1 42.24 36.864l0.426667 5.802667v711.509333a42.666667 42.666667 0 0 1-36.906667 42.24l-5.76 0.426667h-263.082667a21.333333 21.333333 0 0 1-20.906666-17.066667l-0.426667-4.266667v-42.666666a21.333333 21.333333 0 0 1 17.066667-20.906667l4.266666-0.426667h220.416V199.125333H281.941333l0.042667 192.170667a21.333333 21.333333 0 0 1-21.333333 21.333333h-42.666667a21.333333 21.333333 0 0 1-21.333333-21.333333V135.125333a21.333333 21.333333 0 0 1 17.066666-20.906666l4.266667-0.426667h678.144zM424.96 485.973333c6.272 0 12.373333 2.218667 17.152 6.272l178.858667 151.338667a26.538667 26.538667 0 0 1 0 40.533333l-178.858667 151.381334a26.538667 26.538667 0 0 1-43.690667-20.266667v-103.765333H135.168a21.333333 21.333333 0 0 1-21.333333-21.333334v-42.666666a21.333333 21.333333 0 0 1 21.333333-21.333334H398.506667l-0.042667-113.621333c0-14.677333 11.904-26.538667 26.538667-26.538667z', + fill: 'currentColor' + }) + ] + ) + ]) + } + }, + 'app-export': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 1024 1024', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg' + }, + [ + h('path', { + d: 'M791.04 554.24l-386.432-1.728a21.248 21.248 0 0 1-21.12-21.248L383.36 490.88c-0.064-11.776 9.408-21.376 21.12-21.44h0.192l394.112 1.728-97.664-98.112a21.44 21.44 0 0 1 0-30.208l30.08-30.144a21.12 21.12 0 0 1 29.952 0l165.12 165.952a42.88 42.88 0 0 1 0 60.288l-165.12 165.952a21.12 21.12 0 0 1-30.016 0l-30.016-30.144a21.44 21.44 0 0 1 0-30.208L791.04 554.24z m-132.672-383.552H170.24v682.624h488.128c11.712 0 21.184 9.6 21.184 21.376v42.624a21.248 21.248 0 0 1-21.248 21.376h-530.56A42.56 42.56 0 0 1 85.376 896V128c0-23.552 19.008-42.688 42.496-42.688h530.56c11.712 0 21.184 9.6 21.184 21.376v42.624a21.248 21.248 0 0 1-21.248 21.376z', + fill: 'currentColor' + }) + ] + ) + ]) + } + }, } diff --git a/ui/src/components/index.ts b/ui/src/components/index.ts index 436d703a0..2c07e4856 100644 --- a/ui/src/components/index.ts +++ b/ui/src/components/index.ts @@ -14,6 +14,7 @@ import AppTable from './app-table/index.vue' import CodemirrorEditor from './codemirror-editor/index.vue' import InfiniteScroll from './infinite-scroll/index.vue' import ModelSelect from './model-select/index.vue' +import ReadWrite from './read-write/index.vue' export default { install(app: App) { app.component('LogoFull', LogoFull) @@ -31,5 +32,6 @@ export default { app.component('CodemirrorEditor', CodemirrorEditor) app.component('InfiniteScroll', InfiniteScroll) app.component('ModelSelect', ModelSelect) + app.component('ReadWrite', ReadWrite) }, } diff --git a/ui/src/components/read-write/index.vue b/ui/src/components/read-write/index.vue new file mode 100644 index 000000000..f01cbb9b7 --- /dev/null +++ b/ui/src/components/read-write/index.vue @@ -0,0 +1,126 @@ + + + diff --git a/ui/src/enums/document.ts b/ui/src/enums/document.ts new file mode 100644 index 000000000..5863029d7 --- /dev/null +++ b/ui/src/enums/document.ts @@ -0,0 +1,4 @@ +export enum hitHandlingMethod { + optimization = 'views.document.hitHandlingMethod.optimization', + directly_return = 'views.document.hitHandlingMethod.directly_return' +} diff --git a/ui/src/views/document/index.vue b/ui/src/views/document/index.vue index de8bf2916..e6dec4a19 100644 --- a/ui/src/views/document/index.vue +++ b/ui/src/views/document/index.vue @@ -9,50 +9,70 @@ {{ $t('views.document.uploadDocument') }} {{ $t('views.document.importDocument') }} - {{ $t('views.document.syncDocument') }} - - {{ $t('views.document.importDocument') }} - - {{ $t('views.document.syncDocument') }} - - - {{ $t('views.document.setting.migration') }} - + {{ $t('views.knowledge.setting.vectorization') }} {{ $t('views.document.generateQuestion.title') }} - - {{ $t('common.setting') }} - - - {{ $t('common.delete') }} + + {{ $t('views.document.setting.migration') }} + + + + + + - - - - + + + + + @@ -300,43 +327,50 @@