From db21356437f84f9ebae76d5282cac46de37937b0 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Wed, 6 Mar 2024 13:58:04 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=E6=A0=B7=E5=BC=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/setting/component/PermissionSetting.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/src/views/setting/component/PermissionSetting.vue b/ui/src/views/setting/component/PermissionSetting.vue index efa40f84f..bf3340186 100644 --- a/ui/src/views/setting/component/PermissionSetting.vue +++ b/ui/src/views/setting/component/PermissionSetting.vue @@ -17,11 +17,21 @@ class="mr-12" shape="square" :size="24" + style="flex-shrink: 0" /> - + - {{ row?.name }} + + {{ row?.name }} + + From f9363bd2ed6b8ce8a9fbe0e361a848e4dbe282fb Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Wed, 6 Mar 2024 14:01:21 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/setting/component/PermissionSetting.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/src/views/setting/component/PermissionSetting.vue b/ui/src/views/setting/component/PermissionSetting.vue index bf3340186..a234318d6 100644 --- a/ui/src/views/setting/component/PermissionSetting.vue +++ b/ui/src/views/setting/component/PermissionSetting.vue @@ -31,7 +31,6 @@ {{ row?.name }} - From 0c9fbc14d7c96e58803e77fc562f77ecd164dba4 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Wed, 6 Mar 2024 14:41:54 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/applicaiton-overview/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/views/applicaiton-overview/index.vue b/ui/src/views/applicaiton-overview/index.vue index d8ed64c2e..bb9ce4483 100644 --- a/ui/src/views/applicaiton-overview/index.vue +++ b/ui/src/views/applicaiton-overview/index.vue @@ -12,7 +12,7 @@ shape="square" :size="32" /> -

{{ detail?.name }}

+

{{ detail?.name }}

From cde17a94349ab4b589429fc65317cb9090d7324d Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Wed, 6 Mar 2024 16:40:21 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/public/embeb.js | 44 ++++++++++++++++++++---------------------- ui/src/styles/app.scss | 12 ++++++++++++ 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/ui/public/embeb.js b/ui/public/embeb.js index 163969b88..739fc9e4a 100644 --- a/ui/public/embeb.js +++ b/ui/public/embeb.js @@ -1,15 +1,15 @@ -function auth(token,protocol,host){ - const XML=new XMLHttpRequest() - XML.open("POST",`${protocol}//${host}/api/application/authentication`,false) - XML.setRequestHeader('Content-Type', 'application/json'); - res=XML.send(JSON.stringify({"access_token":token})) - return XML.status==200 +function auth(token, protocol, host) { + const XML = new XMLHttpRequest() + XML.open('POST', `${protocol}//${host}/api/application/authentication`, false) + XML.setRequestHeader('Content-Type', 'application/json') + res = XML.send(JSON.stringify({ access_token: token })) + return XML.status == 200 } function embedChatbot() { const t = window.maxkbChatConfig - check=auth(t.token,t.protocol, t.host) - if (t && t.token && t.protocol && t.host&& check) { + check = auth(t.token, t.protocol, t.host) + if (t && t.token && t.protocol && t.host && check) { icon = ` @@ -41,8 +41,7 @@ function embedChatbot() { chat_container = document.createElement('div') chat_container.id = 'chat_container' chat_container.style.cssText = `z-index:10000;position: relative; - width: 420px; - height: 600px; + border-radius: 8px; border: 1px solid var(--N300, #DEE0E3); background: linear-gradient(188deg, rgba(235, 241, 255, 0.20) 39.6%, rgba(231, 249, 255, 0.20) 94.3%), #EFF0F1; @@ -69,27 +68,26 @@ function embedChatbot() { ` close_button.onclick = () => { document.body.removeChild(chat_container) - chat_button.style['display']='block' + chat_button.style['display'] = 'block' } chat_container.append(close_button) document.body.append(chat_container) - let is_404=false + let is_404 = false chat_button.onclick = ($event) => { - if( chat_container.style['display']=='block'){ - chat_container.style['display']='none' + if (chat_container.style['display'] == 'block') { + chat_container.style['display'] = 'none' } else { - if(auth(t.token,t.protocol, t.host)){ - if(is_404){ + if (auth(t.token, t.protocol, t.host)) { + if (is_404) { document.body.removeChild(chat_container) document.body.append(chat_container) - - is_404=false - } - chat_container.style['display']='block' - - }else{ - is_404=true + + is_404 = false + } + chat_container.style['display'] = 'block' + } else { + is_404 = true } } } diff --git a/ui/src/styles/app.scss b/ui/src/styles/app.scss index b47dd0ff8..460aed555 100644 --- a/ui/src/styles/app.scss +++ b/ui/src/styles/app.scss @@ -518,3 +518,15 @@ h4 { } } } + +#chat_container { + width: 420px; + height: 600px; +} +@media only screen and (max-width: 768px) { + #chat_container { + width: 100%; + height: 70%; + right: 0 !important; + } +}