feat: add mobile modal for tip

This commit is contained in:
QiShaoXuan
2022-10-31 16:18:48 +08:00
parent a11306bf89
commit 795cd8e98f
7 changed files with 144 additions and 2 deletions
+5 -1
View File
@@ -1,3 +1,4 @@
import getIsMobile from '@/utils/get-is-mobile';
// Inspire by https://stackoverflow.com/a/4900484/8415727
const getChromeVersion = () => {
const raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
@@ -11,7 +12,10 @@ const getIsChrome = () => {
const minimumChromeVersion = 102;
export const shouldShowWarning = () => {
return !getIsChrome() || getChromeVersion() < minimumChromeVersion;
return (
!getIsMobile &&
(!getIsChrome() || getChromeVersion() < minimumChromeVersion)
);
};
export const getWarningMessage = () => {