From 2492ebb6914ae4da8dd99e6270f81e64558754e4 Mon Sep 17 00:00:00 2001 From: shuai Date: Mon, 27 Mar 2023 16:48:10 +0800 Subject: [PATCH 1/3] fix: remove ts ignore --- ui/src/components/Comment/index.scss | 6 ------ ui/src/components/HttpErrorContent/index.tsx | 4 +--- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/ui/src/components/Comment/index.scss b/ui/src/components/Comment/index.scss index fd485f24..04dd1b3e 100644 --- a/ui/src/components/Comment/index.scss +++ b/ui/src/components/Comment/index.scss @@ -21,9 +21,3 @@ } } } - -.comment-tip { - .tooltip-inner { - max-width: fit-content; - } -} diff --git a/ui/src/components/HttpErrorContent/index.tsx b/ui/src/components/HttpErrorContent/index.tsx index abbb976c..51ce4bcc 100644 --- a/ui/src/components/HttpErrorContent/index.tsx +++ b/ui/src/components/HttpErrorContent/index.tsx @@ -8,15 +8,13 @@ const Index = ({ httpCode = '', errMsg = '' }) => { const { t } = useTranslation('translation', { keyPrefix: 'page_error' }); useEffect(() => { // auto height of container - const pageWrap = document.querySelector('.page-wrap'); + const pageWrap = document.querySelector('.page-wrap') as HTMLElement; if (pageWrap) { - // @ts-ignore pageWrap.style.display = 'contents'; } return () => { if (pageWrap) { - // @ts-ignore pageWrap.style.display = 'block'; } }; From 07753804fc2704af273e08dfad824adc81b1d38c Mon Sep 17 00:00:00 2001 From: shuai Date: Mon, 27 Mar 2023 18:18:57 +0800 Subject: [PATCH 2/3] fix: add IE not support promt --- ui/public/index.html | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/ui/public/index.html b/ui/public/index.html index 3e1eddd8..c45ec409 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -62,7 +62,7 @@
-
+
Sorry, this site does not support Internet Explorer. In order to avoid affecting the normal use of our features, please use a more modern browser such as Edge, Firefox, Chrome, or Safari.
@@ -86,6 +86,9 @@ { name: 'Safari', version: '15' + }, + { + name: 'IE', } ]; function getBrowerTypeAndVersion(){ @@ -95,6 +98,7 @@ }; var ua = navigator.userAgent.toLowerCase(); var s; + ((ua.indexOf("compatible") > -1 && ua.indexOf("MSIE") > -1) || (ua.indexOf('Trident') > -1 && ua.indexOf("rv:11.0") > -1)) ? brower = { name: 'IE', version: '' } : (s = ua.match(/edge\/([\d\.]+)/)) ? brower = { name: 'Edge', version: s[1] } : (s = ua.match(/firefox\/([\d\.]+)/)) ? brower = { name: 'Firefox', version: s[1] } : (s = ua.match(/chrome\/([\d\.]+)/)) ? brower = { name: 'Chrome', version: s[1] } : @@ -126,16 +130,24 @@ } const browerInfo = getBrowerTypeAndVersion(); - const notSupport = defaultList.some(item => { - if (item.name === browerInfo.name) { - return compareVersion(browerInfo.version, item.version) === -1; - } - return false; - }); - if (notSupport) { + + if (browerInfo.name === 'IE') { const div = document.getElementById('protect-brower'); - div.innerText = 'The current browser version is too low, in order not to affect the normal use of the function, please upgrade the browser to the latest version.' + div.innerText = 'Sorry, this site does not support Internet Explorer, in order not to affect the normal use of the function, please use a more modern browser to visit. (like edge, firefox, chrome, safari.)' + } else { + const notSupport = defaultList.some(item => { + if (item.name === browerInfo.name) { + return compareVersion(browerInfo.version, item.version) === -1; + } + return false; + }); + if (notSupport) { + const div = document.getElementById('protect-brower'); + div.innerText = 'The current browser version is too low, in order not to affect the normal use of the function, please upgrade the browser to the latest version.' + } } + + From 595ace8012de945293a05b2f7016cc78a6dc4734 Mon Sep 17 00:00:00 2001 From: shuai Date: Mon, 27 Mar 2023 18:22:21 +0800 Subject: [PATCH 3/3] fix: change ie not support promot --- ui/public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/public/index.html b/ui/public/index.html index c45ec409..9ce983c3 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -134,7 +134,7 @@ if (browerInfo.name === 'IE') { const div = document.getElementById('protect-brower'); - div.innerText = 'Sorry, this site does not support Internet Explorer, in order not to affect the normal use of the function, please use a more modern browser to visit. (like edge, firefox, chrome, safari.)' + div.innerText = 'Sorry, this site does not support Internet Explorer. In order to avoid affecting the normal use of our features, please use a more modern browser such as Edge, Firefox, Chrome, or Safari.' } else { const notSupport = defaultList.some(item => { if (item.name === browerInfo.name) {