From f6b313e1aff51282e16a8d6e193167d5b51c777c Mon Sep 17 00:00:00 2001 From: z0ccc Date: Sun, 29 Jan 2023 22:41:01 -0500 Subject: [PATCH] fixed flags on windows --- package.json | 1 + src/assets/global.css | 2 +- src/popup/pages/locationPage/index.tsx | 3 +++ yarn.lock | 12 ++++++++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1730303..6f64682 100755 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@types/lodash.debounce": "^4.0.7", "@types/webpack-env": "^1.18.0", "@types/webrtc": "^0.0.33", + "country-flag-emoji-polyfill": "^0.1.4", "lodash.debounce": "^4.0.8", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/src/assets/global.css b/src/assets/global.css index 14e19f3..8ca9be2 100644 --- a/src/assets/global.css +++ b/src/assets/global.css @@ -5,7 +5,7 @@ } body { - font-family: 'Nunito', Arial, Helvetica, sans-serif; + font-family: 'Twemoji Country Flags', 'Nunito', Arial, Helvetica, sans-serif; font-weight: 500; width: 358px; height: 440px; diff --git a/src/popup/pages/locationPage/index.tsx b/src/popup/pages/locationPage/index.tsx index 904bd5f..aeede28 100644 --- a/src/popup/pages/locationPage/index.tsx +++ b/src/popup/pages/locationPage/index.tsx @@ -9,6 +9,7 @@ import configurations from 'utils/configurations' import getIp from 'utils/getIp' import { ipData } from 'types' import { RotateCw } from 'react-feather' +import { polyfillCountryFlagEmojis } from "country-flag-emoji-polyfill"; interface LocationPageProps { tab: string @@ -24,6 +25,8 @@ const LocationPage = ({ tab }: LocationPageProps) => { const [lon, setLongitude] = useState('') const [configuration, setConfiguration] = useState('custom') + polyfillCountryFlagEmojis(); + const reloadIp = useCallback(() => { setIpInfo('loading...') getIp() diff --git a/yarn.lock b/yarn.lock index 3801550..1497287 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2690,6 +2690,13 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" +country-flag-emoji-polyfill@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/country-flag-emoji-polyfill/-/country-flag-emoji-polyfill-0.1.4.tgz#54b7ca61220c124b11d3091c46d16bd7f3ba0016" + integrity sha512-e20azlb9yHb3mpL3lAlhkidmJgB5TELpA8oe0DPlyIfnqXhAGBmgLDpC+mm+Envh57n1xPrOfkJtXq2CrpvoGQ== + dependencies: + is-emoji-supported "^0.0.5" + cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -4113,6 +4120,11 @@ is-docker@^2.0.0, is-docker@^2.1.1: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-emoji-supported@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/is-emoji-supported/-/is-emoji-supported-0.0.5.tgz#f22301b22c63d6322935e829f39dfa59d03a7fe2" + integrity sha512-WOlXUhDDHxYqcSmFZis+xWhhqXiK2SU0iYiqmth5Ip0FHLZQAt9rKL5ahnilE8/86WH8tZ3bmNNNC+bTzamqlw== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"