From eb564f06fe353438889ab2bb557c715529190128 Mon Sep 17 00:00:00 2001 From: Haishan Date: Sun, 23 Dec 2018 16:29:01 +0800 Subject: [PATCH] feat: add svg icons for direct and http --- src/components/Proxy.js | 12 ++++++++---- src/svg/direct.svg | 3 +++ src/svg/http.svg | 3 +++ 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 src/svg/direct.svg create mode 100644 src/svg/http.svg diff --git a/src/components/Proxy.js b/src/components/Proxy.js index 7f2e4bf..e75bfb8 100644 --- a/src/components/Proxy.js +++ b/src/components/Proxy.js @@ -10,6 +10,8 @@ import ss from 's/ss.svg'; import vmess from 's/vmess.svg'; import auto from 's/auto.svg'; import fallback from 's/fallback.svg'; +import direct from 's/direct.svg'; +import http from 's/http.svg'; import s0 from './Proxy.module.scss'; @@ -20,7 +22,9 @@ const colors = { Shadowsocks: '#1a7dc0', Socks5: '#2a477a', URLTest: '#3483e8', - Fallback: '#3483e8' + Fallback: '#3483e8', + Direct: '#408b43', + Http: '#d3782d' }; const icons = { @@ -28,7 +32,9 @@ const icons = { Shadowsocks: ss.id, Socks5: globe.id, URLTest: auto.id, - Fallback: fallback.id + Fallback: fallback.id, + Direct: direct.id, + Http: http.id }; const mapStateToProps = s => { @@ -40,8 +46,6 @@ const mapStateToProps = s => { function Proxy({ now, name }) { const { proxies, delay } = useStoreState(mapStateToProps); - - // const { name, proxies, delay, now } = this.props; const latency = delay[name]; const proxy = proxies[name]; const color = now ? colors[proxy.type] : '#555'; diff --git a/src/svg/direct.svg b/src/svg/direct.svg new file mode 100644 index 0000000..8af9db9 --- /dev/null +++ b/src/svg/direct.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/svg/http.svg b/src/svg/http.svg new file mode 100644 index 0000000..30dff67 --- /dev/null +++ b/src/svg/http.svg @@ -0,0 +1,3 @@ + + +