diff --git a/ui/public/index.html b/ui/public/index.html index 3e1eddd8..9ce983c3 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 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) { + 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.' + } } + + 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'; } };