From bc28cc0ac755fd660663daf5c3aa745ed76de953 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Tue, 24 Sep 2024 16:56:53 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/application/template/embed.js | 2 +- .../components/ai-chat/LogOperationButton.vue | 10 ++-- ui/src/components/ai-chat/OperationButton.vue | 15 +++--- ui/src/components/ai-chat/index.vue | 8 ++- ui/src/components/icons/index.ts | 54 ++++++++++++++++++- .../base-node/component/FieldFormDialog.vue | 25 +++++---- ui/vite.config.ts | 2 +- 7 files changed, 81 insertions(+), 35 deletions(-) diff --git a/apps/application/template/embed.js b/apps/application/template/embed.js index 5dca36dfa..a21e06c88 100644 --- a/apps/application/template/embed.js +++ b/apps/application/template/embed.js @@ -225,7 +225,7 @@ function initMaxkbStyle(root){ } #maxkb-chat-container { - width: 420px; + width: 450px; height: 600px; display:none; } diff --git a/ui/src/components/ai-chat/LogOperationButton.vue b/ui/src/components/ai-chat/LogOperationButton.vue index 78ab02027..10dd47165 100644 --- a/ui/src/components/ai-chat/LogOperationButton.vue +++ b/ui/src/components/ai-chat/LogOperationButton.vue @@ -7,12 +7,14 @@
- - + + - - + + + + diff --git a/ui/src/components/ai-chat/OperationButton.vue b/ui/src/components/ai-chat/OperationButton.vue index ae5273c87..6a1254296 100644 --- a/ui/src/components/ai-chat/OperationButton.vue +++ b/ui/src/components/ai-chat/OperationButton.vue @@ -7,17 +7,14 @@
- - + + - - + + + + diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index 6ba956f99..5d5845826 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -196,9 +196,7 @@ >00:{{ recorderTime < 10 ? `0${recorderTime}` : recorderTime }} - - - +
@@ -853,7 +851,7 @@ const startRecording = async () => { 2、若无 https 配置则需要修改浏览器安全配置,Chrome 设置如下:
(1) 地址栏输入chrome://flags/#unsafely-treat-insecure-origin-as-secure;
(2) 将 http 站点配置在文本框中,例如: http://127.0.0.1:8080。

- `, + `, { confirmButtonText: '我知道了', dangerouslyUseHTMLString: true, @@ -871,7 +869,7 @@ const startRecording = async () => { 2、若无 https 配置则需要修改浏览器安全配置,Chrome 设置如下:
(1) 地址栏输入chrome://flags/#unsafely-treat-insecure-origin-as-secure;
(2) 将 http 站点配置在文本框中,例如: http://127.0.0.1:8080。

- `, + `, { confirmButtonText: '我知道了', dangerouslyUseHTMLString: true, diff --git a/ui/src/components/icons/index.ts b/ui/src/components/icons/index.ts index 5c3ddb568..d241b2113 100644 --- a/ui/src/components/icons/index.ts +++ b/ui/src/components/icons/index.ts @@ -1143,13 +1143,63 @@ export const iconMap: any = { 'svg', { style: { height: '100%', width: '100%' }, - viewBox: '0 0 16 16', + viewBox: '0 0 1024 1024', version: '1.1', xmlns: 'http://www.w3.org/2000/svg' }, [ h('path', { - d: 'M7.66667 3.68233V12.3177L4.66667 10.01V5.99L7.66667 3.68233ZM7.89333 2C7.74633 2 7.60333 2.04867 7.487 2.13833L3.59367 5.13333C3.42933 5.25933 3.33333 5.45467 3.33333 5.66167V10.3383C3.33333 10.5453 3.42933 10.7407 3.59367 10.8667L7.487 13.8617C7.60333 13.9513 7.74633 14 7.89333 14H8.33333C8.70167 14 9 13.7017 9 13.3333V2.66667C9 2.29833 8.70167 2 8.33333 2H7.89333ZM1 5.66667C1 5.48267 1.14933 5.33333 1.33333 5.33333H2C2.184 5.33333 2.33333 5.48267 2.33333 5.66667V10.3333C2.33333 10.5173 2.184 10.6667 2 10.6667H1.33333C1.14933 10.6667 1 10.5173 1 10.3333V5.66667ZM13.2973 12.1873C13.1727 12.3153 12.968 12.3107 12.8417 12.184L12.3723 11.715C12.2373 11.58 12.244 11.36 12.3757 11.222C13.1757 10.3843 13.6667 9.24967 13.6667 8C13.6667 6.75467 13.179 5.62333 12.384 4.78667C12.253 4.64833 12.2467 4.42933 12.3813 4.29467L12.8507 3.82533C12.9773 3.69867 13.182 3.694 13.307 3.82267C14.355 4.903 15 6.376 15 8C15 9.62867 14.351 11.106 13.2973 12.1873ZM11.4043 10.3087C11.2833 10.4347 11.084 10.4263 10.9603 10.303L10.4987 9.84099C10.3573 9.69966 10.3737 9.46733 10.5053 9.31666C10.8133 8.96499 11 8.50433 11 7.99999C11 7.49966 10.816 7.04199 10.5123 6.69133C10.382 6.54066 10.3663 6.30933 10.507 6.16866L10.9693 5.70666C11.0933 5.58266 11.2933 5.57466 11.4143 5.70166C11.9837 6.29966 12.3333 7.10899 12.3333 7.99999C12.3333 8.89599 11.9797 9.70966 11.4043 10.3087Z', + d: 'M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768z m469.333333-384c0 259.2-210.133333 469.333333-469.333333 469.333333S42.666667 771.2 42.666667 512 252.8 42.666667 512 42.666667s469.333333 210.133333 469.333333 469.333333z', + fill: 'currentColor' + }), + h('path', { + d: 'M686.890667 539.776l-253.141334 159.274667a32.298667 32.298667 0 0 1-44.8-10.453334 32.896 32.896 0 0 1-4.949333-17.322666V352.768a32.64 32.64 0 0 1 32.512-32.768c6.101333 0 12.074667 1.706667 17.28 4.992l253.098667 159.232a32.853333 32.853333 0 0 1 0 55.552z', + fill: 'currentColor' + }) + ] + ) + ]) + } + }, + 'app-video-stop': { + 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: 'M981.333333 512c0 259.2-210.133333 469.333333-469.333333 469.333333S42.666667 771.2 42.666667 512 252.8 42.666667 512 42.666667s469.333333 210.133333 469.333333 469.333333z m-85.333333 0a384 384 0 1 0-768 0 384 384 0 0 0 768 0zM384 341.333333h256c23.466667 0 42.666667 19.072 42.666667 42.666667v256c0 23.552-19.2 42.666667-42.666667 42.666667H384c-23.466667 0-42.666667-19.114667-42.666667-42.666667V384c0-23.594667 19.2-42.666667 42.666667-42.666667z', + fill: 'currentColor' + }) + ] + ) + ]) + } + }, + 'app-video-pause': { + 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: 'M405.333333 341.333333a21.333333 21.333333 0 0 0-21.333333 21.333334v298.666666a21.333333 21.333333 0 0 0 21.333333 21.333334h42.666667a21.333333 21.333333 0 0 0 21.333333-21.333334v-298.666666a21.333333 21.333333 0 0 0-21.333333-21.333334h-42.666667zM576 341.333333a21.333333 21.333333 0 0 0-21.333333 21.333334v298.666666a21.333333 21.333333 0 0 0 21.333333 21.333334h42.666667a21.333333 21.333333 0 0 0 21.333333-21.333334v-298.666666a21.333333 21.333333 0 0 0-21.333333-21.333334h-42.666667z', + fill: 'currentColor' + }), + h('path', { + d: 'M512 42.666667C252.8 42.666667 42.666667 252.8 42.666667 512s210.133333 469.333333 469.333333 469.333333 469.333333-210.133333 469.333333-469.333333S771.2 42.666667 512 42.666667zM128 512a384 384 0 1 1 768 0 384 384 0 0 1-768 0z', fill: 'currentColor' }) ] diff --git a/ui/src/workflow/nodes/base-node/component/FieldFormDialog.vue b/ui/src/workflow/nodes/base-node/component/FieldFormDialog.vue index 38b52af1c..76414eaea 100644 --- a/ui/src/workflow/nodes/base-node/component/FieldFormDialog.vue +++ b/ui/src/workflow/nodes/base-node/component/FieldFormDialog.vue @@ -43,23 +43,22 @@ - + +
+ + + + +
diff --git a/ui/vite.config.ts b/ui/vite.config.ts index 6c442abd1..9638244d6 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -12,7 +12,7 @@ export default defineConfig(({ mode }) => { const prefix = process.env.VITE_DYNAMIC_PREFIX || ENV.VITE_BASE_PATH; const proxyConf: Record = {} proxyConf['/api'] = { - target: 'http://127.0.0.1:8080', + target: 'http://81.70.36.87:8000', changeOrigin: true, rewrite: (path) => path.replace(ENV.VITE_BASE_PATH, '/') }