feat: add svg icons for direct and http
This commit is contained in:
parent
852c91b44f
commit
eb564f06fe
3 changed files with 14 additions and 4 deletions
|
@ -10,6 +10,8 @@ import ss from 's/ss.svg';
|
||||||
import vmess from 's/vmess.svg';
|
import vmess from 's/vmess.svg';
|
||||||
import auto from 's/auto.svg';
|
import auto from 's/auto.svg';
|
||||||
import fallback from 's/fallback.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';
|
import s0 from './Proxy.module.scss';
|
||||||
|
|
||||||
|
@ -20,7 +22,9 @@ const colors = {
|
||||||
Shadowsocks: '#1a7dc0',
|
Shadowsocks: '#1a7dc0',
|
||||||
Socks5: '#2a477a',
|
Socks5: '#2a477a',
|
||||||
URLTest: '#3483e8',
|
URLTest: '#3483e8',
|
||||||
Fallback: '#3483e8'
|
Fallback: '#3483e8',
|
||||||
|
Direct: '#408b43',
|
||||||
|
Http: '#d3782d'
|
||||||
};
|
};
|
||||||
|
|
||||||
const icons = {
|
const icons = {
|
||||||
|
@ -28,7 +32,9 @@ const icons = {
|
||||||
Shadowsocks: ss.id,
|
Shadowsocks: ss.id,
|
||||||
Socks5: globe.id,
|
Socks5: globe.id,
|
||||||
URLTest: auto.id,
|
URLTest: auto.id,
|
||||||
Fallback: fallback.id
|
Fallback: fallback.id,
|
||||||
|
Direct: direct.id,
|
||||||
|
Http: http.id
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = s => {
|
const mapStateToProps = s => {
|
||||||
|
@ -40,8 +46,6 @@ const mapStateToProps = s => {
|
||||||
|
|
||||||
function Proxy({ now, name }) {
|
function Proxy({ now, name }) {
|
||||||
const { proxies, delay } = useStoreState(mapStateToProps);
|
const { proxies, delay } = useStoreState(mapStateToProps);
|
||||||
|
|
||||||
// const { name, proxies, delay, now } = this.props;
|
|
||||||
const latency = delay[name];
|
const latency = delay[name];
|
||||||
const proxy = proxies[name];
|
const proxy = proxies[name];
|
||||||
const color = now ? colors[proxy.type] : '#555';
|
const color = now ? colors[proxy.type] : '#555';
|
||||||
|
|
3
src/svg/direct.svg
Normal file
3
src/svg/direct.svg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="326" height="326" viewBox="0 0 326 326" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M97.59 266.176l107.38-107.38 17.851 17.85a1 1 0 0 0 1.678-.467l24.176-97.91a1 1 0 0 0-1.21-1.211l-97.912 24.175a1 1 0 0 0-.467 1.678l17.521 17.522-107.38 107.38a1 1 0 0 0 0 1.414l36.95 36.949a1 1 0 0 0 1.414 0z" stroke="currentColor" stroke-width="8" fill="none" fill-rule="evenodd"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 391 B |
3
src/svg/http.svg
Normal file
3
src/svg/http.svg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="326" height="326" viewBox="0 0 326 326" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M29 195.8v-73.5h12v27.1c1.533-2.467 3.4-4.333 5.6-5.6 2-1.2 4.367-1.8 7.1-1.8 2.733 0 5.133.6 7.2 1.8 2.267 1.333 4.167 3.3 5.7 5.9 2.267 3.933 3.4 8.967 3.4 15.1v31H58v-31c0-3.267-.6-5.933-1.8-8-.8-1.333-1.8-2.367-3-3.1-1.067-.6-2.3-.9-3.7-.9-1.4 0-2.633.3-3.7.9-1.2.733-2.2 1.767-3 3.1-1.2 2.067-1.8 4.733-1.8 8v31H29zm70.2.8c-3.467 0-6.433-.733-8.9-2.2-2.6-1.467-4.7-3.6-6.3-6.4-2.133-3.667-3.2-8.233-3.2-13.7v-20.7h-9.1v-10.8h9.1v-20.5h12v20.5h13.9v10.8H92.8v20.7c0 3.6.6 6.433 1.8 8.5.6 1.067 1.333 1.867 2.2 2.4.733.4 1.533.6 2.4.6.933 0 1.733-.2 2.4-.6.867-.533 1.667-1.367 2.4-2.5.867-1.6 1.433-3.5 1.7-5.7l11.4 3.3c-.467 2.8-1.367 5.367-2.7 7.7-1.6 2.8-3.683 4.933-6.25 6.4-2.567 1.467-5.55 2.2-8.95 2.2zm42.3 0c-3.467 0-6.433-.733-8.9-2.2-2.6-1.467-4.7-3.6-6.3-6.4-2.133-3.667-3.2-8.233-3.2-13.7v-20.7H114v-10.8h9.1v-20.5h12v20.5H149v10.8h-13.9v20.7c0 3.6.6 6.433 1.8 8.5.6 1.067 1.333 1.867 2.2 2.4.733.4 1.533.6 2.4.6.933 0 1.733-.2 2.4-.6.867-.533 1.667-1.367 2.4-2.5.867-1.6 1.433-3.5 1.7-5.7l11.4 3.3c-.467 2.8-1.367 5.367-2.7 7.7-1.6 2.8-3.683 4.933-6.25 6.4-2.567 1.467-5.55 2.2-8.95 2.2zm18.4 19.7v-73.5h12v6.6c1.533-2.467 3.4-4.333 5.6-5.6 2-1.2 4.4-1.8 7.2-1.8 2.867 0 5.433.633 7.7 1.9 2.4 1.4 4.367 3.467 5.9 6.2 2.267 3.867 3.4 8.767 3.4 14.7v9c0 5.933-1.133 10.833-3.4 14.7-1.533 2.733-3.5 4.8-5.9 6.2-2.267 1.267-4.833 1.9-7.7 1.9-2.8 0-5.2-.6-7.2-1.8-2.2-1.267-4.067-3.133-5.6-5.6v27.1h-12zm23.117-29.5c1.51 0 2.831-.378 3.964-1.133 1.195-.756 2.234-1.89 3.115-3.4 1.07-2.13 1.604-4.74 1.604-7.83v-9.273c0-3.091-.535-5.701-1.604-7.83-.881-1.512-1.92-2.645-3.115-3.4-1.133-.756-2.454-1.134-3.964-1.134-1.384 0-2.58.31-3.587.927-1.132.756-2.076 1.82-2.831 3.194-1.133 2.13-1.699 4.877-1.699 8.243v9.272c0 3.366.566 6.113 1.699 8.243.755 1.374 1.699 2.438 2.831 3.194 1.007.618 2.203.927 3.587.927zm35.683-25.2c-2.067 0-3.867-.433-5.4-1.3-1.333-.8-2.367-1.833-3.1-3.1-.867-1.467-1.3-3.267-1.3-5.4 0-2.133.433-3.933 1.3-5.4.733-1.267 1.767-2.3 3.1-3.1 1.533-.867 3.333-1.3 5.4-1.3s3.867.433 5.4 1.3c1.333.8 2.367 1.833 3.1 3.1.867 1.467 1.3 3.267 1.3 5.4 0 2.133-.433 3.933-1.3 5.4-.733 1.267-1.767 2.3-3.1 3.1-1.533.867-3.333 1.3-5.4 1.3zm0 35c-2.067 0-3.867-.433-5.4-1.3-1.333-.8-2.367-1.833-3.1-3.1-.867-1.467-1.3-3.267-1.3-5.4 0-2.133.433-3.933 1.3-5.4.733-1.267 1.767-2.3 3.1-3.1 1.533-.867 3.333-1.3 5.4-1.3s3.867.433 5.4 1.3c1.333.8 2.367 1.833 3.1 3.1.867 1.467 1.3 3.267 1.3 5.4 0 2.133-.433 3.933-1.3 5.4-.733 1.267-1.767 2.3-3.1 3.1-1.533.867-3.333 1.3-5.4 1.3zm10.3 20L259.2 110h12.2l-30.2 106.6H229zm25 0L284.2 110h12.2l-30.2 106.6H254z" fill="currentColor" fill-rule="evenodd"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
Loading…
Reference in a new issue